2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00
This commit is contained in:
Mark Otto
2016-12-19 21:48:24 -08:00
parent 8eeb71c91c
commit ab38529dcc
34 changed files with 170 additions and 170 deletions
+9 -9
View File
@@ -3304,7 +3304,7 @@ input[type="button"].btn-block {
transition: opacity 0.15s linear; transition: opacity 0.15s linear;
} }
.fade.active { .fade.show {
opacity: 1; opacity: 1;
} }
@@ -3312,15 +3312,15 @@ input[type="button"].btn-block {
display: none; display: none;
} }
.collapse.active { .collapse.show {
display: block; display: block;
} }
tr.collapse.active { tr.collapse.show {
display: table-row; display: table-row;
} }
tbody.collapse.active { tbody.collapse.show {
display: table-row-group; display: table-row-group;
} }
@@ -3425,11 +3425,11 @@ tbody.collapse.active {
filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)"; filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)";
} }
.active > .dropdown-menu { .show > .dropdown-menu {
display: block; display: block;
} }
.active > a { .show > a {
outline: 0; outline: 0;
} }
@@ -5756,7 +5756,7 @@ button.close {
transform: translate(0, -25%); transform: translate(0, -25%);
} }
.modal.active .modal-dialog { .modal.show .modal-dialog {
-webkit-transform: translate(0, 0); -webkit-transform: translate(0, 0);
-ms-transform: translate(0, 0); -ms-transform: translate(0, 0);
-o-transform: translate(0, 0); -o-transform: translate(0, 0);
@@ -5798,7 +5798,7 @@ button.close {
opacity: 0; opacity: 0;
} }
.modal-backdrop.active { .modal-backdrop.show {
opacity: 0.5; opacity: 0.5;
} }
@@ -5886,7 +5886,7 @@ button.close {
opacity: 0; opacity: 0;
} }
.tooltip.active { .tooltip.show {
opacity: 0.9; opacity: 0.9;
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+9 -9
View File
@@ -3004,7 +3004,7 @@ input[type="button"].btn-block {
transition: opacity 0.15s linear; transition: opacity 0.15s linear;
} }
.fade.active { .fade.show {
opacity: 1; opacity: 1;
} }
@@ -3012,15 +3012,15 @@ input[type="button"].btn-block {
display: none; display: none;
} }
.collapse.active { .collapse.show {
display: block; display: block;
} }
tr.collapse.active { tr.collapse.show {
display: table-row; display: table-row;
} }
tbody.collapse.active { tbody.collapse.show {
display: table-row-group; display: table-row-group;
} }
@@ -3125,11 +3125,11 @@ tbody.collapse.active {
filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)"; filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)";
} }
.active > .dropdown-menu { .show > .dropdown-menu {
display: block; display: block;
} }
.active > a { .show > a {
outline: 0; outline: 0;
} }
@@ -5406,7 +5406,7 @@ button.close {
transform: translate(0, -25%); transform: translate(0, -25%);
} }
.modal.active .modal-dialog { .modal.show .modal-dialog {
-webkit-transform: translate(0, 0); -webkit-transform: translate(0, 0);
-ms-transform: translate(0, 0); -ms-transform: translate(0, 0);
-o-transform: translate(0, 0); -o-transform: translate(0, 0);
@@ -5448,7 +5448,7 @@ button.close {
opacity: 0; opacity: 0;
} }
.modal-backdrop.active { .modal-backdrop.show {
opacity: 0.5; opacity: 0.5;
} }
@@ -5536,7 +5536,7 @@ button.close {
opacity: 0; opacity: 0;
} }
.tooltip.active { .tooltip.show {
opacity: 0.9; opacity: 0.9;
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+37 -37
View File
@@ -214,7 +214,7 @@ var Alert = function ($) {
var ClassName = { var ClassName = {
ALERT: 'alert', ALERT: 'alert',
FADE: 'fade', FADE: 'fade',
ACTIVE: 'active' SHOW: 'show'
}; };
/** /**
@@ -279,7 +279,7 @@ var Alert = function ($) {
Alert.prototype._removeElement = function _removeElement(element) { Alert.prototype._removeElement = function _removeElement(element) {
var _this2 = this; var _this2 = this;
$(element).removeClass(ClassName.ACTIVE); $(element).removeClass(ClassName.SHOW);
if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
this._destroyElement(element); this._destroyElement(element);
@@ -1041,7 +1041,7 @@ var Collapse = function ($) {
}; };
var ClassName = { var ClassName = {
ACTIVE: 'active', SHOW: 'show',
COLLAPSE: 'collapse', COLLAPSE: 'collapse',
COLLAPSING: 'collapsing', COLLAPSING: 'collapsing',
COLLAPSED: 'collapsed' COLLAPSED: 'collapsed'
@@ -1053,7 +1053,7 @@ var Collapse = function ($) {
}; };
var Selector = { var Selector = {
ACTIVES: '.card > .active, .card > .collapsing', ACTIVES: '.card > .show, .card > .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]' DATA_TOGGLE: '[data-toggle="collapse"]'
}; };
@@ -1088,7 +1088,7 @@ var Collapse = function ($) {
// public // public
Collapse.prototype.toggle = function toggle() { Collapse.prototype.toggle = function toggle() {
if ($(this._element).hasClass(ClassName.ACTIVE)) { if ($(this._element).hasClass(ClassName.SHOW)) {
this.hide(); this.hide();
} else { } else {
this.show(); this.show();
@@ -1102,7 +1102,7 @@ var Collapse = function ($) {
throw new Error('Collapse is transitioning'); throw new Error('Collapse is transitioning');
} }
if ($(this._element).hasClass(ClassName.ACTIVE)) { if ($(this._element).hasClass(ClassName.SHOW)) {
return; return;
} }
@@ -1150,7 +1150,7 @@ var Collapse = function ($) {
this.setTransitioning(true); this.setTransitioning(true);
var complete = function complete() { var complete = function complete() {
$(_this6._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.ACTIVE); $(_this6._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
_this6._element.style[dimension] = ''; _this6._element.style[dimension] = '';
@@ -1179,7 +1179,7 @@ var Collapse = function ($) {
throw new Error('Collapse is transitioning'); throw new Error('Collapse is transitioning');
} }
if (!$(this._element).hasClass(ClassName.ACTIVE)) { if (!$(this._element).hasClass(ClassName.SHOW)) {
return; return;
} }
@@ -1196,7 +1196,7 @@ var Collapse = function ($) {
Util.reflow(this._element); Util.reflow(this._element);
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.ACTIVE); $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
this._element.setAttribute('aria-expanded', false); this._element.setAttribute('aria-expanded', false);
@@ -1264,7 +1264,7 @@ var Collapse = function ($) {
Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
if (element) { if (element) {
var isOpen = $(element).hasClass(ClassName.ACTIVE); var isOpen = $(element).hasClass(ClassName.SHOW);
element.setAttribute('aria-expanded', isOpen); element.setAttribute('aria-expanded', isOpen);
if (triggerArray.length) { if (triggerArray.length) {
@@ -1390,7 +1390,7 @@ var Dropdown = function ($) {
var ClassName = { var ClassName = {
BACKDROP: 'dropdown-backdrop', BACKDROP: 'dropdown-backdrop',
DISABLED: 'disabled', DISABLED: 'disabled',
ACTIVE: 'active' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -1428,7 +1428,7 @@ var Dropdown = function ($) {
} }
var parent = Dropdown._getParentFromElement(this); var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(ClassName.ACTIVE); var isActive = $(parent).hasClass(ClassName.SHOW);
Dropdown._clearMenus(); Dropdown._clearMenus();
@@ -1459,7 +1459,7 @@ var Dropdown = function ($) {
this.focus(); this.focus();
this.setAttribute('aria-expanded', true); this.setAttribute('aria-expanded', true);
$(parent).toggleClass(ClassName.ACTIVE); $(parent).toggleClass(ClassName.SHOW);
$(parent).trigger($.Event(Event.SHOWN, relatedTarget)); $(parent).trigger($.Event(Event.SHOWN, relatedTarget));
return false; return false;
@@ -1515,7 +1515,7 @@ var Dropdown = function ($) {
relatedTarget: toggles[i] relatedTarget: toggles[i]
}; };
if (!$(parent).hasClass(ClassName.ACTIVE)) { if (!$(parent).hasClass(ClassName.SHOW)) {
continue; continue;
} }
@@ -1531,7 +1531,7 @@ var Dropdown = function ($) {
toggles[i].setAttribute('aria-expanded', 'false'); toggles[i].setAttribute('aria-expanded', 'false');
$(parent).removeClass(ClassName.ACTIVE).trigger($.Event(Event.HIDDEN, relatedTarget)); $(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
} }
}; };
@@ -1559,7 +1559,7 @@ var Dropdown = function ($) {
} }
var parent = Dropdown._getParentFromElement(this); var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(ClassName.ACTIVE); var isActive = $(parent).hasClass(ClassName.SHOW);
if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) { if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) {
@@ -1691,7 +1691,7 @@ var Modal = function ($) {
BACKDROP: 'modal-backdrop', BACKDROP: 'modal-backdrop',
OPEN: 'modal-open', OPEN: 'modal-open',
FADE: 'fade', FADE: 'fade',
ACTIVE: 'active' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -1808,7 +1808,7 @@ var Modal = function ($) {
$(document).off(Event.FOCUSIN); $(document).off(Event.FOCUSIN);
$(this._element).removeClass(ClassName.ACTIVE); $(this._element).removeClass(ClassName.SHOW);
$(this._element).off(Event.CLICK_DISMISS); $(this._element).off(Event.CLICK_DISMISS);
$(this._dialog).off(Event.MOUSEDOWN_DISMISS); $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
@@ -1864,7 +1864,7 @@ var Modal = function ($) {
Util.reflow(this._element); Util.reflow(this._element);
} }
$(this._element).addClass(ClassName.ACTIVE); $(this._element).addClass(ClassName.SHOW);
if (this._config.focus) { if (this._config.focus) {
this._enforceFocus(); this._enforceFocus();
@@ -1983,7 +1983,7 @@ var Modal = function ($) {
Util.reflow(this._backdrop); Util.reflow(this._backdrop);
} }
$(this._backdrop).addClass(ClassName.ACTIVE); $(this._backdrop).addClass(ClassName.SHOW);
if (!callback) { if (!callback) {
return; return;
@@ -1996,7 +1996,7 @@ var Modal = function ($) {
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
} else if (!this._isShown && this._backdrop) { } else if (!this._isShown && this._backdrop) {
$(this._backdrop).removeClass(ClassName.ACTIVE); $(this._backdrop).removeClass(ClassName.SHOW);
var callbackRemove = function callbackRemove() { var callbackRemove = function callbackRemove() {
_this16._removeBackdrop(); _this16._removeBackdrop();
@@ -2509,7 +2509,7 @@ var Tab = function ($) {
DROPDOWN_MENU: 'dropdown-menu', DROPDOWN_MENU: 'dropdown-menu',
ACTIVE: 'active', ACTIVE: 'active',
FADE: 'fade', FADE: 'fade',
IN: 'in' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -2627,7 +2627,7 @@ var Tab = function ($) {
} }
if (active) { if (active) {
$(active).removeClass(ClassName.IN); $(active).removeClass(ClassName.SHOW);
} }
}; };
@@ -2649,7 +2649,7 @@ var Tab = function ($) {
if (isTransitioning) { if (isTransitioning) {
Util.reflow(element); Util.reflow(element);
$(element).addClass(ClassName.IN); $(element).addClass(ClassName.SHOW);
} else { } else {
$(element).removeClass(ClassName.FADE); $(element).removeClass(ClassName.FADE);
} }
@@ -2796,7 +2796,7 @@ var Tooltip = function ($) {
}; };
var HoverState = { var HoverState = {
ACTIVE: 'active', SHOW: 'show',
OUT: 'out' OUT: 'out'
}; };
@@ -2815,7 +2815,7 @@ var Tooltip = function ($) {
var ClassName = { var ClassName = {
FADE: 'fade', FADE: 'fade',
ACTIVE: 'active' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -2896,7 +2896,7 @@ var Tooltip = function ($) {
} }
} else { } else {
if ($(this.getTipElement()).hasClass(ClassName.ACTIVE)) { if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
this._leave(null, this); this._leave(null, this);
return; return;
} }
@@ -2986,7 +2986,7 @@ var Tooltip = function ($) {
Util.reflow(tip); Util.reflow(tip);
this._tether.position(); this._tether.position();
$(tip).addClass(ClassName.ACTIVE); $(tip).addClass(ClassName.SHOW);
var complete = function complete() { var complete = function complete() {
var prevHoverState = _this22._hoverState; var prevHoverState = _this22._hoverState;
@@ -3019,7 +3019,7 @@ var Tooltip = function ($) {
throw new Error('Tooltip is transitioning'); throw new Error('Tooltip is transitioning');
} }
var complete = function complete() { var complete = function complete() {
if (_this23._hoverState !== HoverState.ACTIVE && tip.parentNode) { if (_this23._hoverState !== HoverState.SHOW && tip.parentNode) {
tip.parentNode.removeChild(tip); tip.parentNode.removeChild(tip);
} }
@@ -3039,7 +3039,7 @@ var Tooltip = function ($) {
return; return;
} }
$(tip).removeClass(ClassName.ACTIVE); $(tip).removeClass(ClassName.SHOW);
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
this._isTransitioning = true; this._isTransitioning = true;
@@ -3066,7 +3066,7 @@ var Tooltip = function ($) {
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
$tip.removeClass(ClassName.FADE + ' ' + ClassName.ACTIVE); $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
this.cleanupTether(); this.cleanupTether();
}; };
@@ -3167,14 +3167,14 @@ var Tooltip = function ($) {
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
} }
if ($(context.getTipElement()).hasClass(ClassName.ACTIVE) || context._hoverState === HoverState.ACTIVE) { if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
context._hoverState = HoverState.ACTIVE; context._hoverState = HoverState.SHOW;
return; return;
} }
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HoverState.ACTIVE; context._hoverState = HoverState.SHOW;
if (!context.config.delay || !context.config.delay.show) { if (!context.config.delay || !context.config.delay.show) {
context.show(); context.show();
@@ -3182,7 +3182,7 @@ var Tooltip = function ($) {
} }
context._timeout = setTimeout(function () { context._timeout = setTimeout(function () {
if (context._hoverState === HoverState.ACTIVE) { if (context._hoverState === HoverState.SHOW) {
context.show(); context.show();
} }
}, context.config.delay.show); }, context.config.delay.show);
@@ -3376,7 +3376,7 @@ var Popover = function ($) {
var ClassName = { var ClassName = {
FADE: 'fade', FADE: 'fade',
ACTIVE: 'active' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -3429,7 +3429,7 @@ var Popover = function ($) {
this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
this.setElementContent($tip.find(Selector.CONTENT), this._getContent()); this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
$tip.removeClass(ClassName.FADE + ' ' + ClassName.ACTIVE); $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
this.cleanupTether(); this.cleanupTether();
}; };
+2 -2
View File
File diff suppressed because one or more lines are too long
+9 -9
View File
@@ -3304,7 +3304,7 @@ input[type="button"].btn-block {
transition: opacity 0.15s linear; transition: opacity 0.15s linear;
} }
.fade.active { .fade.show {
opacity: 1; opacity: 1;
} }
@@ -3312,15 +3312,15 @@ input[type="button"].btn-block {
display: none; display: none;
} }
.collapse.active { .collapse.show {
display: block; display: block;
} }
tr.collapse.active { tr.collapse.show {
display: table-row; display: table-row;
} }
tbody.collapse.active { tbody.collapse.show {
display: table-row-group; display: table-row-group;
} }
@@ -3425,11 +3425,11 @@ tbody.collapse.active {
filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)"; filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)";
} }
.active > .dropdown-menu { .show > .dropdown-menu {
display: block; display: block;
} }
.active > a { .show > a {
outline: 0; outline: 0;
} }
@@ -5756,7 +5756,7 @@ button.close {
transform: translate(0, -25%); transform: translate(0, -25%);
} }
.modal.active .modal-dialog { .modal.show .modal-dialog {
-webkit-transform: translate(0, 0); -webkit-transform: translate(0, 0);
-ms-transform: translate(0, 0); -ms-transform: translate(0, 0);
-o-transform: translate(0, 0); -o-transform: translate(0, 0);
@@ -5798,7 +5798,7 @@ button.close {
opacity: 0; opacity: 0;
} }
.modal-backdrop.active { .modal-backdrop.show {
opacity: 0.5; opacity: 0.5;
} }
@@ -5886,7 +5886,7 @@ button.close {
opacity: 0; opacity: 0;
} }
.tooltip.active { .tooltip.show {
opacity: 0.9; opacity: 0.9;
} }
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
+9 -9
View File
@@ -3004,7 +3004,7 @@ input[type="button"].btn-block {
transition: opacity 0.15s linear; transition: opacity 0.15s linear;
} }
.fade.active { .fade.show {
opacity: 1; opacity: 1;
} }
@@ -3012,15 +3012,15 @@ input[type="button"].btn-block {
display: none; display: none;
} }
.collapse.active { .collapse.show {
display: block; display: block;
} }
tr.collapse.active { tr.collapse.show {
display: table-row; display: table-row;
} }
tbody.collapse.active { tbody.collapse.show {
display: table-row-group; display: table-row-group;
} }
@@ -3125,11 +3125,11 @@ tbody.collapse.active {
filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)"; filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)";
} }
.active > .dropdown-menu { .show > .dropdown-menu {
display: block; display: block;
} }
.active > a { .show > a {
outline: 0; outline: 0;
} }
@@ -5406,7 +5406,7 @@ button.close {
transform: translate(0, -25%); transform: translate(0, -25%);
} }
.modal.active .modal-dialog { .modal.show .modal-dialog {
-webkit-transform: translate(0, 0); -webkit-transform: translate(0, 0);
-ms-transform: translate(0, 0); -ms-transform: translate(0, 0);
-o-transform: translate(0, 0); -o-transform: translate(0, 0);
@@ -5448,7 +5448,7 @@ button.close {
opacity: 0; opacity: 0;
} }
.modal-backdrop.active { .modal-backdrop.show {
opacity: 0.5; opacity: 0.5;
} }
@@ -5536,7 +5536,7 @@ button.close {
opacity: 0; opacity: 0;
} }
.tooltip.active { .tooltip.show {
opacity: 0.9; opacity: 0.9;
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+37 -37
View File
@@ -214,7 +214,7 @@ var Alert = function ($) {
var ClassName = { var ClassName = {
ALERT: 'alert', ALERT: 'alert',
FADE: 'fade', FADE: 'fade',
ACTIVE: 'active' SHOW: 'show'
}; };
/** /**
@@ -279,7 +279,7 @@ var Alert = function ($) {
Alert.prototype._removeElement = function _removeElement(element) { Alert.prototype._removeElement = function _removeElement(element) {
var _this2 = this; var _this2 = this;
$(element).removeClass(ClassName.ACTIVE); $(element).removeClass(ClassName.SHOW);
if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
this._destroyElement(element); this._destroyElement(element);
@@ -1041,7 +1041,7 @@ var Collapse = function ($) {
}; };
var ClassName = { var ClassName = {
ACTIVE: 'active', SHOW: 'show',
COLLAPSE: 'collapse', COLLAPSE: 'collapse',
COLLAPSING: 'collapsing', COLLAPSING: 'collapsing',
COLLAPSED: 'collapsed' COLLAPSED: 'collapsed'
@@ -1053,7 +1053,7 @@ var Collapse = function ($) {
}; };
var Selector = { var Selector = {
ACTIVES: '.card > .active, .card > .collapsing', ACTIVES: '.card > .show, .card > .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]' DATA_TOGGLE: '[data-toggle="collapse"]'
}; };
@@ -1088,7 +1088,7 @@ var Collapse = function ($) {
// public // public
Collapse.prototype.toggle = function toggle() { Collapse.prototype.toggle = function toggle() {
if ($(this._element).hasClass(ClassName.ACTIVE)) { if ($(this._element).hasClass(ClassName.SHOW)) {
this.hide(); this.hide();
} else { } else {
this.show(); this.show();
@@ -1102,7 +1102,7 @@ var Collapse = function ($) {
throw new Error('Collapse is transitioning'); throw new Error('Collapse is transitioning');
} }
if ($(this._element).hasClass(ClassName.ACTIVE)) { if ($(this._element).hasClass(ClassName.SHOW)) {
return; return;
} }
@@ -1150,7 +1150,7 @@ var Collapse = function ($) {
this.setTransitioning(true); this.setTransitioning(true);
var complete = function complete() { var complete = function complete() {
$(_this6._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.ACTIVE); $(_this6._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
_this6._element.style[dimension] = ''; _this6._element.style[dimension] = '';
@@ -1179,7 +1179,7 @@ var Collapse = function ($) {
throw new Error('Collapse is transitioning'); throw new Error('Collapse is transitioning');
} }
if (!$(this._element).hasClass(ClassName.ACTIVE)) { if (!$(this._element).hasClass(ClassName.SHOW)) {
return; return;
} }
@@ -1196,7 +1196,7 @@ var Collapse = function ($) {
Util.reflow(this._element); Util.reflow(this._element);
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.ACTIVE); $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
this._element.setAttribute('aria-expanded', false); this._element.setAttribute('aria-expanded', false);
@@ -1264,7 +1264,7 @@ var Collapse = function ($) {
Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
if (element) { if (element) {
var isOpen = $(element).hasClass(ClassName.ACTIVE); var isOpen = $(element).hasClass(ClassName.SHOW);
element.setAttribute('aria-expanded', isOpen); element.setAttribute('aria-expanded', isOpen);
if (triggerArray.length) { if (triggerArray.length) {
@@ -1390,7 +1390,7 @@ var Dropdown = function ($) {
var ClassName = { var ClassName = {
BACKDROP: 'dropdown-backdrop', BACKDROP: 'dropdown-backdrop',
DISABLED: 'disabled', DISABLED: 'disabled',
ACTIVE: 'active' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -1428,7 +1428,7 @@ var Dropdown = function ($) {
} }
var parent = Dropdown._getParentFromElement(this); var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(ClassName.ACTIVE); var isActive = $(parent).hasClass(ClassName.SHOW);
Dropdown._clearMenus(); Dropdown._clearMenus();
@@ -1459,7 +1459,7 @@ var Dropdown = function ($) {
this.focus(); this.focus();
this.setAttribute('aria-expanded', true); this.setAttribute('aria-expanded', true);
$(parent).toggleClass(ClassName.ACTIVE); $(parent).toggleClass(ClassName.SHOW);
$(parent).trigger($.Event(Event.SHOWN, relatedTarget)); $(parent).trigger($.Event(Event.SHOWN, relatedTarget));
return false; return false;
@@ -1515,7 +1515,7 @@ var Dropdown = function ($) {
relatedTarget: toggles[i] relatedTarget: toggles[i]
}; };
if (!$(parent).hasClass(ClassName.ACTIVE)) { if (!$(parent).hasClass(ClassName.SHOW)) {
continue; continue;
} }
@@ -1531,7 +1531,7 @@ var Dropdown = function ($) {
toggles[i].setAttribute('aria-expanded', 'false'); toggles[i].setAttribute('aria-expanded', 'false');
$(parent).removeClass(ClassName.ACTIVE).trigger($.Event(Event.HIDDEN, relatedTarget)); $(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
} }
}; };
@@ -1559,7 +1559,7 @@ var Dropdown = function ($) {
} }
var parent = Dropdown._getParentFromElement(this); var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(ClassName.ACTIVE); var isActive = $(parent).hasClass(ClassName.SHOW);
if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) { if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) {
@@ -1691,7 +1691,7 @@ var Modal = function ($) {
BACKDROP: 'modal-backdrop', BACKDROP: 'modal-backdrop',
OPEN: 'modal-open', OPEN: 'modal-open',
FADE: 'fade', FADE: 'fade',
ACTIVE: 'active' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -1808,7 +1808,7 @@ var Modal = function ($) {
$(document).off(Event.FOCUSIN); $(document).off(Event.FOCUSIN);
$(this._element).removeClass(ClassName.ACTIVE); $(this._element).removeClass(ClassName.SHOW);
$(this._element).off(Event.CLICK_DISMISS); $(this._element).off(Event.CLICK_DISMISS);
$(this._dialog).off(Event.MOUSEDOWN_DISMISS); $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
@@ -1864,7 +1864,7 @@ var Modal = function ($) {
Util.reflow(this._element); Util.reflow(this._element);
} }
$(this._element).addClass(ClassName.ACTIVE); $(this._element).addClass(ClassName.SHOW);
if (this._config.focus) { if (this._config.focus) {
this._enforceFocus(); this._enforceFocus();
@@ -1983,7 +1983,7 @@ var Modal = function ($) {
Util.reflow(this._backdrop); Util.reflow(this._backdrop);
} }
$(this._backdrop).addClass(ClassName.ACTIVE); $(this._backdrop).addClass(ClassName.SHOW);
if (!callback) { if (!callback) {
return; return;
@@ -1996,7 +1996,7 @@ var Modal = function ($) {
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
} else if (!this._isShown && this._backdrop) { } else if (!this._isShown && this._backdrop) {
$(this._backdrop).removeClass(ClassName.ACTIVE); $(this._backdrop).removeClass(ClassName.SHOW);
var callbackRemove = function callbackRemove() { var callbackRemove = function callbackRemove() {
_this16._removeBackdrop(); _this16._removeBackdrop();
@@ -2509,7 +2509,7 @@ var Tab = function ($) {
DROPDOWN_MENU: 'dropdown-menu', DROPDOWN_MENU: 'dropdown-menu',
ACTIVE: 'active', ACTIVE: 'active',
FADE: 'fade', FADE: 'fade',
IN: 'in' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -2627,7 +2627,7 @@ var Tab = function ($) {
} }
if (active) { if (active) {
$(active).removeClass(ClassName.IN); $(active).removeClass(ClassName.SHOW);
} }
}; };
@@ -2649,7 +2649,7 @@ var Tab = function ($) {
if (isTransitioning) { if (isTransitioning) {
Util.reflow(element); Util.reflow(element);
$(element).addClass(ClassName.IN); $(element).addClass(ClassName.SHOW);
} else { } else {
$(element).removeClass(ClassName.FADE); $(element).removeClass(ClassName.FADE);
} }
@@ -2796,7 +2796,7 @@ var Tooltip = function ($) {
}; };
var HoverState = { var HoverState = {
ACTIVE: 'active', SHOW: 'show',
OUT: 'out' OUT: 'out'
}; };
@@ -2815,7 +2815,7 @@ var Tooltip = function ($) {
var ClassName = { var ClassName = {
FADE: 'fade', FADE: 'fade',
ACTIVE: 'active' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -2896,7 +2896,7 @@ var Tooltip = function ($) {
} }
} else { } else {
if ($(this.getTipElement()).hasClass(ClassName.ACTIVE)) { if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
this._leave(null, this); this._leave(null, this);
return; return;
} }
@@ -2986,7 +2986,7 @@ var Tooltip = function ($) {
Util.reflow(tip); Util.reflow(tip);
this._tether.position(); this._tether.position();
$(tip).addClass(ClassName.ACTIVE); $(tip).addClass(ClassName.SHOW);
var complete = function complete() { var complete = function complete() {
var prevHoverState = _this22._hoverState; var prevHoverState = _this22._hoverState;
@@ -3019,7 +3019,7 @@ var Tooltip = function ($) {
throw new Error('Tooltip is transitioning'); throw new Error('Tooltip is transitioning');
} }
var complete = function complete() { var complete = function complete() {
if (_this23._hoverState !== HoverState.ACTIVE && tip.parentNode) { if (_this23._hoverState !== HoverState.SHOW && tip.parentNode) {
tip.parentNode.removeChild(tip); tip.parentNode.removeChild(tip);
} }
@@ -3039,7 +3039,7 @@ var Tooltip = function ($) {
return; return;
} }
$(tip).removeClass(ClassName.ACTIVE); $(tip).removeClass(ClassName.SHOW);
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
this._isTransitioning = true; this._isTransitioning = true;
@@ -3066,7 +3066,7 @@ var Tooltip = function ($) {
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
$tip.removeClass(ClassName.FADE + ' ' + ClassName.ACTIVE); $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
this.cleanupTether(); this.cleanupTether();
}; };
@@ -3167,14 +3167,14 @@ var Tooltip = function ($) {
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
} }
if ($(context.getTipElement()).hasClass(ClassName.ACTIVE) || context._hoverState === HoverState.ACTIVE) { if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
context._hoverState = HoverState.ACTIVE; context._hoverState = HoverState.SHOW;
return; return;
} }
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HoverState.ACTIVE; context._hoverState = HoverState.SHOW;
if (!context.config.delay || !context.config.delay.show) { if (!context.config.delay || !context.config.delay.show) {
context.show(); context.show();
@@ -3182,7 +3182,7 @@ var Tooltip = function ($) {
} }
context._timeout = setTimeout(function () { context._timeout = setTimeout(function () {
if (context._hoverState === HoverState.ACTIVE) { if (context._hoverState === HoverState.SHOW) {
context.show(); context.show();
} }
}, context.config.delay.show); }, context.config.delay.show);
@@ -3376,7 +3376,7 @@ var Popover = function ($) {
var ClassName = { var ClassName = {
FADE: 'fade', FADE: 'fade',
ACTIVE: 'active' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -3429,7 +3429,7 @@ var Popover = function ($) {
this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
this.setElementContent($tip.find(Selector.CONTENT), this._getContent()); this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
$tip.removeClass(ClassName.FADE + ' ' + ClassName.ACTIVE); $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
this.cleanupTether(); this.cleanupTether();
}; };
+2 -2
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -38,7 +38,7 @@ var Alert = function ($) {
var ClassName = { var ClassName = {
ALERT: 'alert', ALERT: 'alert',
FADE: 'fade', FADE: 'fade',
ACTIVE: 'active' SHOW: 'show'
}; };
/** /**
@@ -103,7 +103,7 @@ var Alert = function ($) {
Alert.prototype._removeElement = function _removeElement(element) { Alert.prototype._removeElement = function _removeElement(element) {
var _this = this; var _this = this;
$(element).removeClass(ClassName.ACTIVE); $(element).removeClass(ClassName.SHOW);
if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
this._destroyElement(element); this._destroyElement(element);
+1 -1
View File
File diff suppressed because one or more lines are too long
+8 -8
View File
@@ -46,7 +46,7 @@ var Collapse = function ($) {
}; };
var ClassName = { var ClassName = {
ACTIVE: 'active', SHOW: 'show',
COLLAPSE: 'collapse', COLLAPSE: 'collapse',
COLLAPSING: 'collapsing', COLLAPSING: 'collapsing',
COLLAPSED: 'collapsed' COLLAPSED: 'collapsed'
@@ -58,7 +58,7 @@ var Collapse = function ($) {
}; };
var Selector = { var Selector = {
ACTIVES: '.card > .active, .card > .collapsing', ACTIVES: '.card > .show, .card > .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]' DATA_TOGGLE: '[data-toggle="collapse"]'
}; };
@@ -93,7 +93,7 @@ var Collapse = function ($) {
// public // public
Collapse.prototype.toggle = function toggle() { Collapse.prototype.toggle = function toggle() {
if ($(this._element).hasClass(ClassName.ACTIVE)) { if ($(this._element).hasClass(ClassName.SHOW)) {
this.hide(); this.hide();
} else { } else {
this.show(); this.show();
@@ -107,7 +107,7 @@ var Collapse = function ($) {
throw new Error('Collapse is transitioning'); throw new Error('Collapse is transitioning');
} }
if ($(this._element).hasClass(ClassName.ACTIVE)) { if ($(this._element).hasClass(ClassName.SHOW)) {
return; return;
} }
@@ -155,7 +155,7 @@ var Collapse = function ($) {
this.setTransitioning(true); this.setTransitioning(true);
var complete = function complete() { var complete = function complete() {
$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.ACTIVE); $(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
_this._element.style[dimension] = ''; _this._element.style[dimension] = '';
@@ -184,7 +184,7 @@ var Collapse = function ($) {
throw new Error('Collapse is transitioning'); throw new Error('Collapse is transitioning');
} }
if (!$(this._element).hasClass(ClassName.ACTIVE)) { if (!$(this._element).hasClass(ClassName.SHOW)) {
return; return;
} }
@@ -201,7 +201,7 @@ var Collapse = function ($) {
Util.reflow(this._element); Util.reflow(this._element);
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.ACTIVE); $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
this._element.setAttribute('aria-expanded', false); this._element.setAttribute('aria-expanded', false);
@@ -269,7 +269,7 @@ var Collapse = function ($) {
Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
if (element) { if (element) {
var isOpen = $(element).hasClass(ClassName.ACTIVE); var isOpen = $(element).hasClass(ClassName.SHOW);
element.setAttribute('aria-expanded', isOpen); element.setAttribute('aria-expanded', isOpen);
if (triggerArray.length) { if (triggerArray.length) {
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -6
View File
@@ -41,7 +41,7 @@ var Dropdown = function ($) {
var ClassName = { var ClassName = {
BACKDROP: 'dropdown-backdrop', BACKDROP: 'dropdown-backdrop',
DISABLED: 'disabled', DISABLED: 'disabled',
ACTIVE: 'active' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -79,7 +79,7 @@ var Dropdown = function ($) {
} }
var parent = Dropdown._getParentFromElement(this); var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(ClassName.ACTIVE); var isActive = $(parent).hasClass(ClassName.SHOW);
Dropdown._clearMenus(); Dropdown._clearMenus();
@@ -110,7 +110,7 @@ var Dropdown = function ($) {
this.focus(); this.focus();
this.setAttribute('aria-expanded', true); this.setAttribute('aria-expanded', true);
$(parent).toggleClass(ClassName.ACTIVE); $(parent).toggleClass(ClassName.SHOW);
$(parent).trigger($.Event(Event.SHOWN, relatedTarget)); $(parent).trigger($.Event(Event.SHOWN, relatedTarget));
return false; return false;
@@ -166,7 +166,7 @@ var Dropdown = function ($) {
relatedTarget: toggles[i] relatedTarget: toggles[i]
}; };
if (!$(parent).hasClass(ClassName.ACTIVE)) { if (!$(parent).hasClass(ClassName.SHOW)) {
continue; continue;
} }
@@ -182,7 +182,7 @@ var Dropdown = function ($) {
toggles[i].setAttribute('aria-expanded', 'false'); toggles[i].setAttribute('aria-expanded', 'false');
$(parent).removeClass(ClassName.ACTIVE).trigger($.Event(Event.HIDDEN, relatedTarget)); $(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
} }
}; };
@@ -210,7 +210,7 @@ var Dropdown = function ($) {
} }
var parent = Dropdown._getParentFromElement(this); var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(ClassName.ACTIVE); var isActive = $(parent).hasClass(ClassName.SHOW);
if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) { if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) {
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -62,7 +62,7 @@ var Modal = function ($) {
BACKDROP: 'modal-backdrop', BACKDROP: 'modal-backdrop',
OPEN: 'modal-open', OPEN: 'modal-open',
FADE: 'fade', FADE: 'fade',
ACTIVE: 'active' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -179,7 +179,7 @@ var Modal = function ($) {
$(document).off(Event.FOCUSIN); $(document).off(Event.FOCUSIN);
$(this._element).removeClass(ClassName.ACTIVE); $(this._element).removeClass(ClassName.SHOW);
$(this._element).off(Event.CLICK_DISMISS); $(this._element).off(Event.CLICK_DISMISS);
$(this._dialog).off(Event.MOUSEDOWN_DISMISS); $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
@@ -235,7 +235,7 @@ var Modal = function ($) {
Util.reflow(this._element); Util.reflow(this._element);
} }
$(this._element).addClass(ClassName.ACTIVE); $(this._element).addClass(ClassName.SHOW);
if (this._config.focus) { if (this._config.focus) {
this._enforceFocus(); this._enforceFocus();
@@ -354,7 +354,7 @@ var Modal = function ($) {
Util.reflow(this._backdrop); Util.reflow(this._backdrop);
} }
$(this._backdrop).addClass(ClassName.ACTIVE); $(this._backdrop).addClass(ClassName.SHOW);
if (!callback) { if (!callback) {
return; return;
@@ -367,7 +367,7 @@ var Modal = function ($) {
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
} else if (!this._isShown && this._backdrop) { } else if (!this._isShown && this._backdrop) {
$(this._backdrop).removeClass(ClassName.ACTIVE); $(this._backdrop).removeClass(ClassName.SHOW);
var callbackRemove = function callbackRemove() { var callbackRemove = function callbackRemove() {
_this8._removeBackdrop(); _this8._removeBackdrop();
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -42,7 +42,7 @@ var Popover = function ($) {
var ClassName = { var ClassName = {
FADE: 'fade', FADE: 'fade',
ACTIVE: 'active' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -95,7 +95,7 @@ var Popover = function ($) {
this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
this.setElementContent($tip.find(Selector.CONTENT), this._getContent()); this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
$tip.removeClass(ClassName.FADE + ' ' + ClassName.ACTIVE); $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
this.cleanupTether(); this.cleanupTether();
}; };
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -37,7 +37,7 @@ var Tab = function ($) {
DROPDOWN_MENU: 'dropdown-menu', DROPDOWN_MENU: 'dropdown-menu',
ACTIVE: 'active', ACTIVE: 'active',
FADE: 'fade', FADE: 'fade',
IN: 'in' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -155,7 +155,7 @@ var Tab = function ($) {
} }
if (active) { if (active) {
$(active).removeClass(ClassName.IN); $(active).removeClass(ClassName.SHOW);
} }
}; };
@@ -177,7 +177,7 @@ var Tab = function ($) {
if (isTransitioning) { if (isTransitioning) {
Util.reflow(element); Util.reflow(element);
$(element).addClass(ClassName.IN); $(element).addClass(ClassName.SHOW);
} else { } else {
$(element).removeClass(ClassName.FADE); $(element).removeClass(ClassName.FADE);
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+11 -11
View File
@@ -71,7 +71,7 @@ var Tooltip = function ($) {
}; };
var HoverState = { var HoverState = {
ACTIVE: 'active', SHOW: 'show',
OUT: 'out' OUT: 'out'
}; };
@@ -90,7 +90,7 @@ var Tooltip = function ($) {
var ClassName = { var ClassName = {
FADE: 'fade', FADE: 'fade',
ACTIVE: 'active' SHOW: 'show'
}; };
var Selector = { var Selector = {
@@ -171,7 +171,7 @@ var Tooltip = function ($) {
} }
} else { } else {
if ($(this.getTipElement()).hasClass(ClassName.ACTIVE)) { if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
this._leave(null, this); this._leave(null, this);
return; return;
} }
@@ -261,7 +261,7 @@ var Tooltip = function ($) {
Util.reflow(tip); Util.reflow(tip);
this._tether.position(); this._tether.position();
$(tip).addClass(ClassName.ACTIVE); $(tip).addClass(ClassName.SHOW);
var complete = function complete() { var complete = function complete() {
var prevHoverState = _this._hoverState; var prevHoverState = _this._hoverState;
@@ -294,7 +294,7 @@ var Tooltip = function ($) {
throw new Error('Tooltip is transitioning'); throw new Error('Tooltip is transitioning');
} }
var complete = function complete() { var complete = function complete() {
if (_this2._hoverState !== HoverState.ACTIVE && tip.parentNode) { if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
tip.parentNode.removeChild(tip); tip.parentNode.removeChild(tip);
} }
@@ -314,7 +314,7 @@ var Tooltip = function ($) {
return; return;
} }
$(tip).removeClass(ClassName.ACTIVE); $(tip).removeClass(ClassName.SHOW);
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
this._isTransitioning = true; this._isTransitioning = true;
@@ -341,7 +341,7 @@ var Tooltip = function ($) {
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
$tip.removeClass(ClassName.FADE + ' ' + ClassName.ACTIVE); $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
this.cleanupTether(); this.cleanupTether();
}; };
@@ -442,14 +442,14 @@ var Tooltip = function ($) {
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
} }
if ($(context.getTipElement()).hasClass(ClassName.ACTIVE) || context._hoverState === HoverState.ACTIVE) { if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
context._hoverState = HoverState.ACTIVE; context._hoverState = HoverState.SHOW;
return; return;
} }
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HoverState.ACTIVE; context._hoverState = HoverState.SHOW;
if (!context.config.delay || !context.config.delay.show) { if (!context.config.delay || !context.config.delay.show) {
context.show(); context.show();
@@ -457,7 +457,7 @@ var Tooltip = function ($) {
} }
context._timeout = setTimeout(function () { context._timeout = setTimeout(function () {
if (context._hoverState === HoverState.ACTIVE) { if (context._hoverState === HoverState.SHOW) {
context.show(); context.show();
} }
}, context.config.delay.show); }, context.config.delay.show);
+1 -1
View File
File diff suppressed because one or more lines are too long