|
1 | 1 | /**
|
2 |
| - * Intro.js v2.2.0 |
| 2 | + * Intro.js v2.3.0 |
3 | 3 | * https://github.com/usablica/intro.js
|
4 | 4 | *
|
5 | 5 | * Copyright (C) 2016 Afshin Mehrabani (@afshinmeh)
|
|
18 | 18 | }
|
19 | 19 | } (this, function (exports) {
|
20 | 20 | //Default config/variables
|
21 |
| - var VERSION = '2.2.0'; |
| 21 | + var VERSION = '2.3.0'; |
22 | 22 |
|
23 | 23 | /**
|
24 | 24 | * IntroJs main class
|
|
38 | 38 | skipLabel: 'Skip',
|
39 | 39 | /* Done button label in tooltip box */
|
40 | 40 | doneLabel: 'Done',
|
| 41 | + /* Hide previous button in the first step? Otherwise, it will be disabled button. */ |
| 42 | + hidePrev: true, |
| 43 | + /* Hide next button in the last step? Otherwise, it will be disabled button. */ |
| 44 | + hideNext: true, |
41 | 45 | /* Default tooltip box position */
|
42 | 46 | tooltipPosition: 'bottom',
|
43 | 47 | /* Next CSS class for tooltip boxes */
|
|
1009 | 1013 | nextTooltipButton.removeAttribute('tabIndex');
|
1010 | 1014 |
|
1011 | 1015 | if (this._currentStep == 0 && this._introItems.length > 1) {
|
1012 |
| - prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-disabled'; |
1013 |
| - prevTooltipButton.tabIndex = '-1'; |
1014 | 1016 | nextTooltipButton.className = 'introjs-button introjs-nextbutton';
|
| 1017 | + |
| 1018 | + if (this._options.hidePrev == true) { |
| 1019 | + prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-hidden'; |
| 1020 | + nextTooltipButton.className += ' introjs-fullbutton'; |
| 1021 | + } else { |
| 1022 | + prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-disabled'; |
| 1023 | + } |
| 1024 | + |
| 1025 | + prevTooltipButton.tabIndex = '-1'; |
1015 | 1026 | skipTooltipButton.innerHTML = this._options.skipLabel;
|
1016 | 1027 | } else if (this._introItems.length - 1 == this._currentStep || this._introItems.length == 1) {
|
1017 | 1028 | skipTooltipButton.innerHTML = this._options.doneLabel;
|
1018 | 1029 | prevTooltipButton.className = 'introjs-button introjs-prevbutton';
|
1019 |
| - nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-disabled'; |
| 1030 | + |
| 1031 | + if (this._options.hideNext == true) { |
| 1032 | + nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-hidden'; |
| 1033 | + prevTooltipButton.className += ' introjs-fullbutton'; |
| 1034 | + } else { |
| 1035 | + nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-disabled'; |
| 1036 | + } |
| 1037 | + |
1020 | 1038 | nextTooltipButton.tabIndex = '-1';
|
1021 | 1039 | } else {
|
1022 | 1040 | prevTooltipButton.className = 'introjs-button introjs-prevbutton';
|
|
0 commit comments