1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-22 05:03:16 +02: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

4
js/dist/alert.js vendored
View File

@@ -38,7 +38,7 @@ var Alert = function ($) {
var ClassName = {
ALERT: 'alert',
FADE: 'fade',
ACTIVE: 'active'
SHOW: 'show'
};
/**
@@ -103,7 +103,7 @@ var Alert = function ($) {
Alert.prototype._removeElement = function _removeElement(element) {
var _this = this;
$(element).removeClass(ClassName.ACTIVE);
$(element).removeClass(ClassName.SHOW);
if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
this._destroyElement(element);

File diff suppressed because one or more lines are too long

16
js/dist/collapse.js vendored
View File

@@ -46,7 +46,7 @@ var Collapse = function ($) {
};
var ClassName = {
ACTIVE: 'active',
SHOW: 'show',
COLLAPSE: 'collapse',
COLLAPSING: 'collapsing',
COLLAPSED: 'collapsed'
@@ -58,7 +58,7 @@ var Collapse = function ($) {
};
var Selector = {
ACTIVES: '.card > .active, .card > .collapsing',
ACTIVES: '.card > .show, .card > .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]'
};
@@ -93,7 +93,7 @@ var Collapse = function ($) {
// public
Collapse.prototype.toggle = function toggle() {
if ($(this._element).hasClass(ClassName.ACTIVE)) {
if ($(this._element).hasClass(ClassName.SHOW)) {
this.hide();
} else {
this.show();
@@ -107,7 +107,7 @@ var Collapse = function ($) {
throw new Error('Collapse is transitioning');
}
if ($(this._element).hasClass(ClassName.ACTIVE)) {
if ($(this._element).hasClass(ClassName.SHOW)) {
return;
}
@@ -155,7 +155,7 @@ var Collapse = function ($) {
this.setTransitioning(true);
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] = '';
@@ -184,7 +184,7 @@ var Collapse = function ($) {
throw new Error('Collapse is transitioning');
}
if (!$(this._element).hasClass(ClassName.ACTIVE)) {
if (!$(this._element).hasClass(ClassName.SHOW)) {
return;
}
@@ -201,7 +201,7 @@ var Collapse = function ($) {
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);
@@ -269,7 +269,7 @@ var Collapse = function ($) {
Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
if (element) {
var isOpen = $(element).hasClass(ClassName.ACTIVE);
var isOpen = $(element).hasClass(ClassName.SHOW);
element.setAttribute('aria-expanded', isOpen);
if (triggerArray.length) {

File diff suppressed because one or more lines are too long

12
js/dist/dropdown.js vendored
View File

@@ -41,7 +41,7 @@ var Dropdown = function ($) {
var ClassName = {
BACKDROP: 'dropdown-backdrop',
DISABLED: 'disabled',
ACTIVE: 'active'
SHOW: 'show'
};
var Selector = {
@@ -79,7 +79,7 @@ var Dropdown = function ($) {
}
var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(ClassName.ACTIVE);
var isActive = $(parent).hasClass(ClassName.SHOW);
Dropdown._clearMenus();
@@ -110,7 +110,7 @@ var Dropdown = function ($) {
this.focus();
this.setAttribute('aria-expanded', true);
$(parent).toggleClass(ClassName.ACTIVE);
$(parent).toggleClass(ClassName.SHOW);
$(parent).trigger($.Event(Event.SHOWN, relatedTarget));
return false;
@@ -166,7 +166,7 @@ var Dropdown = function ($) {
relatedTarget: toggles[i]
};
if (!$(parent).hasClass(ClassName.ACTIVE)) {
if (!$(parent).hasClass(ClassName.SHOW)) {
continue;
}
@@ -182,7 +182,7 @@ var Dropdown = function ($) {
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 isActive = $(parent).hasClass(ClassName.ACTIVE);
var isActive = $(parent).hasClass(ClassName.SHOW);
if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) {

File diff suppressed because one or more lines are too long

10
js/dist/modal.js vendored
View File

@@ -62,7 +62,7 @@ var Modal = function ($) {
BACKDROP: 'modal-backdrop',
OPEN: 'modal-open',
FADE: 'fade',
ACTIVE: 'active'
SHOW: 'show'
};
var Selector = {
@@ -179,7 +179,7 @@ var Modal = function ($) {
$(document).off(Event.FOCUSIN);
$(this._element).removeClass(ClassName.ACTIVE);
$(this._element).removeClass(ClassName.SHOW);
$(this._element).off(Event.CLICK_DISMISS);
$(this._dialog).off(Event.MOUSEDOWN_DISMISS);
@@ -235,7 +235,7 @@ var Modal = function ($) {
Util.reflow(this._element);
}
$(this._element).addClass(ClassName.ACTIVE);
$(this._element).addClass(ClassName.SHOW);
if (this._config.focus) {
this._enforceFocus();
@@ -354,7 +354,7 @@ var Modal = function ($) {
Util.reflow(this._backdrop);
}
$(this._backdrop).addClass(ClassName.ACTIVE);
$(this._backdrop).addClass(ClassName.SHOW);
if (!callback) {
return;
@@ -367,7 +367,7 @@ var Modal = function ($) {
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
} else if (!this._isShown && this._backdrop) {
$(this._backdrop).removeClass(ClassName.ACTIVE);
$(this._backdrop).removeClass(ClassName.SHOW);
var callbackRemove = function callbackRemove() {
_this8._removeBackdrop();

File diff suppressed because one or more lines are too long

4
js/dist/popover.js vendored
View File

@@ -42,7 +42,7 @@ var Popover = function ($) {
var ClassName = {
FADE: 'fade',
ACTIVE: 'active'
SHOW: 'show'
};
var Selector = {
@@ -95,7 +95,7 @@ var Popover = function ($) {
this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
$tip.removeClass(ClassName.FADE + ' ' + ClassName.ACTIVE);
$tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
this.cleanupTether();
};

File diff suppressed because one or more lines are too long

6
js/dist/tab.js vendored
View File

@@ -37,7 +37,7 @@ var Tab = function ($) {
DROPDOWN_MENU: 'dropdown-menu',
ACTIVE: 'active',
FADE: 'fade',
IN: 'in'
SHOW: 'show'
};
var Selector = {
@@ -155,7 +155,7 @@ var Tab = function ($) {
}
if (active) {
$(active).removeClass(ClassName.IN);
$(active).removeClass(ClassName.SHOW);
}
};
@@ -177,7 +177,7 @@ var Tab = function ($) {
if (isTransitioning) {
Util.reflow(element);
$(element).addClass(ClassName.IN);
$(element).addClass(ClassName.SHOW);
} else {
$(element).removeClass(ClassName.FADE);
}

2
js/dist/tab.js.map vendored

File diff suppressed because one or more lines are too long

22
js/dist/tooltip.js vendored
View File

@@ -71,7 +71,7 @@ var Tooltip = function ($) {
};
var HoverState = {
ACTIVE: 'active',
SHOW: 'show',
OUT: 'out'
};
@@ -90,7 +90,7 @@ var Tooltip = function ($) {
var ClassName = {
FADE: 'fade',
ACTIVE: 'active'
SHOW: 'show'
};
var Selector = {
@@ -171,7 +171,7 @@ var Tooltip = function ($) {
}
} else {
if ($(this.getTipElement()).hasClass(ClassName.ACTIVE)) {
if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
this._leave(null, this);
return;
}
@@ -261,7 +261,7 @@ var Tooltip = function ($) {
Util.reflow(tip);
this._tether.position();
$(tip).addClass(ClassName.ACTIVE);
$(tip).addClass(ClassName.SHOW);
var complete = function complete() {
var prevHoverState = _this._hoverState;
@@ -294,7 +294,7 @@ var Tooltip = function ($) {
throw new Error('Tooltip is transitioning');
}
var complete = function complete() {
if (_this2._hoverState !== HoverState.ACTIVE && tip.parentNode) {
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
tip.parentNode.removeChild(tip);
}
@@ -314,7 +314,7 @@ var Tooltip = function ($) {
return;
}
$(tip).removeClass(ClassName.ACTIVE);
$(tip).removeClass(ClassName.SHOW);
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
this._isTransitioning = true;
@@ -341,7 +341,7 @@ var Tooltip = function ($) {
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
$tip.removeClass(ClassName.FADE + ' ' + ClassName.ACTIVE);
$tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
this.cleanupTether();
};
@@ -442,14 +442,14 @@ var Tooltip = function ($) {
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
}
if ($(context.getTipElement()).hasClass(ClassName.ACTIVE) || context._hoverState === HoverState.ACTIVE) {
context._hoverState = HoverState.ACTIVE;
if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
context._hoverState = HoverState.SHOW;
return;
}
clearTimeout(context._timeout);
context._hoverState = HoverState.ACTIVE;
context._hoverState = HoverState.SHOW;
if (!context.config.delay || !context.config.delay.show) {
context.show();
@@ -457,7 +457,7 @@ var Tooltip = function ($) {
}
context._timeout = setTimeout(function () {
if (context._hoverState === HoverState.ACTIVE) {
if (context._hoverState === HoverState.SHOW) {
context.show();
}
}, context.config.delay.show);

File diff suppressed because one or more lines are too long