diff options
author | mrjive <mrjive@mrjive.it> | 2018-01-26 09:43:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-26 09:43:47 +0100 |
commit | 4b7967b938f65137b889fc172c957345680bfc11 (patch) | |
tree | 94b5f1882110f92cf83b8e9185295a8206a9ebeb /library/bootstrap/js/bootstrap.js | |
parent | f560a3c98fc7cf4de7d86bd7f074c9995b3d240a (diff) | |
parent | 4656856dfbf41e855b1bb8625290c07a5dcf8d38 (diff) | |
download | volse-hubzilla-4b7967b938f65137b889fc172c957345680bfc11.tar.gz volse-hubzilla-4b7967b938f65137b889fc172c957345680bfc11.tar.bz2 volse-hubzilla-4b7967b938f65137b889fc172c957345680bfc11.zip |
Merge pull request #12 from redmatrix/dev
Dev
Diffstat (limited to 'library/bootstrap/js/bootstrap.js')
-rw-r--r-- | library/bootstrap/js/bootstrap.js | 222 |
1 files changed, 112 insertions, 110 deletions
diff --git a/library/bootstrap/js/bootstrap.js b/library/bootstrap/js/bootstrap.js index 08f6c27f6..6d9549d99 100644 --- a/library/bootstrap/js/bootstrap.js +++ b/library/bootstrap/js/bootstrap.js @@ -1,6 +1,6 @@ /*! - * Bootstrap v4.0.0-beta.3 (https://getbootstrap.com) - * Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap v4.0.0 (https://getbootstrap.com) + * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { @@ -54,7 +54,7 @@ function _inheritsLoose(subClass, superClass) { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.3): util.js + * Bootstrap (v4.0.0): util.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -66,7 +66,7 @@ var Util = function ($$$1) { * ------------------------------------------------------------------------ */ var transition = false; - var MAX_UID = 1000000; // shoutout AngusCroll (https://goo.gl/pxwQGp) + var MAX_UID = 1000000; // Shoutout AngusCroll (https://goo.gl/pxwQGp) function toType(obj) { return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); @@ -87,7 +87,7 @@ var Util = function ($$$1) { } function transitionEndTest() { - if (window.QUnit) { + if (typeof window !== 'undefined' && window.QUnit) { return false; } @@ -121,7 +121,7 @@ var Util = function ($$$1) { } function escapeId(selector) { - // we escape IDs in case of special selectors (selector = '#myId:something') + // We escape IDs in case of special selectors (selector = '#myId:something') // $.escapeSelector does not exist in jQuery < 3 selector = typeof $$$1.escapeSelector === 'function' ? $$$1.escapeSelector(selector).substr(1) : selector.replace(/(:|\.|\[|\]|,|=|@)/g, '\\$1'); return selector; @@ -148,7 +148,7 @@ var Util = function ($$$1) { if (!selector || selector === '#') { selector = element.getAttribute('href') || ''; - } // if it's an ID + } // If it's an ID if (selector.charAt(0) === '#') { @@ -158,7 +158,7 @@ var Util = function ($$$1) { try { var $selector = $$$1(document).find(selector); return $selector.length > 0 ? selector : null; - } catch (error) { + } catch (err) { return null; } }, @@ -194,7 +194,7 @@ var Util = function ($$$1) { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.3): alert.js + * Bootstrap (v4.0.0): alert.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -206,7 +206,7 @@ var Alert = function ($$$1) { * ------------------------------------------------------------------------ */ var NAME = 'alert'; - var VERSION = '4.0.0-beta.3'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.alert'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -237,12 +237,12 @@ var Alert = function ($$$1) { function () { function Alert(element) { this._element = element; - } // getters + } // Getters var _proto = Alert.prototype; - // public + // Public _proto.close = function close(element) { element = element || this._element; @@ -260,7 +260,7 @@ var Alert = function ($$$1) { _proto.dispose = function dispose() { $$$1.removeData(this._element, DATA_KEY); this._element = null; - }; // private + }; // Private _proto._getRootElement = function _getRootElement(element) { @@ -302,7 +302,7 @@ var Alert = function ($$$1) { _proto._destroyElement = function _destroyElement(element) { $$$1(element).detach().trigger(Event.CLOSED).remove(); - }; // static + }; // Static Alert._jQueryInterface = function _jQueryInterface(config) { @@ -366,7 +366,7 @@ var Alert = function ($$$1) { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.3): button.js + * Bootstrap (v4.0.0): button.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -378,7 +378,7 @@ var Button = function ($$$1) { * ------------------------------------------------------------------------ */ var NAME = 'button'; - var VERSION = '4.0.0-beta.3'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.button'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -411,12 +411,12 @@ var Button = function ($$$1) { function () { function Button(element) { this._element = element; - } // getters + } // Getters var _proto = Button.prototype; - // public + // Public _proto.toggle = function toggle() { var triggerChangeEvent = true; var addAriaPressed = true; @@ -464,7 +464,7 @@ var Button = function ($$$1) { _proto.dispose = function dispose() { $$$1.removeData(this._element, DATA_KEY); this._element = null; - }; // static + }; // Static Button._jQueryInterface = function _jQueryInterface(config) { @@ -529,7 +529,7 @@ var Button = function ($$$1) { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.3): carousel.js + * Bootstrap (v4.0.0): carousel.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -541,7 +541,7 @@ var Carousel = function ($$$1) { * ------------------------------------------------------------------------ */ var NAME = 'carousel'; - var VERSION = '4.0.0-beta.3'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.carousel'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -624,12 +624,12 @@ var Carousel = function ($$$1) { this._indicatorsElement = $$$1(this._element).find(Selector.INDICATORS)[0]; this._addEventListeners(); - } // getters + } // Getters var _proto = Carousel.prototype; - // public + // Public _proto.next = function next() { if (!this._isSliding) { this._slide(Direction.NEXT); @@ -719,7 +719,7 @@ var Carousel = function ($$$1) { this._isSliding = null; this._activeElement = null; this._indicatorsElement = null; - }; // private + }; // Private _proto._getConfig = function _getConfig(config) { @@ -745,7 +745,7 @@ var Carousel = function ($$$1) { }); if ('ontouchstart' in document.documentElement) { - // if it's a touch-enabled device, mouseenter/leave are fired as + // If it's a touch-enabled device, mouseenter/leave are fired as // part of the mouse compatibility events on first tap - the carousel // would stop cycling until user tapped out of it; // here, we listen for touchend, explicitly pause the carousel @@ -784,7 +784,6 @@ var Carousel = function ($$$1) { break; default: - return; } }; @@ -876,7 +875,7 @@ var Carousel = function ($$$1) { } if (!activeElement || !nextElement) { - // some weirdness is happening, so we bail + // Some weirdness is happening, so we bail return; } @@ -918,7 +917,7 @@ var Carousel = function ($$$1) { if (isCycling) { this.cycle(); } - }; // static + }; // Static Carousel._jQueryInterface = function _jQueryInterface(config) { @@ -942,7 +941,7 @@ var Carousel = function ($$$1) { data.to(config); } else if (typeof action === 'string') { if (typeof data[action] === 'undefined') { - throw new Error("No method named \"" + action + "\""); + throw new TypeError("No method named \"" + action + "\""); } data[action](); @@ -1029,7 +1028,7 @@ var Carousel = function ($$$1) { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.3): collapse.js + * Bootstrap (v4.0.0): collapse.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -1041,7 +1040,7 @@ var Collapse = function ($$$1) { * ------------------------------------------------------------------------ */ var NAME = 'collapse'; - var VERSION = '4.0.0-beta.3'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.collapse'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -1098,6 +1097,8 @@ var Collapse = function ($$$1) { var selector = Util.getSelectorFromElement(elem); if (selector !== null && $$$1(selector).filter(element).length > 0) { + this._selector = selector; + this._triggerArray.push(elem); } } @@ -1111,12 +1112,12 @@ var Collapse = function ($$$1) { if (this._config.toggle) { this.toggle(); } - } // getters + } // Getters var _proto = Collapse.prototype; - // public + // Public _proto.toggle = function toggle() { if ($$$1(this._element).hasClass(ClassName.SHOW)) { this.hide(); @@ -1136,15 +1137,15 @@ var Collapse = function ($$$1) { var activesData; if (this._parent) { - actives = $$$1.makeArray($$$1(this._parent).children().children(Selector.ACTIVES)); + actives = $$$1.makeArray($$$1(this._parent).find(Selector.ACTIVES).filter("[data-parent=\"" + this._config.parent + "\"]")); - if (!actives.length) { + if (actives.length === 0) { actives = null; } } if (actives) { - activesData = $$$1(actives).data(DATA_KEY); + activesData = $$$1(actives).not(this._selector).data(DATA_KEY); if (activesData && activesData._isTransitioning) { return; @@ -1159,7 +1160,7 @@ var Collapse = function ($$$1) { } if (actives) { - Collapse._jQueryInterface.call($$$1(actives), 'hide'); + Collapse._jQueryInterface.call($$$1(actives).not(this._selector), 'hide'); if (!activesData) { $$$1(actives).data(DATA_KEY, null); @@ -1171,7 +1172,7 @@ var Collapse = function ($$$1) { $$$1(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); this._element.style[dimension] = 0; - if (this._triggerArray.length) { + if (this._triggerArray.length > 0) { $$$1(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); } @@ -1217,7 +1218,7 @@ var Collapse = function ($$$1) { Util.reflow(this._element); $$$1(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW); - if (this._triggerArray.length) { + if (this._triggerArray.length > 0) { for (var i = 0; i < this._triggerArray.length; i++) { var trigger = this._triggerArray[i]; var selector = Util.getSelectorFromElement(trigger); @@ -1261,12 +1262,12 @@ var Collapse = function ($$$1) { this._element = null; this._triggerArray = null; this._isTransitioning = null; - }; // private + }; // Private _proto._getConfig = function _getConfig(config) { config = _extends({}, Default, config); - config.toggle = Boolean(config.toggle); // coerce string values + config.toggle = Boolean(config.toggle); // Coerce string values Util.typeCheckConfig(NAME, config, DefaultType); return config; @@ -1283,7 +1284,7 @@ var Collapse = function ($$$1) { var parent = null; if (Util.isElement(this._config.parent)) { - parent = this._config.parent; // it's a jQuery object + parent = this._config.parent; // It's a jQuery object if (typeof this._config.parent.jquery !== 'undefined') { parent = this._config.parent[0]; @@ -1303,11 +1304,11 @@ var Collapse = function ($$$1) { if (element) { var isOpen = $$$1(element).hasClass(ClassName.SHOW); - if (triggerArray.length) { + if (triggerArray.length > 0) { $$$1(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); } } - }; // static + }; // Static Collapse._getTargetFromElement = function _getTargetFromElement(element) { @@ -1333,7 +1334,7 @@ var Collapse = function ($$$1) { if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -1396,7 +1397,7 @@ var Collapse = function ($$$1) { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.3): dropdown.js + * Bootstrap (v4.0.0): dropdown.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -1408,7 +1409,7 @@ var Dropdown = function ($$$1) { * ------------------------------------------------------------------------ */ var NAME = 'dropdown'; - var VERSION = '4.0.0-beta.3'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.dropdown'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -1491,12 +1492,12 @@ var Dropdown = function ($$$1) { this._inNavbar = this._detectNavbar(); this._addEventListeners(); - } // getters + } // Getters var _proto = Dropdown.prototype; - // public + // Public _proto.toggle = function toggle() { if (this._element.disabled || $$$1(this._element).hasClass(ClassName.DISABLED)) { return; @@ -1529,10 +1530,10 @@ var Dropdown = function ($$$1) { * Popper - https://popper.js.org */ if (typeof Popper === 'undefined') { - throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)'); + throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)'); } - var element = this._element; // for dropup with alignment we use the parent as popper container + var element = this._element; // For dropup with alignment we use the parent as popper container if ($$$1(parent).hasClass(ClassName.DROPUP)) { if ($$$1(this._menu).hasClass(ClassName.MENULEFT) || $$$1(this._menu).hasClass(ClassName.MENURIGHT)) { @@ -1548,13 +1549,13 @@ var Dropdown = function ($$$1) { } this._popper = new Popper(element, this._menu, this._getPopperConfig()); - } // if this is a touch-enabled device we add extra + } // If this is a touch-enabled device we add extra // empty mouseover listeners to the body's immediate children; // only needed because of broken event delegation on iOS // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html - if ('ontouchstart' in document.documentElement && !$$$1(parent).closest(Selector.NAVBAR_NAV).length) { + if ('ontouchstart' in document.documentElement && $$$1(parent).closest(Selector.NAVBAR_NAV).length === 0) { $$$1('body').children().on('mouseover', null, $$$1.noop); } @@ -1585,7 +1586,7 @@ var Dropdown = function ($$$1) { if (this._popper !== null) { this._popper.scheduleUpdate(); } - }; // private + }; // Private _proto._addEventListeners = function _addEventListeners() { @@ -1667,7 +1668,7 @@ var Dropdown = function ($$$1) { } }; return popperConfig; - }; // static + }; // Static Dropdown._jQueryInterface = function _jQueryInterface(config) { @@ -1683,7 +1684,7 @@ var Dropdown = function ($$$1) { if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -1725,7 +1726,7 @@ var Dropdown = function ($$$1) { if (hideEvent.isDefaultPrevented()) { continue; - } // if this is a touch-enabled device we remove the extra + } // If this is a touch-enabled device we remove the extra // empty mouseover listeners we added for iOS support @@ -1748,7 +1749,8 @@ var Dropdown = function ($$$1) { } return parent || element.parentNode; - }; + }; // eslint-disable-next-line complexity + Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { // If not input/textarea: @@ -1785,19 +1787,19 @@ var Dropdown = function ($$$1) { var items = $$$1(parent).find(Selector.VISIBLE_ITEMS).get(); - if (!items.length) { + if (items.length === 0) { return; } var index = items.indexOf(event.target); if (event.which === ARROW_UP_KEYCODE && index > 0) { - // up + // Up index--; } if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { - // down + // Down index++; } @@ -1860,7 +1862,7 @@ var Dropdown = function ($$$1) { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.3): modal.js + * Bootstrap (v4.0.0): modal.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -1872,7 +1874,7 @@ var Modal = function ($$$1) { * ------------------------------------------------------------------------ */ var NAME = 'modal'; - var VERSION = '4.0.0-beta.3'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.modal'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -1941,12 +1943,12 @@ var Modal = function ($$$1) { this._ignoreBackdropClick = false; this._originalBodyPadding = 0; this._scrollbarWidth = 0; - } // getters + } // Getters var _proto = Modal.prototype; - // public + // Public _proto.toggle = function toggle(relatedTarget) { return this._isShown ? this.hide() : this.show(relatedTarget); }; @@ -2059,7 +2061,7 @@ var Modal = function ($$$1) { _proto.handleUpdate = function handleUpdate() { this._adjustDialog(); - }; // private + }; // Private _proto._getConfig = function _getConfig(config) { @@ -2074,7 +2076,7 @@ var Modal = function ($$$1) { var transition = Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.FADE); if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { - // don't move modals dom position + // Don't move modal's DOM position document.body.appendChild(this._element); } @@ -2117,9 +2119,9 @@ var Modal = function ($$$1) { _proto._enforceFocus = function _enforceFocus() { var _this4 = this; - $$$1(document).off(Event.FOCUSIN) // guard against infinite focus loop + $$$1(document).off(Event.FOCUSIN) // Guard against infinite focus loop .on(Event.FOCUSIN, function (event) { - if (document !== event.target && _this4._element !== event.target && !$$$1(_this4._element).has(event.target).length) { + if (document !== event.target && _this4._element !== event.target && $$$1(_this4._element).has(event.target).length === 0) { _this4._element.focus(); } }); @@ -2340,7 +2342,7 @@ var Modal = function ($$$1) { var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); return scrollbarWidth; - }; // static + }; // Static Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { @@ -2356,7 +2358,7 @@ var Modal = function ($$$1) { if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](relatedTarget); @@ -2404,7 +2406,7 @@ var Modal = function ($$$1) { var $target = $$$1(target).one(Event.SHOW, function (showEvent) { if (showEvent.isDefaultPrevented()) { - // only register focus restorer if modal will actually get shown + // Only register focus restorer if modal will actually get shown return; } @@ -2436,7 +2438,7 @@ var Modal = function ($$$1) { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.3): tooltip.js + * Bootstrap (v4.0.0): tooltip.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -2448,7 +2450,7 @@ var Tooltip = function ($$$1) { * ------------------------------------------------------------------------ */ var NAME = 'tooltip'; - var VERSION = '4.0.0-beta.3'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.tooltip'; var EVENT_KEY = "." + DATA_KEY; var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; @@ -2537,7 +2539,7 @@ var Tooltip = function ($$$1) { * Popper - https://popper.js.org */ if (typeof Popper === 'undefined') { - throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)'); + throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)'); } // private @@ -2545,19 +2547,19 @@ var Tooltip = function ($$$1) { this._timeout = 0; this._hoverState = ''; this._activeTrigger = {}; - this._popper = null; // protected + this._popper = null; // Protected this.element = element; this.config = this._getConfig(config); this.tip = null; this._setListeners(); - } // getters + } // Getters var _proto = Tooltip.prototype; - // public + // Public _proto.enable = function enable() { this._isEnabled = true; }; @@ -2692,7 +2694,7 @@ var Tooltip = function ($$$1) { _this._handlePopperPlacementChange(data); } }); - $$$1(tip).addClass(ClassName.SHOW); // if this is a touch-enabled device we add extra + $$$1(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra // empty mouseover listeners to the body's immediate children; // only needed because of broken event delegation on iOS // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html @@ -2755,7 +2757,7 @@ var Tooltip = function ($$$1) { return; } - $$$1(tip).removeClass(ClassName.SHOW); // if this is a touch-enabled device we remove the extra + $$$1(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra // empty mouseover listeners we added for iOS support if ('ontouchstart' in document.documentElement) { @@ -2779,7 +2781,7 @@ var Tooltip = function ($$$1) { if (this._popper !== null) { this._popper.scheduleUpdate(); } - }; // protected + }; // Protected _proto.isWithContent = function isWithContent() { @@ -2805,7 +2807,7 @@ var Tooltip = function ($$$1) { var html = this.config.html; if (typeof content === 'object' && (content.nodeType || content.jquery)) { - // content is a DOM node or a jQuery + // Content is a DOM node or a jQuery if (html) { if (!$$$1(content).parent().is($element)) { $element.empty().append(content); @@ -2826,7 +2828,7 @@ var Tooltip = function ($$$1) { } return title; - }; // private + }; // Private _proto._getAttachment = function _getAttachment(placement) { @@ -3015,7 +3017,7 @@ var Tooltip = function ($$$1) { this.hide(); this.show(); this.config.animation = initConfigAnimation; - }; // static + }; // Static Tooltip._jQueryInterface = function _jQueryInterface(config) { @@ -3035,7 +3037,7 @@ var Tooltip = function ($$$1) { if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -3101,7 +3103,7 @@ var Tooltip = function ($$$1) { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.3): popover.js + * Bootstrap (v4.0.0): popover.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -3113,7 +3115,7 @@ var Popover = function ($$$1) { * ------------------------------------------------------------------------ */ var NAME = 'popover'; - var VERSION = '4.0.0-beta.3'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.popover'; var EVENT_KEY = "." + DATA_KEY; var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; @@ -3166,7 +3168,7 @@ var Popover = function ($$$1) { var _proto = Popover.prototype; - // overrides + // Overrides _proto.isWithContent = function isWithContent() { return this.getTitle() || this._getContent(); }; @@ -3181,7 +3183,7 @@ var Popover = function ($$$1) { }; _proto.setContent = function setContent() { - var $tip = $$$1(this.getTipElement()); // we use append for html objects to maintain js events + var $tip = $$$1(this.getTipElement()); // We use append for html objects to maintain js events this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); @@ -3193,7 +3195,7 @@ var Popover = function ($$$1) { this.setElementContent($tip.find(Selector.CONTENT), content); $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); - }; // private + }; // Private _proto._getContent = function _getContent() { @@ -3207,7 +3209,7 @@ var Popover = function ($$$1) { if (tabClass !== null && tabClass.length > 0) { $tip.removeClass(tabClass.join('')); } - }; // static + }; // Static Popover._jQueryInterface = function _jQueryInterface(config) { @@ -3227,7 +3229,7 @@ var Popover = function ($$$1) { if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -3237,7 +3239,7 @@ var Popover = function ($$$1) { _createClass(Popover, null, [{ key: "VERSION", - // getters + // Getters get: function get() { return VERSION; } @@ -3294,7 +3296,7 @@ var Popover = function ($$$1) { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.3): scrollspy.js + * Bootstrap (v4.0.0): scrollspy.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -3306,7 +3308,7 @@ var ScrollSpy = function ($$$1) { * ------------------------------------------------------------------------ */ var NAME = 'scrollspy'; - var VERSION = '4.0.0-beta.3'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.scrollspy'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -3373,16 +3375,16 @@ var ScrollSpy = function ($$$1) { this.refresh(); this._process(); - } // getters + } // Getters var _proto = ScrollSpy.prototype; - // public + // Public _proto.refresh = function refresh() { var _this2 = this; - var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET; + var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; this._offsets = []; @@ -3401,7 +3403,7 @@ var ScrollSpy = function ($$$1) { var targetBCR = target.getBoundingClientRect(); if (targetBCR.width || targetBCR.height) { - // todo (fat): remove sketch reliance on jQuery position/offset + // TODO (fat): remove sketch reliance on jQuery position/offset return [$$$1(target)[offsetMethod]().top + offsetBase, targetSelector]; } } @@ -3429,7 +3431,7 @@ var ScrollSpy = function ($$$1) { this._targets = null; this._activeTarget = null; this._scrollHeight = null; - }; // private + }; // Private _proto._getConfig = function _getConfig(config) { @@ -3533,7 +3535,7 @@ var ScrollSpy = function ($$$1) { _proto._clear = function _clear() { $$$1(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE); - }; // static + }; // Static ScrollSpy._jQueryInterface = function _jQueryInterface(config) { @@ -3549,7 +3551,7 @@ var ScrollSpy = function ($$$1) { if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -3605,7 +3607,7 @@ var ScrollSpy = function ($$$1) { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.3): tab.js + * Bootstrap (v4.0.0): tab.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -3617,7 +3619,7 @@ var Tab = function ($$$1) { * ------------------------------------------------------------------------ */ var NAME = 'tab'; - var VERSION = '4.0.0-beta.3'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.tab'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -3658,12 +3660,12 @@ var Tab = function ($$$1) { function () { function Tab(element) { this._element = element; - } // getters + } // Getters var _proto = Tab.prototype; - // public + // Public _proto.show = function show() { var _this = this; @@ -3726,7 +3728,7 @@ var Tab = function ($$$1) { _proto.dispose = function dispose() { $$$1.removeData(this._element, DATA_KEY); this._element = null; - }; // private + }; // Private _proto._activate = function _activate(element, container, callback) { @@ -3790,7 +3792,7 @@ var Tab = function ($$$1) { if (callback) { callback(); } - }; // static + }; // Static Tab._jQueryInterface = function _jQueryInterface(config) { @@ -3805,7 +3807,7 @@ var Tab = function ($$$1) { if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -3859,7 +3861,7 @@ var Tab = function ($$$1) { (function ($$$1) { if (typeof $$$1 === 'undefined') { - throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); + throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); } var version = $$$1.fn.jquery.split(' ')[0].split('.'); |