Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
Remove ":mp" from multipage state.
Browse files Browse the repository at this point in the history
The ":mp" flag in state was causing weird issues when step elements
exist on multiple pages. HS handles multipage just fine without :mp,
so let's just get rid of it.
  • Loading branch information
Gordon Koo committed Jun 23, 2013
1 parent d2deccd commit d904b51
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 49 deletions.
15 changes: 3 additions & 12 deletions js/hopscotch-0.1.js
Expand Up @@ -1610,6 +1610,9 @@
}

if (wasMultiPage) {
// Update state for the next page
utils.setState(getOption('cookieName'), currTour.id + ':' + currStepNum, 1);

// Next step is on a different page, so no need to attempt to render it.
return;
}
Expand Down Expand Up @@ -1672,14 +1675,6 @@
cookieTourStep = tourPair[1];

cookieTourStep = parseInt(cookieTourStep, 10);

// Check for multipage flag
if (tourPair.length > 2 && tourPair[2] === 'mp') {
// Increment cookie step
if (cookieTourStep < currTour.steps.length-1) {
++cookieTourStep;
}
}
}

return this;
Expand Down Expand Up @@ -1775,10 +1770,6 @@
}
});

if (step.multipage) {
cookieVal += ':mp';
}

utils.setState(getOption('cookieName'), cookieVal, 1);
},

Expand Down

0 comments on commit d904b51

Please sign in to comment.