Edit File by line
/home/barbar84/www/wp-conte.../plugins/updraftp.../includes/tether-s...
File: shepherd.js
/*! tether-shepherd 1.8.1 */
[0] Fix | Delete
[1] Fix | Delete
(function(root, factory) {
[2] Fix | Delete
if (typeof define === 'function' && define.amd) {
[3] Fix | Delete
define(["tether"], factory);
[4] Fix | Delete
} else if (typeof exports === 'object') {
[5] Fix | Delete
module.exports = factory(require('tether'));
[6] Fix | Delete
} else {
[7] Fix | Delete
root.Shepherd = factory(root.Tether);
[8] Fix | Delete
}
[9] Fix | Delete
}(this, function(Tether) {
[10] Fix | Delete
[11] Fix | Delete
/* global Tether */
[12] Fix | Delete
[13] Fix | Delete
'use strict';
[14] Fix | Delete
[15] Fix | Delete
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
[16] Fix | Delete
[17] Fix | Delete
var _get = function get(_x5, _x6, _x7) { var _again = true; _function: while (_again) { var object = _x5, property = _x6, receiver = _x7; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x5 = parent; _x6 = property; _x7 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
[18] Fix | Delete
[19] Fix | Delete
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
[20] Fix | Delete
[21] Fix | Delete
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
[22] Fix | Delete
[23] Fix | Delete
var _Tether$Utils = Tether.Utils;
[24] Fix | Delete
var Evented = _Tether$Utils.Evented;
[25] Fix | Delete
var addClass = _Tether$Utils.addClass;
[26] Fix | Delete
var extend = _Tether$Utils.extend;
[27] Fix | Delete
var hasClass = _Tether$Utils.hasClass;
[28] Fix | Delete
var removeClass = _Tether$Utils.removeClass;
[29] Fix | Delete
var uniqueId = _Tether$Utils.uniqueId;
[30] Fix | Delete
[31] Fix | Delete
var Shepherd = new Evented();
[32] Fix | Delete
[33] Fix | Delete
function isUndefined(obj) {
[34] Fix | Delete
return typeof obj === 'undefined';
[35] Fix | Delete
};
[36] Fix | Delete
[37] Fix | Delete
function isArray(obj) {
[38] Fix | Delete
return obj && obj.constructor === Array;
[39] Fix | Delete
};
[40] Fix | Delete
[41] Fix | Delete
function isObject(obj) {
[42] Fix | Delete
return obj && obj.constructor === Object;
[43] Fix | Delete
};
[44] Fix | Delete
[45] Fix | Delete
function isObjectLoose(obj) {
[46] Fix | Delete
return typeof obj === 'object';
[47] Fix | Delete
};
[48] Fix | Delete
[49] Fix | Delete
var ATTACHMENT = {
[50] Fix | Delete
'top right': 'bottom left',
[51] Fix | Delete
'top left': 'bottom right',
[52] Fix | Delete
'top center': 'bottom center',
[53] Fix | Delete
'middle right': 'middle left',
[54] Fix | Delete
'middle left': 'middle right',
[55] Fix | Delete
'middle center': 'middle center',
[56] Fix | Delete
'bottom left': 'top right',
[57] Fix | Delete
'bottom right': 'top left',
[58] Fix | Delete
'bottom center': 'top center',
[59] Fix | Delete
'top': 'bottom center',
[60] Fix | Delete
'left': 'middle right',
[61] Fix | Delete
'right': 'middle left',
[62] Fix | Delete
'bottom': 'top center',
[63] Fix | Delete
'center': 'middle center',
[64] Fix | Delete
'middle': 'middle center'
[65] Fix | Delete
};
[66] Fix | Delete
[67] Fix | Delete
function createFromHTML(html) {
[68] Fix | Delete
var el = document.createElement('div');
[69] Fix | Delete
el.innerHTML = html;
[70] Fix | Delete
return el.children[0];
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
function matchesSelector(el, sel) {
[74] Fix | Delete
var matches = undefined;
[75] Fix | Delete
if (!isUndefined(el.matches)) {
[76] Fix | Delete
matches = el.matches;
[77] Fix | Delete
} else if (!isUndefined(el.matchesSelector)) {
[78] Fix | Delete
matches = el.matchesSelector;
[79] Fix | Delete
} else if (!isUndefined(el.msMatchesSelector)) {
[80] Fix | Delete
matches = el.msMatchesSelector;
[81] Fix | Delete
} else if (!isUndefined(el.webkitMatchesSelector)) {
[82] Fix | Delete
matches = el.webkitMatchesSelector;
[83] Fix | Delete
} else if (!isUndefined(el.mozMatchesSelector)) {
[84] Fix | Delete
matches = el.mozMatchesSelector;
[85] Fix | Delete
} else if (!isUndefined(el.oMatchesSelector)) {
[86] Fix | Delete
matches = el.oMatchesSelector;
[87] Fix | Delete
}
[88] Fix | Delete
return matches.call(el, sel);
[89] Fix | Delete
}
[90] Fix | Delete
[91] Fix | Delete
var positionRe = /^(.+) (top|left|right|bottom|center|\[[a-z ]+\])$/;
[92] Fix | Delete
[93] Fix | Delete
function parsePosition(str) {
[94] Fix | Delete
if (isObjectLoose(str)) {
[95] Fix | Delete
if (str.hasOwnProperty("element") && str.hasOwnProperty("on")) {
[96] Fix | Delete
return str;
[97] Fix | Delete
}
[98] Fix | Delete
return null;
[99] Fix | Delete
}
[100] Fix | Delete
[101] Fix | Delete
var matches = positionRe.exec(str);
[102] Fix | Delete
if (!matches) {
[103] Fix | Delete
return null;
[104] Fix | Delete
}
[105] Fix | Delete
[106] Fix | Delete
var on = matches[2];
[107] Fix | Delete
if (on[0] === '[') {
[108] Fix | Delete
on = on.substring(1, on.length - 1);
[109] Fix | Delete
}
[110] Fix | Delete
[111] Fix | Delete
return {
[112] Fix | Delete
'element': matches[1],
[113] Fix | Delete
'on': on
[114] Fix | Delete
};
[115] Fix | Delete
}
[116] Fix | Delete
[117] Fix | Delete
function parseShorthand(obj, props) {
[118] Fix | Delete
if (obj === null || isUndefined(obj)) {
[119] Fix | Delete
return obj;
[120] Fix | Delete
} else if (isObjectLoose(obj)) {
[121] Fix | Delete
return obj;
[122] Fix | Delete
}
[123] Fix | Delete
[124] Fix | Delete
var vals = obj.split(' ');
[125] Fix | Delete
var out = {};
[126] Fix | Delete
var j = props.length - 1;
[127] Fix | Delete
for (var i = vals.length - 1; i >= 0; i--) {
[128] Fix | Delete
if (j === 0) {
[129] Fix | Delete
out[props[j]] = vals.slice(0, i + 1).join(' ');
[130] Fix | Delete
break;
[131] Fix | Delete
} else {
[132] Fix | Delete
out[props[j]] = vals[i];
[133] Fix | Delete
}
[134] Fix | Delete
[135] Fix | Delete
j--;
[136] Fix | Delete
}
[137] Fix | Delete
[138] Fix | Delete
return out;
[139] Fix | Delete
}
[140] Fix | Delete
[141] Fix | Delete
var Step = (function (_Evented) {
[142] Fix | Delete
_inherits(Step, _Evented);
[143] Fix | Delete
[144] Fix | Delete
function Step(tour, options) {
[145] Fix | Delete
_classCallCheck(this, Step);
[146] Fix | Delete
[147] Fix | Delete
_get(Object.getPrototypeOf(Step.prototype), 'constructor', this).call(this, tour, options);
[148] Fix | Delete
this.tour = tour;
[149] Fix | Delete
this.bindMethods();
[150] Fix | Delete
this.setOptions(options);
[151] Fix | Delete
return this;
[152] Fix | Delete
}
[153] Fix | Delete
[154] Fix | Delete
_createClass(Step, [{
[155] Fix | Delete
key: 'bindMethods',
[156] Fix | Delete
value: function bindMethods() {
[157] Fix | Delete
var _this = this;
[158] Fix | Delete
[159] Fix | Delete
var methods = ['_show', 'show', 'hide', 'isOpen', 'cancel', 'complete', 'scrollTo', 'destroy', 'render'];
[160] Fix | Delete
methods.map(function (method) {
[161] Fix | Delete
_this[method] = _this[method].bind(_this);
[162] Fix | Delete
});
[163] Fix | Delete
}
[164] Fix | Delete
}, {
[165] Fix | Delete
key: 'setOptions',
[166] Fix | Delete
value: function setOptions() {
[167] Fix | Delete
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
[168] Fix | Delete
[169] Fix | Delete
this.options = options;
[170] Fix | Delete
this.destroy();
[171] Fix | Delete
[172] Fix | Delete
this.id = this.options.id || this.id || 'step-' + uniqueId();
[173] Fix | Delete
[174] Fix | Delete
var when = this.options.when;
[175] Fix | Delete
if (when) {
[176] Fix | Delete
for (var _event in when) {
[177] Fix | Delete
if (({}).hasOwnProperty.call(when, _event)) {
[178] Fix | Delete
var handler = when[_event];
[179] Fix | Delete
this.on(_event, handler, this);
[180] Fix | Delete
}
[181] Fix | Delete
}
[182] Fix | Delete
}
[183] Fix | Delete
[184] Fix | Delete
// Button configuration
[185] Fix | Delete
[186] Fix | Delete
var buttonsJson = JSON.stringify(this.options.buttons);
[187] Fix | Delete
var buttonsAreDefault = isUndefined(buttonsJson) || buttonsJson === "true";
[188] Fix | Delete
[189] Fix | Delete
var buttonsAreEmpty = buttonsJson === "{}" || buttonsJson === "[]" || buttonsJson === "null" || buttonsJson === "false";
[190] Fix | Delete
[191] Fix | Delete
var buttonsAreArray = !buttonsAreDefault && isArray(this.options.buttons);
[192] Fix | Delete
[193] Fix | Delete
var buttonsAreObject = !buttonsAreDefault && isObject(this.options.buttons);
[194] Fix | Delete
[195] Fix | Delete
// Show default button if undefined or 'true'
[196] Fix | Delete
if (buttonsAreDefault) {
[197] Fix | Delete
this.options.buttons = [{
[198] Fix | Delete
text: 'Next',
[199] Fix | Delete
action: this.tour.next,
[200] Fix | Delete
classes: 'btn'
[201] Fix | Delete
}];
[202] Fix | Delete
[203] Fix | Delete
// Can pass in an object which will assume asingle button
[204] Fix | Delete
} else if (!buttonsAreEmpty && buttonsAreObject) {
[205] Fix | Delete
this.options.buttons = [this.options.buttons];
[206] Fix | Delete
[207] Fix | Delete
// Falsey/empty values or non-object values prevent buttons from rendering
[208] Fix | Delete
} else if (buttonsAreEmpty || !buttonsAreArray) {
[209] Fix | Delete
this.options.buttons = false;
[210] Fix | Delete
}
[211] Fix | Delete
}
[212] Fix | Delete
}, {
[213] Fix | Delete
key: 'getTour',
[214] Fix | Delete
value: function getTour() {
[215] Fix | Delete
return this.tour;
[216] Fix | Delete
}
[217] Fix | Delete
}, {
[218] Fix | Delete
key: 'bindAdvance',
[219] Fix | Delete
value: function bindAdvance() {
[220] Fix | Delete
var _this2 = this;
[221] Fix | Delete
[222] Fix | Delete
// An empty selector matches the step element
[223] Fix | Delete
[224] Fix | Delete
var _parseShorthand = parseShorthand(this.options.advanceOn, ['selector', 'event']);
[225] Fix | Delete
[226] Fix | Delete
var event = _parseShorthand.event;
[227] Fix | Delete
var selector = _parseShorthand.selector;
[228] Fix | Delete
[229] Fix | Delete
var handler = function handler(e) {
[230] Fix | Delete
if (!_this2.isOpen()) {
[231] Fix | Delete
return;
[232] Fix | Delete
}
[233] Fix | Delete
[234] Fix | Delete
if (!isUndefined(selector)) {
[235] Fix | Delete
if (matchesSelector(e.target, selector)) {
[236] Fix | Delete
_this2.tour.next();
[237] Fix | Delete
}
[238] Fix | Delete
} else {
[239] Fix | Delete
if (_this2.el && e.target === _this2.el) {
[240] Fix | Delete
_this2.tour.next();
[241] Fix | Delete
}
[242] Fix | Delete
}
[243] Fix | Delete
};
[244] Fix | Delete
[245] Fix | Delete
// TODO: this should also bind/unbind on show/hide
[246] Fix | Delete
document.body.addEventListener(event, handler);
[247] Fix | Delete
this.on('destroy', function () {
[248] Fix | Delete
return document.body.removeEventListener(event, handler);
[249] Fix | Delete
});
[250] Fix | Delete
}
[251] Fix | Delete
}, {
[252] Fix | Delete
key: 'getAttachTo',
[253] Fix | Delete
value: function getAttachTo() {
[254] Fix | Delete
var opts = parsePosition(this.options.attachTo) || {};
[255] Fix | Delete
var returnOpts = extend({}, opts);
[256] Fix | Delete
[257] Fix | Delete
if (typeof opts.element === 'string') {
[258] Fix | Delete
// Can't override the element in user opts reference because we can't
[259] Fix | Delete
// guarantee that the element will exist in the future.
[260] Fix | Delete
returnOpts.element = document.querySelector(opts.element);
[261] Fix | Delete
if (!returnOpts.element) {
[262] Fix | Delete
console.error('The element for this Shepherd step was not found ' + opts.element);
[263] Fix | Delete
}
[264] Fix | Delete
}
[265] Fix | Delete
[266] Fix | Delete
return returnOpts;
[267] Fix | Delete
}
[268] Fix | Delete
}, {
[269] Fix | Delete
key: 'setupTether',
[270] Fix | Delete
value: function setupTether() {
[271] Fix | Delete
if (isUndefined(Tether)) {
[272] Fix | Delete
throw new Error("Using the attachment feature of Shepherd requires the Tether library");
[273] Fix | Delete
}
[274] Fix | Delete
[275] Fix | Delete
var opts = this.getAttachTo();
[276] Fix | Delete
var attachment = ATTACHMENT[opts.on] || ATTACHMENT.right;
[277] Fix | Delete
if (isUndefined(opts.element)) {
[278] Fix | Delete
opts.element = 'viewport';
[279] Fix | Delete
attachment = 'middle center';
[280] Fix | Delete
}
[281] Fix | Delete
[282] Fix | Delete
var tetherOpts = {
[283] Fix | Delete
classPrefix: 'shepherd',
[284] Fix | Delete
element: this.el,
[285] Fix | Delete
constraints: [{
[286] Fix | Delete
to: 'window',
[287] Fix | Delete
pin: true,
[288] Fix | Delete
attachment: 'together'
[289] Fix | Delete
}],
[290] Fix | Delete
target: opts.element,
[291] Fix | Delete
offset: opts.offset || '0 0',
[292] Fix | Delete
attachment: attachment
[293] Fix | Delete
};
[294] Fix | Delete
[295] Fix | Delete
if (this.tether) {
[296] Fix | Delete
this.tether.destroy();
[297] Fix | Delete
}
[298] Fix | Delete
[299] Fix | Delete
this.tether = new Tether(extend(tetherOpts, this.options.tetherOptions));
[300] Fix | Delete
}
[301] Fix | Delete
}, {
[302] Fix | Delete
key: 'show',
[303] Fix | Delete
value: function show() {
[304] Fix | Delete
var _this3 = this;
[305] Fix | Delete
[306] Fix | Delete
if (!isUndefined(this.options.beforeShowPromise)) {
[307] Fix | Delete
var beforeShowPromise = this.options.beforeShowPromise();
[308] Fix | Delete
if (!isUndefined(beforeShowPromise)) {
[309] Fix | Delete
return beforeShowPromise.then(function () {
[310] Fix | Delete
return _this3._show();
[311] Fix | Delete
});
[312] Fix | Delete
}
[313] Fix | Delete
}
[314] Fix | Delete
this._show();
[315] Fix | Delete
}
[316] Fix | Delete
}, {
[317] Fix | Delete
key: '_show',
[318] Fix | Delete
value: function _show() {
[319] Fix | Delete
var _this4 = this;
[320] Fix | Delete
[321] Fix | Delete
this.trigger('before-show');
[322] Fix | Delete
[323] Fix | Delete
if (!this.el) {
[324] Fix | Delete
this.render();
[325] Fix | Delete
}
[326] Fix | Delete
[327] Fix | Delete
addClass(this.el, 'shepherd-open');
[328] Fix | Delete
[329] Fix | Delete
document.body.setAttribute('data-shepherd-step', this.id);
[330] Fix | Delete
[331] Fix | Delete
this.setupTether();
[332] Fix | Delete
[333] Fix | Delete
if (this.options.scrollTo) {
[334] Fix | Delete
setTimeout(function () {
[335] Fix | Delete
_this4.scrollTo();
[336] Fix | Delete
});
[337] Fix | Delete
}
[338] Fix | Delete
[339] Fix | Delete
this.trigger('show');
[340] Fix | Delete
}
[341] Fix | Delete
}, {
[342] Fix | Delete
key: 'hide',
[343] Fix | Delete
value: function hide() {
[344] Fix | Delete
this.trigger('before-hide');
[345] Fix | Delete
[346] Fix | Delete
removeClass(this.el, 'shepherd-open');
[347] Fix | Delete
[348] Fix | Delete
document.body.removeAttribute('data-shepherd-step');
[349] Fix | Delete
[350] Fix | Delete
if (this.tether) {
[351] Fix | Delete
this.tether.destroy();
[352] Fix | Delete
}
[353] Fix | Delete
this.tether = null;
[354] Fix | Delete
[355] Fix | Delete
this.trigger('hide');
[356] Fix | Delete
}
[357] Fix | Delete
}, {
[358] Fix | Delete
key: 'isOpen',
[359] Fix | Delete
value: function isOpen() {
[360] Fix | Delete
return this.el && hasClass(this.el, 'shepherd-open');
[361] Fix | Delete
}
[362] Fix | Delete
}, {
[363] Fix | Delete
key: 'cancel',
[364] Fix | Delete
value: function cancel() {
[365] Fix | Delete
this.tour.cancel();
[366] Fix | Delete
this.trigger('cancel');
[367] Fix | Delete
}
[368] Fix | Delete
}, {
[369] Fix | Delete
key: 'complete',
[370] Fix | Delete
value: function complete() {
[371] Fix | Delete
this.tour.complete();
[372] Fix | Delete
this.trigger('complete');
[373] Fix | Delete
}
[374] Fix | Delete
}, {
[375] Fix | Delete
key: 'scrollTo',
[376] Fix | Delete
value: function scrollTo() {
[377] Fix | Delete
var _getAttachTo = this.getAttachTo();
[378] Fix | Delete
[379] Fix | Delete
var element = _getAttachTo.element;
[380] Fix | Delete
[381] Fix | Delete
if (!isUndefined(this.options.scrollToHandler)) {
[382] Fix | Delete
this.options.scrollToHandler(element);
[383] Fix | Delete
} else if (!isUndefined(element)) {
[384] Fix | Delete
element.scrollIntoView();
[385] Fix | Delete
}
[386] Fix | Delete
}
[387] Fix | Delete
}, {
[388] Fix | Delete
key: 'destroy',
[389] Fix | Delete
value: function destroy() {
[390] Fix | Delete
if (!isUndefined(this.el) && this.el.parentNode) {
[391] Fix | Delete
this.el.parentNode.removeChild(this.el);
[392] Fix | Delete
delete this.el;
[393] Fix | Delete
}
[394] Fix | Delete
[395] Fix | Delete
if (this.tether) {
[396] Fix | Delete
this.tether.destroy();
[397] Fix | Delete
}
[398] Fix | Delete
this.tether = null;
[399] Fix | Delete
[400] Fix | Delete
this.trigger('destroy');
[401] Fix | Delete
}
[402] Fix | Delete
}, {
[403] Fix | Delete
key: 'render',
[404] Fix | Delete
value: function render() {
[405] Fix | Delete
var _this5 = this;
[406] Fix | Delete
[407] Fix | Delete
if (!isUndefined(this.el)) {
[408] Fix | Delete
this.destroy();
[409] Fix | Delete
}
[410] Fix | Delete
[411] Fix | Delete
this.el = createFromHTML('<div class=\'shepherd-step ' + (this.options.classes || '') + '\' data-id=\'' + this.id + '\' ' + (this.options.idAttribute ? 'id="' + this.options.idAttribute + '"' : '') + '></div>');
[412] Fix | Delete
[413] Fix | Delete
var content = document.createElement('div');
[414] Fix | Delete
content.className = 'shepherd-content';
[415] Fix | Delete
this.el.appendChild(content);
[416] Fix | Delete
[417] Fix | Delete
var header = document.createElement('header');
[418] Fix | Delete
content.appendChild(header);
[419] Fix | Delete
[420] Fix | Delete
if (this.options.title) {
[421] Fix | Delete
header.innerHTML += '<h3 class=\'shepherd-title\'>' + this.options.title + '</h3>';
[422] Fix | Delete
this.el.className += ' shepherd-has-title';
[423] Fix | Delete
}
[424] Fix | Delete
[425] Fix | Delete
if (this.options.showCancelLink) {
[426] Fix | Delete
var link = createFromHTML("<a href class='shepherd-cancel-link'>✕</a>");
[427] Fix | Delete
header.appendChild(link);
[428] Fix | Delete
[429] Fix | Delete
this.el.className += ' shepherd-has-cancel-link';
[430] Fix | Delete
[431] Fix | Delete
this.bindCancelLink(link);
[432] Fix | Delete
}
[433] Fix | Delete
[434] Fix | Delete
if (!isUndefined(this.options.text)) {
[435] Fix | Delete
(function () {
[436] Fix | Delete
var text = createFromHTML("<div class='shepherd-text'></div>");
[437] Fix | Delete
var paragraphs = _this5.options.text;
[438] Fix | Delete
[439] Fix | Delete
if (typeof paragraphs === 'function') {
[440] Fix | Delete
paragraphs = paragraphs.call(_this5, text);
[441] Fix | Delete
}
[442] Fix | Delete
[443] Fix | Delete
if (paragraphs instanceof HTMLElement) {
[444] Fix | Delete
text.appendChild(paragraphs);
[445] Fix | Delete
} else {
[446] Fix | Delete
if (typeof paragraphs === 'string') {
[447] Fix | Delete
paragraphs = [paragraphs];
[448] Fix | Delete
}
[449] Fix | Delete
[450] Fix | Delete
paragraphs.map(function (paragraph) {
[451] Fix | Delete
text.innerHTML += '<p>' + paragraph + '</p>';
[452] Fix | Delete
});
[453] Fix | Delete
}
[454] Fix | Delete
[455] Fix | Delete
content.appendChild(text);
[456] Fix | Delete
})();
[457] Fix | Delete
}
[458] Fix | Delete
[459] Fix | Delete
if (this.options.buttons) {
[460] Fix | Delete
(function () {
[461] Fix | Delete
var footer = document.createElement('footer');
[462] Fix | Delete
var buttons = createFromHTML("<ul class='shepherd-buttons'></ul>");
[463] Fix | Delete
[464] Fix | Delete
_this5.options.buttons.map(function (cfg) {
[465] Fix | Delete
var button = createFromHTML('<li><a class=\'shepherd-button ' + (cfg.classes || '') + '\'>' + cfg.text + '</a>');
[466] Fix | Delete
buttons.appendChild(button);
[467] Fix | Delete
_this5.bindButtonEvents(cfg, button.querySelector('a'));
[468] Fix | Delete
});
[469] Fix | Delete
[470] Fix | Delete
footer.appendChild(buttons);
[471] Fix | Delete
content.appendChild(footer);
[472] Fix | Delete
})();
[473] Fix | Delete
}
[474] Fix | Delete
[475] Fix | Delete
document.body.appendChild(this.el);
[476] Fix | Delete
[477] Fix | Delete
this.setupTether();
[478] Fix | Delete
[479] Fix | Delete
if (this.options.advanceOn) {
[480] Fix | Delete
this.bindAdvance();
[481] Fix | Delete
}
[482] Fix | Delete
}
[483] Fix | Delete
}, {
[484] Fix | Delete
key: 'bindCancelLink',
[485] Fix | Delete
value: function bindCancelLink(link) {
[486] Fix | Delete
var _this6 = this;
[487] Fix | Delete
[488] Fix | Delete
link.addEventListener('click', function (e) {
[489] Fix | Delete
e.preventDefault();
[490] Fix | Delete
_this6.cancel();
[491] Fix | Delete
});
[492] Fix | Delete
}
[493] Fix | Delete
}, {
[494] Fix | Delete
key: 'bindButtonEvents',
[495] Fix | Delete
value: function bindButtonEvents(cfg, el) {
[496] Fix | Delete
var _this7 = this;
[497] Fix | Delete
[498] Fix | Delete
cfg.events = cfg.events || {};
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function