|
77 | 77 | /* Hint button label */
|
78 | 78 | hintButtonLabel: 'Got it',
|
79 | 79 | /* Adding animation to hints? */
|
80 |
| - hintAnimation: true |
| 80 | + hintAnimation: true, |
| 81 | + /* additional classes to put on the buttons */ |
| 82 | + buttonClass: "introjs-button" |
81 | 83 | };
|
82 | 84 | }
|
83 | 85 |
|
|
1015 | 1017 |
|
1016 | 1018 | //skip button
|
1017 | 1019 | var skipTooltipButton = document.createElement('a');
|
1018 |
| - skipTooltipButton.className = 'introjs-button introjs-skipbutton'; |
| 1020 | + skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton '; |
1019 | 1021 | _setAnchorAsButton(skipTooltipButton);
|
1020 | 1022 | skipTooltipButton.innerHTML = this._options.skipLabel;
|
1021 | 1023 |
|
|
1058 | 1060 | // when it's the first step of tour
|
1059 | 1061 | if (this._currentStep == 0 && this._introItems.length > 1) {
|
1060 | 1062 | if (typeof skipTooltipButton !== "undefined" && skipTooltipButton != null) {
|
1061 |
| - skipTooltipButton.className = 'introjs-button introjs-skipbutton'; |
| 1063 | + skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton'; |
1062 | 1064 | }
|
1063 | 1065 | if (typeof nextTooltipButton !== "undefined" && nextTooltipButton != null) {
|
1064 |
| - nextTooltipButton.className = 'introjs-button introjs-nextbutton'; |
| 1066 | + nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton'; |
1065 | 1067 | }
|
1066 | 1068 |
|
1067 | 1069 | if (this._options.hidePrev == true) {
|
1068 | 1070 | if (typeof prevTooltipButton !== "undefined" && prevTooltipButton != null) {
|
1069 |
| - prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-hidden'; |
| 1071 | + prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton introjs-hidden'; |
1070 | 1072 | }
|
1071 | 1073 | if (typeof nextTooltipButton !== "undefined" && nextTooltipButton != null) {
|
1072 | 1074 | nextTooltipButton.className += ' introjs-fullbutton';
|
1073 | 1075 | }
|
1074 | 1076 | } else {
|
1075 | 1077 | if (typeof prevTooltipButton !== "undefined" && prevTooltipButton != null) {
|
1076 |
| - prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-disabled'; |
| 1078 | + prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton introjs-disabled'; |
1077 | 1079 | }
|
1078 | 1080 | }
|
1079 | 1081 |
|
|
1091 | 1093 | skipTooltipButton.className += ' introjs-donebutton';
|
1092 | 1094 | }
|
1093 | 1095 | if (typeof prevTooltipButton !== "undefined" && prevTooltipButton != null) {
|
1094 |
| - prevTooltipButton.className = 'introjs-button introjs-prevbutton'; |
| 1096 | + prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton'; |
1095 | 1097 | }
|
1096 | 1098 |
|
1097 | 1099 | if (this._options.hideNext == true) {
|
1098 | 1100 | if (typeof nextTooltipButton !== "undefined" && nextTooltipButton != null) {
|
1099 |
| - nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-hidden'; |
| 1101 | + nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton introjs-hidden'; |
1100 | 1102 | }
|
1101 | 1103 | if (typeof prevTooltipButton !== "undefined" && prevTooltipButton != null) {
|
1102 | 1104 | prevTooltipButton.className += ' introjs-fullbutton';
|
1103 | 1105 | }
|
1104 | 1106 | } else {
|
1105 | 1107 | if (typeof nextTooltipButton !== "undefined" && nextTooltipButton != null) {
|
1106 |
| - nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-disabled'; |
| 1108 | + nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton introjs-disabled'; |
1107 | 1109 | }
|
1108 | 1110 | }
|
1109 | 1111 |
|
|
1113 | 1115 | } else {
|
1114 | 1116 | // steps between start and end
|
1115 | 1117 | if (typeof skipTooltipButton !== "undefined" && skipTooltipButton != null) {
|
1116 |
| - skipTooltipButton.className = 'introjs-button introjs-skipbutton'; |
| 1118 | + skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton'; |
1117 | 1119 | }
|
1118 | 1120 | if (typeof prevTooltipButton !== "undefined" && prevTooltipButton != null) {
|
1119 |
| - prevTooltipButton.className = 'introjs-button introjs-prevbutton'; |
| 1121 | + prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton'; |
1120 | 1122 | }
|
1121 | 1123 | if (typeof nextTooltipButton !== "undefined" && nextTooltipButton != null) {
|
1122 |
| - nextTooltipButton.className = 'introjs-button introjs-nextbutton'; |
| 1124 | + nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton'; |
1123 | 1125 | }
|
1124 | 1126 | if (typeof skipTooltipButton !== "undefined" && skipTooltipButton != null) {
|
1125 | 1127 | skipTooltipButton.innerHTML = this._options.skipLabel;
|
|
1757 | 1759 | tooltipWrapper.innerHTML = item.hint;
|
1758 | 1760 |
|
1759 | 1761 | var closeButton = document.createElement('a');
|
1760 |
| - closeButton.className = 'introjs-button'; |
| 1762 | + closeButton.className = this._options.buttonClass; |
1761 | 1763 | closeButton.innerHTML = this._options.hintButtonLabel;
|
1762 | 1764 | closeButton.onclick = _hideHint.bind(this, stepId);
|
1763 | 1765 |
|
|
0 commit comments