mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-17 11:00:56 +02:00
dist
This commit is contained in:
2
js/dist/button.js
vendored
2
js/dist/button.js
vendored
@@ -47,7 +47,7 @@
|
||||
var Selector = {
|
||||
DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
|
||||
DATA_TOGGLE: '[data-toggle="buttons"]',
|
||||
INPUT: 'input',
|
||||
INPUT: 'input:not([type="hidden"])',
|
||||
ACTIVE: '.active',
|
||||
BUTTON: '.btn'
|
||||
};
|
||||
|
2
js/dist/button.js.map
vendored
2
js/dist/button.js.map
vendored
File diff suppressed because one or more lines are too long
2
js/dist/dropdown.js
vendored
2
js/dist/dropdown.js
vendored
@@ -502,7 +502,7 @@
|
||||
|
||||
var isActive = $(parent).hasClass(ClassName.SHOW);
|
||||
|
||||
if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
|
||||
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
var toggle = parent.querySelector(Selector.DATA_TOGGLE);
|
||||
$(toggle).trigger('focus');
|
||||
|
2
js/dist/dropdown.js.map
vendored
2
js/dist/dropdown.js.map
vendored
File diff suppressed because one or more lines are too long
4
js/dist/modal.js
vendored
4
js/dist/modal.js
vendored
@@ -285,6 +285,8 @@
|
||||
|
||||
this._element.removeAttribute('aria-hidden');
|
||||
|
||||
this._element.setAttribute('aria-modal', true);
|
||||
|
||||
this._element.scrollTop = 0;
|
||||
|
||||
if (transition) {
|
||||
@@ -364,6 +366,8 @@
|
||||
|
||||
this._element.setAttribute('aria-hidden', true);
|
||||
|
||||
this._element.removeAttribute('aria-modal');
|
||||
|
||||
this._isTransitioning = false;
|
||||
|
||||
this._showBackdrop(function () {
|
||||
|
2
js/dist/modal.js.map
vendored
2
js/dist/modal.js.map
vendored
File diff suppressed because one or more lines are too long
13
js/dist/toast.js
vendored
13
js/dist/toast.js
vendored
@@ -83,7 +83,8 @@
|
||||
var ClassName = {
|
||||
FADE: 'fade',
|
||||
HIDE: 'hide',
|
||||
SHOW: 'show'
|
||||
SHOW: 'show',
|
||||
SHOWING: 'showing'
|
||||
};
|
||||
var DefaultType = {
|
||||
animation: 'boolean',
|
||||
@@ -130,6 +131,10 @@
|
||||
}
|
||||
|
||||
var complete = function complete() {
|
||||
_this._element.classList.remove(ClassName.SHOWING);
|
||||
|
||||
_this._element.classList.add(ClassName.SHOW);
|
||||
|
||||
$(_this._element).trigger(Event.SHOWN);
|
||||
|
||||
if (_this._config.autohide) {
|
||||
@@ -137,7 +142,9 @@
|
||||
}
|
||||
};
|
||||
|
||||
this._element.classList.add(ClassName.SHOW);
|
||||
this._element.classList.remove(ClassName.HIDE);
|
||||
|
||||
this._element.classList.add(ClassName.SHOWING);
|
||||
|
||||
if (this._config.animation) {
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||
@@ -198,6 +205,8 @@
|
||||
var _this4 = this;
|
||||
|
||||
var complete = function complete() {
|
||||
_this4._element.classList.add(ClassName.HIDE);
|
||||
|
||||
$(_this4._element).trigger(Event.HIDDEN);
|
||||
};
|
||||
|
||||
|
2
js/dist/toast.js.map
vendored
2
js/dist/toast.js.map
vendored
File diff suppressed because one or more lines are too long
19
js/dist/tooltip.js
vendored
19
js/dist/tooltip.js
vendored
@@ -259,7 +259,8 @@
|
||||
|
||||
if (this.isWithContent() && this._isEnabled) {
|
||||
$(this.element).trigger(showEvent);
|
||||
var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
|
||||
var shadowRoot = Util.findShadowRoot(this.element);
|
||||
var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
|
||||
|
||||
if (showEvent.isDefaultPrevented() || !isInTheDom) {
|
||||
return;
|
||||
@@ -280,7 +281,9 @@
|
||||
var attachment = this._getAttachment(placement);
|
||||
|
||||
this.addAttachmentClass(attachment);
|
||||
var container = this.config.container === false ? document.body : $(document).find(this.config.container);
|
||||
|
||||
var container = this._getContainer();
|
||||
|
||||
$(tip).data(this.constructor.DATA_KEY, this);
|
||||
|
||||
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
|
||||
@@ -452,6 +455,18 @@
|
||||
}; // Private
|
||||
|
||||
|
||||
_proto._getContainer = function _getContainer() {
|
||||
if (this.config.container === false) {
|
||||
return document.body;
|
||||
}
|
||||
|
||||
if (Util.isElement(this.config.container)) {
|
||||
return $(this.config.container);
|
||||
}
|
||||
|
||||
return $(document).find(this.config.container);
|
||||
};
|
||||
|
||||
_proto._getAttachment = function _getAttachment(placement) {
|
||||
return AttachmentMap[placement.toUpperCase()];
|
||||
};
|
||||
|
2
js/dist/tooltip.js.map
vendored
2
js/dist/tooltip.js.map
vendored
File diff suppressed because one or more lines are too long
22
js/dist/util.js
vendored
22
js/dist/util.js
vendored
@@ -136,6 +136,28 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
findShadowRoot: function findShadowRoot(element) {
|
||||
if (!document.documentElement.attachShadow) {
|
||||
return null;
|
||||
} // Can find the shadow root otherwise it'll return the document
|
||||
|
||||
|
||||
if (typeof element.getRootNode === 'function') {
|
||||
var root = element.getRootNode();
|
||||
return root instanceof ShadowRoot ? root : null;
|
||||
}
|
||||
|
||||
if (element instanceof ShadowRoot) {
|
||||
return element;
|
||||
} // when we don't find a shadow root
|
||||
|
||||
|
||||
if (!element.parentNode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Util.findShadowRoot(element.parentNode);
|
||||
}
|
||||
};
|
||||
setTransitionEndSupport();
|
||||
|
2
js/dist/util.js.map
vendored
2
js/dist/util.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user