mirror of https://github.com/twbs/bootstrap.git
grunt
This commit is contained in:
parent
5142de7e59
commit
49b6cf845d
|
@ -5686,6 +5686,7 @@ button.close {
|
|||
padding: 8px 14px;
|
||||
margin-bottom: 0;
|
||||
font-size: 1rem;
|
||||
color: inherit;
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
border-top-left-radius: calc(0.3rem - 1px);
|
||||
|
@ -5698,6 +5699,7 @@ button.close {
|
|||
|
||||
.popover-content {
|
||||
padding: 9px 14px;
|
||||
color: #292b2c;
|
||||
}
|
||||
|
||||
.popover::before,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -631,10 +631,9 @@ var Carousel = function ($) {
|
|||
// public
|
||||
|
||||
Carousel.prototype.next = function next() {
|
||||
if (this._isSliding) {
|
||||
throw new Error('Carousel is sliding');
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.NEXT);
|
||||
}
|
||||
this._slide(Direction.NEXT);
|
||||
};
|
||||
|
||||
Carousel.prototype.nextWhenVisible = function nextWhenVisible() {
|
||||
|
@ -645,10 +644,9 @@ var Carousel = function ($) {
|
|||
};
|
||||
|
||||
Carousel.prototype.prev = function prev() {
|
||||
if (this._isSliding) {
|
||||
throw new Error('Carousel is sliding');
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.PREV);
|
||||
}
|
||||
this._slide(Direction.PREV);
|
||||
};
|
||||
|
||||
Carousel.prototype.pause = function pause(event) {
|
||||
|
@ -1117,11 +1115,7 @@ var Collapse = function ($) {
|
|||
Collapse.prototype.show = function show() {
|
||||
var _this6 = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Collapse is transitioning');
|
||||
}
|
||||
|
||||
if ($(this._element).hasClass(ClassName.SHOW)) {
|
||||
if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1194,11 +1188,7 @@ var Collapse = function ($) {
|
|||
Collapse.prototype.hide = function hide() {
|
||||
var _this7 = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Collapse is transitioning');
|
||||
}
|
||||
|
||||
if (!$(this._element).hasClass(ClassName.SHOW)) {
|
||||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1344,7 +1334,7 @@ var Collapse = function ($) {
|
|||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
if (/input|textarea/i.test(event.target.tagName)) {
|
||||
if (!/input|textarea/i.test(event.target.tagName)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
|
@ -1743,7 +1733,6 @@ var Modal = function ($) {
|
|||
this._isShown = false;
|
||||
this._isBodyOverflowing = false;
|
||||
this._ignoreBackdropClick = false;
|
||||
this._isTransitioning = false;
|
||||
this._originalBodyPadding = 0;
|
||||
this._scrollbarWidth = 0;
|
||||
}
|
||||
|
@ -1760,12 +1749,13 @@ var Modal = function ($) {
|
|||
var _this9 = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Modal is transitioning');
|
||||
return;
|
||||
}
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
var showEvent = $.Event(Event.SHOW, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
|
@ -1810,16 +1800,18 @@ var Modal = function ($) {
|
|||
event.preventDefault();
|
||||
}
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Modal is transitioning');
|
||||
if (this._isTransitioning || !this._isShown) {
|
||||
return;
|
||||
}
|
||||
|
||||
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
|
||||
|
||||
if (transition) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
var hideEvent = $.Event(Event.HIDE);
|
||||
|
||||
$(this._element).trigger(hideEvent);
|
||||
|
||||
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
||||
|
@ -1839,6 +1831,7 @@ var Modal = function ($) {
|
|||
$(this._dialog).off(Event.MOUSEDOWN_DISMISS);
|
||||
|
||||
if (transition) {
|
||||
|
||||
$(this._element).one(Util.TRANSITION_END, function (event) {
|
||||
return _this10._hideModal(event);
|
||||
}).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
|
@ -1959,7 +1952,7 @@ var Modal = function ($) {
|
|||
var _this15 = this;
|
||||
|
||||
this._element.style.display = 'none';
|
||||
this._element.setAttribute('aria-hidden', 'true');
|
||||
this._element.setAttribute('aria-hidden', true);
|
||||
this._isTransitioning = false;
|
||||
this._showBackdrop(function () {
|
||||
$(document.body).removeClass(ClassName.OPEN);
|
||||
|
@ -2886,7 +2879,6 @@ var Tooltip = function ($) {
|
|||
this._timeout = 0;
|
||||
this._hoverState = '';
|
||||
this._activeTrigger = {};
|
||||
this._isTransitioning = false;
|
||||
this._tether = null;
|
||||
|
||||
// protected
|
||||
|
@ -2975,9 +2967,6 @@ var Tooltip = function ($) {
|
|||
|
||||
var showEvent = $.Event(this.constructor.Event.SHOW);
|
||||
if (this.isWithContent() && this._isEnabled) {
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Tooltip is transitioning');
|
||||
}
|
||||
$(this.element).trigger(showEvent);
|
||||
|
||||
var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
|
||||
|
@ -3004,7 +2993,11 @@ var Tooltip = function ($) {
|
|||
|
||||
var container = this.config.container === false ? document.body : $(this.config.container);
|
||||
|
||||
$(tip).data(this.constructor.DATA_KEY, this).appendTo(container);
|
||||
$(tip).data(this.constructor.DATA_KEY, this);
|
||||
|
||||
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
|
||||
$(tip).appendTo(container);
|
||||
}
|
||||
|
||||
$(this.element).trigger(this.constructor.Event.INSERTED);
|
||||
|
||||
|
@ -3027,7 +3020,6 @@ var Tooltip = function ($) {
|
|||
var complete = function complete() {
|
||||
var prevHoverState = _this22._hoverState;
|
||||
_this22._hoverState = null;
|
||||
_this22._isTransitioning = false;
|
||||
|
||||
$(_this22.element).trigger(_this22.constructor.Event.SHOWN);
|
||||
|
||||
|
@ -3037,7 +3029,6 @@ var Tooltip = function ($) {
|
|||
};
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
this._isTransitioning = true;
|
||||
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
|
||||
return;
|
||||
}
|
||||
|
@ -3051,9 +3042,6 @@ var Tooltip = function ($) {
|
|||
|
||||
var tip = this.getTipElement();
|
||||
var hideEvent = $.Event(this.constructor.Event.HIDE);
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Tooltip is transitioning');
|
||||
}
|
||||
var complete = function complete() {
|
||||
if (_this23._hoverState !== HoverState.SHOW && tip.parentNode) {
|
||||
tip.parentNode.removeChild(tip);
|
||||
|
@ -3062,7 +3050,6 @@ var Tooltip = function ($) {
|
|||
_this23._cleanTipClass();
|
||||
_this23.element.removeAttribute('aria-describedby');
|
||||
$(_this23.element).trigger(_this23.constructor.Event.HIDDEN);
|
||||
_this23._isTransitioning = false;
|
||||
_this23.cleanupTether();
|
||||
|
||||
if (callback) {
|
||||
|
@ -3083,7 +3070,7 @@ var Tooltip = function ($) {
|
|||
this._activeTrigger[Trigger.HOVER] = false;
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
this._isTransitioning = true;
|
||||
|
||||
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
} else {
|
||||
complete();
|
||||
|
@ -3291,6 +3278,14 @@ var Tooltip = function ($) {
|
|||
};
|
||||
}
|
||||
|
||||
if (config.title && typeof config.title === 'number') {
|
||||
config.title = config.title.toString();
|
||||
}
|
||||
|
||||
if (config.content && typeof config.content === 'number') {
|
||||
config.content = config.content.toString();
|
||||
}
|
||||
|
||||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
|
||||
return config;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5686,6 +5686,7 @@ button.close {
|
|||
padding: 8px 14px;
|
||||
margin-bottom: 0;
|
||||
font-size: 1rem;
|
||||
color: inherit;
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
border-top-left-radius: calc(0.3rem - 1px);
|
||||
|
@ -5698,6 +5699,7 @@ button.close {
|
|||
|
||||
.popover-content {
|
||||
padding: 9px 14px;
|
||||
color: #292b2c;
|
||||
}
|
||||
|
||||
.popover::before,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -631,10 +631,9 @@ var Carousel = function ($) {
|
|||
// public
|
||||
|
||||
Carousel.prototype.next = function next() {
|
||||
if (this._isSliding) {
|
||||
throw new Error('Carousel is sliding');
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.NEXT);
|
||||
}
|
||||
this._slide(Direction.NEXT);
|
||||
};
|
||||
|
||||
Carousel.prototype.nextWhenVisible = function nextWhenVisible() {
|
||||
|
@ -645,10 +644,9 @@ var Carousel = function ($) {
|
|||
};
|
||||
|
||||
Carousel.prototype.prev = function prev() {
|
||||
if (this._isSliding) {
|
||||
throw new Error('Carousel is sliding');
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.PREV);
|
||||
}
|
||||
this._slide(Direction.PREV);
|
||||
};
|
||||
|
||||
Carousel.prototype.pause = function pause(event) {
|
||||
|
@ -1117,11 +1115,7 @@ var Collapse = function ($) {
|
|||
Collapse.prototype.show = function show() {
|
||||
var _this6 = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Collapse is transitioning');
|
||||
}
|
||||
|
||||
if ($(this._element).hasClass(ClassName.SHOW)) {
|
||||
if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1194,11 +1188,7 @@ var Collapse = function ($) {
|
|||
Collapse.prototype.hide = function hide() {
|
||||
var _this7 = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Collapse is transitioning');
|
||||
}
|
||||
|
||||
if (!$(this._element).hasClass(ClassName.SHOW)) {
|
||||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1344,7 +1334,7 @@ var Collapse = function ($) {
|
|||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
if (/input|textarea/i.test(event.target.tagName)) {
|
||||
if (!/input|textarea/i.test(event.target.tagName)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
|
@ -1743,7 +1733,6 @@ var Modal = function ($) {
|
|||
this._isShown = false;
|
||||
this._isBodyOverflowing = false;
|
||||
this._ignoreBackdropClick = false;
|
||||
this._isTransitioning = false;
|
||||
this._originalBodyPadding = 0;
|
||||
this._scrollbarWidth = 0;
|
||||
}
|
||||
|
@ -1760,12 +1749,13 @@ var Modal = function ($) {
|
|||
var _this9 = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Modal is transitioning');
|
||||
return;
|
||||
}
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
var showEvent = $.Event(Event.SHOW, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
|
@ -1810,16 +1800,18 @@ var Modal = function ($) {
|
|||
event.preventDefault();
|
||||
}
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Modal is transitioning');
|
||||
if (this._isTransitioning || !this._isShown) {
|
||||
return;
|
||||
}
|
||||
|
||||
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
|
||||
|
||||
if (transition) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
var hideEvent = $.Event(Event.HIDE);
|
||||
|
||||
$(this._element).trigger(hideEvent);
|
||||
|
||||
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
||||
|
@ -1839,6 +1831,7 @@ var Modal = function ($) {
|
|||
$(this._dialog).off(Event.MOUSEDOWN_DISMISS);
|
||||
|
||||
if (transition) {
|
||||
|
||||
$(this._element).one(Util.TRANSITION_END, function (event) {
|
||||
return _this10._hideModal(event);
|
||||
}).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
|
@ -1959,7 +1952,7 @@ var Modal = function ($) {
|
|||
var _this15 = this;
|
||||
|
||||
this._element.style.display = 'none';
|
||||
this._element.setAttribute('aria-hidden', 'true');
|
||||
this._element.setAttribute('aria-hidden', true);
|
||||
this._isTransitioning = false;
|
||||
this._showBackdrop(function () {
|
||||
$(document.body).removeClass(ClassName.OPEN);
|
||||
|
@ -2886,7 +2879,6 @@ var Tooltip = function ($) {
|
|||
this._timeout = 0;
|
||||
this._hoverState = '';
|
||||
this._activeTrigger = {};
|
||||
this._isTransitioning = false;
|
||||
this._tether = null;
|
||||
|
||||
// protected
|
||||
|
@ -2975,9 +2967,6 @@ var Tooltip = function ($) {
|
|||
|
||||
var showEvent = $.Event(this.constructor.Event.SHOW);
|
||||
if (this.isWithContent() && this._isEnabled) {
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Tooltip is transitioning');
|
||||
}
|
||||
$(this.element).trigger(showEvent);
|
||||
|
||||
var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
|
||||
|
@ -3004,7 +2993,11 @@ var Tooltip = function ($) {
|
|||
|
||||
var container = this.config.container === false ? document.body : $(this.config.container);
|
||||
|
||||
$(tip).data(this.constructor.DATA_KEY, this).appendTo(container);
|
||||
$(tip).data(this.constructor.DATA_KEY, this);
|
||||
|
||||
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
|
||||
$(tip).appendTo(container);
|
||||
}
|
||||
|
||||
$(this.element).trigger(this.constructor.Event.INSERTED);
|
||||
|
||||
|
@ -3027,7 +3020,6 @@ var Tooltip = function ($) {
|
|||
var complete = function complete() {
|
||||
var prevHoverState = _this22._hoverState;
|
||||
_this22._hoverState = null;
|
||||
_this22._isTransitioning = false;
|
||||
|
||||
$(_this22.element).trigger(_this22.constructor.Event.SHOWN);
|
||||
|
||||
|
@ -3037,7 +3029,6 @@ var Tooltip = function ($) {
|
|||
};
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
this._isTransitioning = true;
|
||||
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
|
||||
return;
|
||||
}
|
||||
|
@ -3051,9 +3042,6 @@ var Tooltip = function ($) {
|
|||
|
||||
var tip = this.getTipElement();
|
||||
var hideEvent = $.Event(this.constructor.Event.HIDE);
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Tooltip is transitioning');
|
||||
}
|
||||
var complete = function complete() {
|
||||
if (_this23._hoverState !== HoverState.SHOW && tip.parentNode) {
|
||||
tip.parentNode.removeChild(tip);
|
||||
|
@ -3062,7 +3050,6 @@ var Tooltip = function ($) {
|
|||
_this23._cleanTipClass();
|
||||
_this23.element.removeAttribute('aria-describedby');
|
||||
$(_this23.element).trigger(_this23.constructor.Event.HIDDEN);
|
||||
_this23._isTransitioning = false;
|
||||
_this23.cleanupTether();
|
||||
|
||||
if (callback) {
|
||||
|
@ -3083,7 +3070,7 @@ var Tooltip = function ($) {
|
|||
this._activeTrigger[Trigger.HOVER] = false;
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
this._isTransitioning = true;
|
||||
|
||||
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
} else {
|
||||
complete();
|
||||
|
@ -3291,6 +3278,14 @@ var Tooltip = function ($) {
|
|||
};
|
||||
}
|
||||
|
||||
if (config.title && typeof config.title === 'number') {
|
||||
config.title = config.title.toString();
|
||||
}
|
||||
|
||||
if (config.content && typeof config.content === 'number') {
|
||||
config.content = config.content.toString();
|
||||
}
|
||||
|
||||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
|
||||
return config;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -112,10 +112,9 @@ var Carousel = function ($) {
|
|||
// public
|
||||
|
||||
Carousel.prototype.next = function next() {
|
||||
if (this._isSliding) {
|
||||
throw new Error('Carousel is sliding');
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.NEXT);
|
||||
}
|
||||
this._slide(Direction.NEXT);
|
||||
};
|
||||
|
||||
Carousel.prototype.nextWhenVisible = function nextWhenVisible() {
|
||||
|
@ -126,10 +125,9 @@ var Carousel = function ($) {
|
|||
};
|
||||
|
||||
Carousel.prototype.prev = function prev() {
|
||||
if (this._isSliding) {
|
||||
throw new Error('Carousel is sliding');
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.PREV);
|
||||
}
|
||||
this._slide(Direction.PREV);
|
||||
};
|
||||
|
||||
Carousel.prototype.pause = function pause(event) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -111,11 +111,7 @@ var Collapse = function ($) {
|
|||
Collapse.prototype.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Collapse is transitioning');
|
||||
}
|
||||
|
||||
if ($(this._element).hasClass(ClassName.SHOW)) {
|
||||
if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -188,11 +184,7 @@ var Collapse = function ($) {
|
|||
Collapse.prototype.hide = function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Collapse is transitioning');
|
||||
}
|
||||
|
||||
if (!$(this._element).hasClass(ClassName.SHOW)) {
|
||||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -338,7 +330,7 @@ var Collapse = function ($) {
|
|||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
if (/input|textarea/i.test(event.target.tagName)) {
|
||||
if (!/input|textarea/i.test(event.target.tagName)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -89,7 +89,6 @@ var Modal = function ($) {
|
|||
this._isShown = false;
|
||||
this._isBodyOverflowing = false;
|
||||
this._ignoreBackdropClick = false;
|
||||
this._isTransitioning = false;
|
||||
this._originalBodyPadding = 0;
|
||||
this._scrollbarWidth = 0;
|
||||
}
|
||||
|
@ -106,12 +105,13 @@ var Modal = function ($) {
|
|||
var _this = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Modal is transitioning');
|
||||
return;
|
||||
}
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
var showEvent = $.Event(Event.SHOW, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
|
@ -156,16 +156,18 @@ var Modal = function ($) {
|
|||
event.preventDefault();
|
||||
}
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Modal is transitioning');
|
||||
if (this._isTransitioning || !this._isShown) {
|
||||
return;
|
||||
}
|
||||
|
||||
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
|
||||
|
||||
if (transition) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
var hideEvent = $.Event(Event.HIDE);
|
||||
|
||||
$(this._element).trigger(hideEvent);
|
||||
|
||||
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
||||
|
@ -185,6 +187,7 @@ var Modal = function ($) {
|
|||
$(this._dialog).off(Event.MOUSEDOWN_DISMISS);
|
||||
|
||||
if (transition) {
|
||||
|
||||
$(this._element).one(Util.TRANSITION_END, function (event) {
|
||||
return _this2._hideModal(event);
|
||||
}).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
|
@ -305,7 +308,7 @@ var Modal = function ($) {
|
|||
var _this7 = this;
|
||||
|
||||
this._element.style.display = 'none';
|
||||
this._element.setAttribute('aria-hidden', 'true');
|
||||
this._element.setAttribute('aria-hidden', true);
|
||||
this._isTransitioning = false;
|
||||
this._showBackdrop(function () {
|
||||
$(document.body).removeClass(ClassName.OPEN);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -126,7 +126,6 @@ var Tooltip = function ($) {
|
|||
this._timeout = 0;
|
||||
this._hoverState = '';
|
||||
this._activeTrigger = {};
|
||||
this._isTransitioning = false;
|
||||
this._tether = null;
|
||||
|
||||
// protected
|
||||
|
@ -215,9 +214,6 @@ var Tooltip = function ($) {
|
|||
|
||||
var showEvent = $.Event(this.constructor.Event.SHOW);
|
||||
if (this.isWithContent() && this._isEnabled) {
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Tooltip is transitioning');
|
||||
}
|
||||
$(this.element).trigger(showEvent);
|
||||
|
||||
var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
|
||||
|
@ -244,7 +240,11 @@ var Tooltip = function ($) {
|
|||
|
||||
var container = this.config.container === false ? document.body : $(this.config.container);
|
||||
|
||||
$(tip).data(this.constructor.DATA_KEY, this).appendTo(container);
|
||||
$(tip).data(this.constructor.DATA_KEY, this);
|
||||
|
||||
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
|
||||
$(tip).appendTo(container);
|
||||
}
|
||||
|
||||
$(this.element).trigger(this.constructor.Event.INSERTED);
|
||||
|
||||
|
@ -267,7 +267,6 @@ var Tooltip = function ($) {
|
|||
var complete = function complete() {
|
||||
var prevHoverState = _this._hoverState;
|
||||
_this._hoverState = null;
|
||||
_this._isTransitioning = false;
|
||||
|
||||
$(_this.element).trigger(_this.constructor.Event.SHOWN);
|
||||
|
||||
|
@ -277,7 +276,6 @@ var Tooltip = function ($) {
|
|||
};
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
this._isTransitioning = true;
|
||||
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
|
||||
return;
|
||||
}
|
||||
|
@ -291,9 +289,6 @@ var Tooltip = function ($) {
|
|||
|
||||
var tip = this.getTipElement();
|
||||
var hideEvent = $.Event(this.constructor.Event.HIDE);
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Tooltip is transitioning');
|
||||
}
|
||||
var complete = function complete() {
|
||||
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
|
||||
tip.parentNode.removeChild(tip);
|
||||
|
@ -302,7 +297,6 @@ var Tooltip = function ($) {
|
|||
_this2._cleanTipClass();
|
||||
_this2.element.removeAttribute('aria-describedby');
|
||||
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
|
||||
_this2._isTransitioning = false;
|
||||
_this2.cleanupTether();
|
||||
|
||||
if (callback) {
|
||||
|
@ -323,7 +317,7 @@ var Tooltip = function ($) {
|
|||
this._activeTrigger[Trigger.HOVER] = false;
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
this._isTransitioning = true;
|
||||
|
||||
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
} else {
|
||||
complete();
|
||||
|
@ -531,6 +525,14 @@ var Tooltip = function ($) {
|
|||
};
|
||||
}
|
||||
|
||||
if (config.title && typeof config.title === 'number') {
|
||||
config.title = config.title.toString();
|
||||
}
|
||||
|
||||
if (config.content && typeof config.content === 'number') {
|
||||
config.content = config.content.toString();
|
||||
}
|
||||
|
||||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
|
||||
return config;
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue