Skip to content

Commit 846752a

Browse files
committed
Merge remote-tracking branch 'usablica/master'
2 parents cd2ec80 + a6d4415 commit 846752a

File tree

6 files changed

+48
-37
lines changed

6 files changed

+48
-37
lines changed

bower.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"name": "intro.js",
3-
"version": "1.0.0",
43
"description": "A better way for new feature introduction and step-by-step users guide for your website and project.",
54
"keywords": ["demo", "intro", "introduction"],
65
"homepage": "http://usablica.github.com/intro.js/",

example/RTL/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h3 class="muted">Intro.js</h3>
4242
<hr>
4343

4444
<div class="jumbotron">
45-
<h1 data-step="1" data-intro="متن توضیح">RTL Style</span></h1>
45+
<h1 data-step="1" data-intro="متن توضیح">RTL Style</h1>
4646
<p class="lead" data-step="4" data-intro="یک مرحله دیگه">This is the <abbr lang="en" title="Right To Left">RTL</abbr> version of IntroJs which includes an addition CSS file to perform the RTL style.</p>
4747
<a class="btn btn-large btn-success" href="javascript:void(0);" onclick="javascript:introJs().setOptions({ 'nextLabel': 'بعد', 'prevLabel': 'قبل', 'skipLabel': 'خروج', 'doneLabel': 'اتمام' }).start();">Show me how</a>
4848
</div>
@@ -59,7 +59,7 @@ <h4>Section Two</h4>
5959

6060
<h4>Section Three</h4>
6161
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis mollis augue a neque cursus ac blandit orci faucibus. Phasellus nec metus purus.</p>
62-
</div>
62+
</div>
6363

6464
<div class="span6" data-step="3" data-intro="امکانات بیشتر" data-position='left'>
6565
<h4>Section Four</h4>

intro.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@
195195
self._onKeyDown = function(e) {
196196
if (e.keyCode === 27 && self._options.exitOnEsc == true) {
197197
//escape key pressed, exit the intro
198-
_exitIntro.call(self, targetElm);
199-
//check if any callback is defined
198+
//check if exit callback is defined
200199
if (self._introExitCallback != undefined) {
201200
self._introExitCallback.call(self);
202201
}
202+
_exitIntro.call(self, targetElm);
203203
} else if(e.keyCode === 37) {
204204
//left arrow
205205
_previousStep.call(self);
@@ -214,6 +214,13 @@
214214
_previousStep.call(self);
215215
} else if (target && target.className.indexOf('introjs-skipbutton') > 0) {
216216
//user hit enter while focusing on skip button
217+
if (self._introItems.length - 1 == self._currentStep && typeof (self._introCompleteCallback) === 'function') {
218+
self._introCompleteCallback.call(self);
219+
}
220+
//check if any callback is defined
221+
if (self._introExitCallback != undefined) {
222+
self._introExitCallback.call(self);
223+
}
217224
_exitIntro.call(self, targetElm);
218225
} else {
219226
//default behavior for responding to enter
@@ -473,8 +480,9 @@
473480
// Modify so that the bottom of the tooltip connects with the target
474481
arrowLayer.className = "introjs-arrow left-bottom";
475482
tooltipLayer.style.top = "-" + (tooltipOffset.height - targetOffset.height - 20) + "px"
483+
} else {
484+
arrowLayer.className = 'introjs-arrow left';
476485
}
477-
arrowLayer.className = 'introjs-arrow left';
478486
break;
479487
case 'left':
480488
if (this._options.showStepNumbers == true) {
@@ -1107,12 +1115,12 @@
11071115

11081116
overlayLayer.onclick = function() {
11091117
if (self._options.exitOnOverlayClick == true) {
1110-
_exitIntro.call(self, targetElm);
11111118

11121119
//check if any callback is defined
11131120
if (self._introExitCallback != undefined) {
11141121
self._introExitCallback.call(self);
11151122
}
1123+
_exitIntro.call(self, targetElm);
11161124
}
11171125
};
11181126

introjs.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ tr.introjs-showElement > th {
6565

6666
.introjs-tooltipReferenceLayer {
6767
position: absolute;
68+
visibility: hidden;
6869
z-index: 10000000;
6970
background-color: transparent;
7071
-webkit-transition: all 0.3s ease-out;
@@ -86,6 +87,7 @@ tr.introjs-showElement > th {
8687

8788
.introjs-helperNumberLayer {
8889
position: absolute;
90+
visibility: visible;
8991
top: -16px;
9092
left: -16px;
9193
z-index: 9999999999 !important;
@@ -184,6 +186,7 @@ tr.introjs-showElement > th {
184186

185187
.introjs-tooltip {
186188
position: absolute;
189+
visibility: visible;
187190
padding: 10px;
188191
background-color: white;
189192
min-width: 200px;

0 commit comments

Comments
 (0)