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

Commit

Permalink
Release v0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
kate2753 committed Jul 20, 2015
1 parent 91859ba commit 5a09436
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 24 deletions.
Binary file added archives/hopscotch-0.2.5.tar.gz
Binary file not shown.
Binary file added archives/hopscotch-0.2.5.zip
Binary file not shown.
6 changes: 5 additions & 1 deletion dist/css/hopscotch.css
@@ -1,4 +1,4 @@
/**! hopscotch - v0.2.4
/**! hopscotch - v0.2.5
*
* Copyright 2015 LinkedIn Corp. All rights reserved.
*
Expand Down Expand Up @@ -400,6 +400,10 @@ div.hopscotch-bubble.no-number .hopscotch-bubble-content {
margin: 0;
}
div.hopscotch-bubble .hopscotch-bubble-close {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: 0;
color: #000;
background: transparent url(../img/sprite-green.png) -192px -92px no-repeat;
display: block;
Expand Down
4 changes: 2 additions & 2 deletions dist/css/hopscotch.min.css

Large diffs are not rendered by default.

40 changes: 22 additions & 18 deletions dist/js/hopscotch.js
@@ -1,4 +1,4 @@
/**! hopscotch - v0.2.4
/**! hopscotch - v0.2.5
*
* Copyright 2015 LinkedIn Corp. All rights reserved.
*
Expand Down Expand Up @@ -334,7 +334,7 @@
},

documentIsReady: function() {
return document.readyState === 'complete' || document.readyState === 'interactive';
return document.readyState === 'complete';
},

/**
Expand Down Expand Up @@ -741,6 +741,7 @@
unsafe,
currTour,
totalSteps,
totalStepsI18n,
nextBtnText,
isLast,
opts;
Expand All @@ -764,7 +765,8 @@
unsafe = currTour.unsafe;
if(Array.isArray(currTour.steps)){
totalSteps = currTour.steps.length;
isLast = (idx === totalSteps - 1);
totalStepsI18n = this._getStepI18nNum(this._getStepNum(totalSteps - 1));
isLast = (this._getStepNum(idx) === this._getStepNum(totalSteps - 1));
}
}
}else{
Expand Down Expand Up @@ -794,7 +796,8 @@
prevBtn: utils.getI18NString('prevBtn'),
nextBtn: nextBtnText,
closeTooltip: utils.getI18NString('closeTooltip'),
stepNum: this._getStepI18nNum(this._getStepNum(idx))
stepNum: this._getStepI18nNum(this._getStepNum(idx)),
numSteps: totalStepsI18n
},
buttons:{
showPrev: (utils.valOrDefault(step.showPrevButton, this.opt.showPrevButton) && (this._getStepNum(idx) > 0)),
Expand Down Expand Up @@ -1209,19 +1212,20 @@
if (callouts[opt.id]) {
throw new Error('Callout by that id already exists. Please choose a unique id.');
}
if (!utils.getStepTarget(opt)) {
throw new Error('Must specify existing target element via \'target\' option.');
}
opt.showNextButton = opt.showPrevButton = false;
opt.isTourBubble = false;
callout = new HopscotchBubble(opt);
callouts[opt.id] = callout;
calloutOpts[opt.id] = opt;
if (opt.target) {
callout.render(opt, null, function() {
callout.show();
if (opt.onShow) {
utils.invokeCallback(opt.onShow);
}
});
}
callout.render(opt, null, function() {
callout.show();
if (opt.onShow) {
utils.invokeCallback(opt.onShow);
}
});
}
else {
throw new Error('Must specify a callout id.');
Expand Down Expand Up @@ -1328,7 +1332,7 @@
* @returns {Object} HopscotchBubble
*/
getBubble = function(setOptions) {
if (!bubble) {
if (!bubble || !bubble.element || !bubble.element.parentNode) {
bubble = new HopscotchBubble(opt);
}
if (setOptions) {
Expand Down Expand Up @@ -1677,6 +1681,8 @@
return this.endTour(true, false);
}
changeStepCb.call(this, currStepNum);
} else if (currStepNum + direction === currTour.steps.length) {
return this.endTour();
}

return this;
Expand Down Expand Up @@ -2514,11 +2520,9 @@ __p += '<button class="hopscotch-nav-button next hopscotch-next">' +
} ;
__p += '\n </div>\n ';
if(buttons.showClose){ ;
__p += '<a title="' +
((__t = ( i18n.closeTooltip )) == null ? '' : __t) +
'" href="#" class="hopscotch-bubble-close hopscotch-close">' +
__p += '<button class="hopscotch-bubble-close hopscotch-close">' +
((__t = ( i18n.closeTooltip )) == null ? '' : __t) +
'</a>';
'</button>';
} ;
__p += '\n</div>\n<div class="hopscotch-bubble-arrow-container hopscotch-arrow">\n <div class="hopscotch-bubble-arrow-border"></div>\n <div class="hopscotch-bubble-arrow"></div>\n</div>';

Expand All @@ -2529,4 +2533,4 @@ return __p

return winHopscotch;

})));
})));
4 changes: 2 additions & 2 deletions dist/js/hopscotch.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "hopscotch",
"version": "0.2.4",
"version": "0.2.5",
"description": "A framework to make it easy for developers to add product tours to their pages.",
"main": "dist/js/hopscotch.min.js",
"directories": {
Expand Down

0 comments on commit 5a09436

Please sign in to comment.