From 1a0884b067ea5c2b2983f8f4fa2f234eec6be4d8 Mon Sep 17 00:00:00 2001 From: Gordon Koo Date: Fri, 27 Jul 2012 11:31:38 -0700 Subject: [PATCH] disable back buttons for steps that are multipage --- js/exampletour.js | 4 +++- js/hopscotch.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/exampletour.js b/js/exampletour.js index 279730af..3a9d4391 100644 --- a/js/exampletour.js +++ b/js/exampletour.js @@ -36,6 +36,7 @@ var tour = { targetId: 'firstpagelink', orientation: 'bottom', showNextBtn: false, + showPrevBtn: false, multiPage: true // this indicates that next step will be on a different page }, { @@ -45,7 +46,8 @@ var tour = { orientation: 'bottom', width: 500, xOffset: -50, - arrowOffset: 400 + arrowOffset: 400, + showPrevBtn: false }, { title: 'Python decorator', diff --git a/js/hopscotch.js b/js/hopscotch.js index 85fdd630..5eb9acac 100644 --- a/js/hopscotch.js +++ b/js/hopscotch.js @@ -20,6 +20,8 @@ * * in addition to targetId, do we want to support specifying targetEl directly? * + * how to i18n the step numbers? + * * http://daneden.me/animate/ for bounce animation * */ @@ -314,7 +316,7 @@ this.renderStep = function(step, idx, isLast, callback) { var self = this, showNext = (typeof step.showNextBtn === 'undefined' || step.showNextBtn), - showPrev = (typeof step.showPrev === 'undefined' || step.showPrev), + showPrev = (typeof step.showPrevBtn === 'undefined' || step.showPrevBtn), bubbleWidth, bubblePadding;