1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-23 05:33:02 +02:00
This commit is contained in:
Mark Otto
2017-10-15 15:51:44 -07:00
parent 3ccb7ef16a
commit 7ce2b03b1a
39 changed files with 245 additions and 186 deletions

View File

@@ -149,7 +149,7 @@ var Util = function () {
};
setTransitionEndSupport();
return Util;
}(jQuery);
}($);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -347,7 +347,7 @@ var Alert = function () {
};
return Alert;
}(jQuery);
}($);
/**
* --------------------------------------------------------------------------
@@ -510,7 +510,7 @@ var Button = function () {
};
return Button;
}(jQuery);
}($);
/**
* --------------------------------------------------------------------------
@@ -1010,7 +1010,7 @@ var Carousel = function () {
};
return Carousel;
}(jQuery);
}($);
/**
* --------------------------------------------------------------------------
@@ -1377,7 +1377,7 @@ var Collapse = function () {
};
return Collapse;
}(jQuery);
}($);
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
@@ -3893,7 +3893,7 @@ var Dropdown = function () {
flip: true
};
var DefaultType = {
offset: '(number|string)',
offset: '(number|string|function)',
flip: 'boolean'
/**
* ------------------------------------------------------------------------
@@ -4041,12 +4041,23 @@ var Dropdown = function () {
};
_proto._getPopperConfig = function _getPopperConfig() {
var _this2 = this;
var offsetConf = {};
if (typeof this._config.offset === 'function') {
offsetConf.fn = function (data) {
data.offsets = $.extend({}, data.offsets, _this2._config.offset(data.offsets) || {});
return data;
};
} else {
offsetConf.offset = this._config.offset;
}
var popperConfig = {
placement: this._getPlacement(),
modifiers: {
offset: {
offset: this._config.offset
},
offset: offsetConf,
flip: {
enabled: this._config.flip
}
@@ -4243,7 +4254,7 @@ var Dropdown = function () {
};
return Dropdown;
}(jQuery, Popper);
}($, Popper);
/**
* --------------------------------------------------------------------------
@@ -4341,7 +4352,7 @@ var Modal = function () {
_proto.show = function show(relatedTarget) {
var _this = this;
if (this._isTransitioning) {
if (this._isTransitioning || this._isShown) {
return;
}
@@ -4399,12 +4410,6 @@ var Modal = function () {
return;
}
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
if (transition) {
this._isTransitioning = true;
}
var hideEvent = $.Event(Event.HIDE);
$(this._element).trigger(hideEvent);
@@ -4413,6 +4418,11 @@ var Modal = function () {
}
this._isShown = false;
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
if (transition) {
this._isTransitioning = true;
}
this._setEscapeEvent();
@@ -4820,7 +4830,7 @@ var Modal = function () {
};
return Modal;
}(jQuery);
}($);
/**
* --------------------------------------------------------------------------
@@ -5481,7 +5491,7 @@ var Tooltip = function () {
};
return Tooltip;
}(jQuery, Popper);
}($, Popper);
/**
* --------------------------------------------------------------------------
@@ -5667,7 +5677,7 @@ var Popover = function () {
};
return Popover;
}(jQuery);
}($);
/**
* --------------------------------------------------------------------------
@@ -5978,7 +5988,7 @@ var ScrollSpy = function () {
};
return ScrollSpy;
}(jQuery);
}($);
/**
* --------------------------------------------------------------------------
@@ -6233,7 +6243,7 @@ var Tab = function () {
};
return Tab;
}(jQuery);
}($);
/**
* --------------------------------------------------------------------------
@@ -6243,7 +6253,7 @@ var Tab = function () {
*/
(function () {
if (typeof jQuery === 'undefined') {
if (typeof $ === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
}
@@ -6254,7 +6264,7 @@ var Tab = function () {
if (version[0] < min || version[0] >= max) {
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v3.0.0 but less than v4.0.0');
}
})(jQuery);
})($);
exports.Util = Util;
exports.Alert = Alert;