diff options
author | Mario <mario@mariovavti.com> | 2021-03-08 09:31:23 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-03-08 09:31:23 +0000 |
commit | 951e9c8c4f39dd8577834d5bc501c05d80722de9 (patch) | |
tree | 6a42c6a229c7b2b3e13bc5af77a733d054242695 /vendor/twbs/bootstrap/js/dist/modal.js | |
parent | f94b046333c57acde493ee5dc2511acc6baca701 (diff) | |
parent | 89415e17313578eb115c441480b6e0ddfa90afef (diff) | |
download | volse-hubzilla-951e9c8c4f39dd8577834d5bc501c05d80722de9.tar.gz volse-hubzilla-951e9c8c4f39dd8577834d5bc501c05d80722de9.tar.bz2 volse-hubzilla-951e9c8c4f39dd8577834d5bc501c05d80722de9.zip |
Merge branch '5.4RC'5.4
Diffstat (limited to 'vendor/twbs/bootstrap/js/dist/modal.js')
-rw-r--r-- | vendor/twbs/bootstrap/js/dist/modal.js | 95 |
1 files changed, 62 insertions, 33 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/modal.js b/vendor/twbs/bootstrap/js/dist/modal.js index 92a9c77b6..f3738fbd7 100644 --- a/vendor/twbs/bootstrap/js/dist/modal.js +++ b/vendor/twbs/bootstrap/js/dist/modal.js @@ -1,11 +1,11 @@ /*! - * Bootstrap modal.js v4.5.3 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap modal.js v4.6.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : - typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : + typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.jQuery, global.Util)); }(this, (function ($, Util) { 'use strict'; @@ -14,11 +14,40 @@ var $__default = /*#__PURE__*/_interopDefaultLegacy($); var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util); - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + 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); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; - 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 _extends.apply(this, arguments); + } - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } /** * ------------------------------------------------------------------------ * Constants @@ -26,7 +55,7 @@ */ var NAME = 'modal'; - var VERSION = '4.5.3'; + var VERSION = '4.6.0'; var DATA_KEY = 'bs.modal'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -226,38 +255,34 @@ _proto._triggerBackdropTransition = function _triggerBackdropTransition() { var _this3 = this; - if (this._config.backdrop === 'static') { - var hideEventPrevented = $__default['default'].Event(EVENT_HIDE_PREVENTED); - $__default['default'](this._element).trigger(hideEventPrevented); + var hideEventPrevented = $__default['default'].Event(EVENT_HIDE_PREVENTED); + $__default['default'](this._element).trigger(hideEventPrevented); - if (hideEventPrevented.isDefaultPrevented()) { - return; - } + if (hideEventPrevented.isDefaultPrevented()) { + return; + } - var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; + var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; - if (!isModalOverflowing) { - this._element.style.overflowY = 'hidden'; - } + if (!isModalOverflowing) { + this._element.style.overflowY = 'hidden'; + } - this._element.classList.add(CLASS_NAME_STATIC); + this._element.classList.add(CLASS_NAME_STATIC); - var modalTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._dialog); - $__default['default'](this._element).off(Util__default['default'].TRANSITION_END); - $__default['default'](this._element).one(Util__default['default'].TRANSITION_END, function () { - _this3._element.classList.remove(CLASS_NAME_STATIC); + var modalTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._dialog); + $__default['default'](this._element).off(Util__default['default'].TRANSITION_END); + $__default['default'](this._element).one(Util__default['default'].TRANSITION_END, function () { + _this3._element.classList.remove(CLASS_NAME_STATIC); - if (!isModalOverflowing) { - $__default['default'](_this3._element).one(Util__default['default'].TRANSITION_END, function () { - _this3._element.style.overflowY = ''; - }).emulateTransitionEnd(_this3._element, modalTransitionDuration); - } - }).emulateTransitionEnd(modalTransitionDuration); + if (!isModalOverflowing) { + $__default['default'](_this3._element).one(Util__default['default'].TRANSITION_END, function () { + _this3._element.style.overflowY = ''; + }).emulateTransitionEnd(_this3._element, modalTransitionDuration); + } + }).emulateTransitionEnd(modalTransitionDuration); - this._element.focus(); - } else { - this.hide(); - } + this._element.focus(); }; _proto._showElement = function _showElement(relatedTarget) { @@ -412,7 +437,11 @@ return; } - _this9._triggerBackdropTransition(); + if (_this9._config.backdrop === 'static') { + _this9._triggerBackdropTransition(); + } else { + _this9.hide(); + } }); if (animate) { |