|
99 | 99 | /* Hint button label */
|
100 | 100 | hintButtonLabel: 'Got it',
|
101 | 101 | /* Adding animation to hints? */
|
102 |
| - hintAnimation: true |
| 102 | + hintAnimation: true, |
| 103 | + /* additional classes to put on the buttons */ |
| 104 | + buttonClass: "introjs-button" |
103 | 105 | };
|
104 | 106 | }
|
105 | 107 |
|
|
1245 | 1247 |
|
1246 | 1248 | //skip button
|
1247 | 1249 | skipTooltipButton = document.createElement('a');
|
1248 |
| - skipTooltipButton.className = 'introjs-button introjs-skipbutton'; |
| 1250 | + skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton '; |
1249 | 1251 | _setAnchorAsButton(skipTooltipButton);
|
1250 | 1252 | skipTooltipButton.innerHTML = this._options.skipLabel;
|
1251 | 1253 |
|
|
1290 | 1292 | // when it's the first step of tour
|
1291 | 1293 | if (this._currentStep === 0 && this._introItems.length > 1) {
|
1292 | 1294 | if (typeof skipTooltipButton !== "undefined" && skipTooltipButton !== null) {
|
1293 |
| - skipTooltipButton.className = 'introjs-button introjs-skipbutton'; |
| 1295 | + skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton'; |
1294 | 1296 | }
|
1295 | 1297 | if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
1296 |
| - nextTooltipButton.className = 'introjs-button introjs-nextbutton'; |
| 1298 | + nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton'; |
1297 | 1299 | }
|
1298 | 1300 |
|
1299 | 1301 | if (this._options.hidePrev === true) {
|
1300 | 1302 | if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
|
1301 |
| - prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-hidden'; |
| 1303 | + prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton introjs-hidden'; |
1302 | 1304 | }
|
1303 | 1305 | if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
1304 | 1306 | _addClass(nextTooltipButton, 'introjs-fullbutton');
|
1305 | 1307 | }
|
1306 | 1308 | } else {
|
1307 | 1309 | if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
|
1308 |
| - prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-disabled'; |
| 1310 | + prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton introjs-disabled'; |
1309 | 1311 | }
|
1310 | 1312 | }
|
1311 | 1313 |
|
|
1320 | 1322 | _addClass(skipTooltipButton, 'introjs-donebutton');
|
1321 | 1323 | }
|
1322 | 1324 | if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
|
1323 |
| - prevTooltipButton.className = 'introjs-button introjs-prevbutton'; |
| 1325 | + prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton'; |
1324 | 1326 | }
|
1325 | 1327 |
|
1326 | 1328 | if (this._options.hideNext === true) {
|
1327 | 1329 | if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
1328 |
| - nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-hidden'; |
| 1330 | + nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton introjs-hidden'; |
1329 | 1331 | }
|
1330 | 1332 | if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
|
1331 | 1333 | _addClass(prevTooltipButton, 'introjs-fullbutton');
|
1332 | 1334 | }
|
1333 | 1335 | } else {
|
1334 | 1336 | if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
1335 |
| - nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-disabled'; |
| 1337 | + nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton introjs-disabled'; |
1336 | 1338 | }
|
1337 | 1339 | }
|
1338 | 1340 | } else {
|
1339 | 1341 | // steps between start and end
|
1340 | 1342 | if (typeof skipTooltipButton !== "undefined" && skipTooltipButton !== null) {
|
1341 |
| - skipTooltipButton.className = 'introjs-button introjs-skipbutton'; |
| 1343 | + skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton'; |
1342 | 1344 | }
|
1343 | 1345 | if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
|
1344 |
| - prevTooltipButton.className = 'introjs-button introjs-prevbutton'; |
| 1346 | + prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton'; |
1345 | 1347 | }
|
1346 | 1348 | if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
1347 |
| - nextTooltipButton.className = 'introjs-button introjs-nextbutton'; |
| 1349 | + nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton'; |
1348 | 1350 | }
|
1349 | 1351 | if (typeof skipTooltipButton !== "undefined" && skipTooltipButton !== null) {
|
1350 | 1352 | skipTooltipButton.innerHTML = this._options.skipLabel;
|
|
2177 | 2179 | tooltipWrapper.innerHTML = item.hint;
|
2178 | 2180 |
|
2179 | 2181 | var closeButton = document.createElement('a');
|
2180 |
| - closeButton.className = 'introjs-button'; |
| 2182 | + closeButton.className = this._options.buttonClass; |
2181 | 2183 | closeButton.setAttribute('role', 'button');
|
2182 | 2184 | closeButton.innerHTML = this._options.hintButtonLabel;
|
2183 | 2185 | closeButton.onclick = _hideHint.bind(this, stepId);
|
|
0 commit comments