Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Returning guider on next and prev methods #76

Closed
maraujop opened this Issue · 1 comment

2 participants

@maraujop

This can be useful to know what is the next and previous step's id or other information.

next_guider = guiders.next()
next_step = next_guider['id']

This is a simple patch that adds this feature:

diff --git a/static/js/libraries/guiders-1.2.8.js b/static/js/libraries/guiders-1.2.8.js
index 90ec37a..22a8cd4 100644
--- a/static/js/libraries/guiders-1.2.8.js
+++ b/static/js/libraries/guiders-1.2.8.js
@@ -380,6 +380,7 @@ var guiders = (function($) {
           guiders._dehighlightElement(currentGuider.highlight);
       }
       guiders.show(nextGuiderId);
+      return myGuider;
     }
   };

@@ -407,6 +408,7 @@ var guiders = (function($) {
         guiders._dehighlightElement(prevGuider.highlight);
       }
       guiders.show(prevGuiderId);
+      return prevGuider;
     }
   }

Cheers,
Miguel

@pickhardt
Collaborator

Got it in for the next version. Thanks! Also, just fyi, I have added a dev branch. This way contributors can issue pull requests to the dev branch, and I can pull directly into it, rather than only having one master branch.

@pickhardt pickhardt closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.