aboutsummaryrefslogtreecommitdiff
path: root/dist/js/bootstrap.js
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2017-09-09 16:59:37 -0700
committerMark Otto <[email protected]>2017-09-09 16:59:37 -0700
commitd8a5147c380fe142ee97fa2489f05afe2ed5a614 (patch)
tree1025945777bfd6a17aa433c6277a7821a68aa62d /dist/js/bootstrap.js
parentcad22335ede2d2d9d0242f86cd859752bbfb14ea (diff)
downloadbootstrap-d8a5147c380fe142ee97fa2489f05afe2ed5a614.tar.xz
bootstrap-d8a5147c380fe142ee97fa2489f05afe2ed5a614.zip
dist
Diffstat (limited to 'dist/js/bootstrap.js')
-rw-r--r--dist/js/bootstrap.js141
1 files changed, 68 insertions, 73 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js
index fe7ce857f..c0579e2ab 100644
--- a/dist/js/bootstrap.js
+++ b/dist/js/bootstrap.js
@@ -34,9 +34,10 @@ var Util = function () {
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd otransitionend',
transition: 'transitionend'
+ };
- // shoutout AngusCroll (https://goo.gl/pxwQGp)
- };function toType(obj) {
+ // shoutout AngusCroll (https://goo.gl/pxwQGp)
+ function toType(obj) {
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
}
@@ -256,14 +257,14 @@ var Alert = function () {
ALERT: 'alert',
FADE: 'fade',
SHOW: 'show'
+ };
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- };
var Alert = function () {
function Alert(element) {
classCallCheck(this, Alert);
@@ -436,14 +437,14 @@ var Button = function () {
var Event = {
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + DATA_API_KEY)
+ };
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- };
var Button = function () {
function Button(element) {
classCallCheck(this, Button);
@@ -645,14 +646,14 @@ var Carousel = function () {
INDICATORS: '.carousel-indicators',
DATA_SLIDE: '[data-slide], [data-slide-to]',
DATA_RIDE: '[data-ride="carousel"]'
+ };
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- };
var Carousel = function () {
function Carousel(element, config) {
classCallCheck(this, Carousel);
@@ -1129,14 +1130,14 @@ var Collapse = function () {
var Selector = {
ACTIVES: '.show, .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]'
+ };
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- };
var Collapse = function () {
function Collapse(element, config) {
classCallCheck(this, Collapse);
@@ -1506,23 +1507,21 @@ var Dropdown = function () {
};
var Default = {
- placement: AttachmentMap.BOTTOM,
offset: 0,
flip: true
};
var DefaultType = {
- placement: 'string',
offset: '(number|string)',
flip: 'boolean'
+ };
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- };
var Dropdown = function () {
function Dropdown(element, config) {
classCallCheck(this, Dropdown);
@@ -1620,11 +1619,6 @@ var Dropdown = function () {
};
Dropdown.prototype._getConfig = function _getConfig(config) {
- var elementData = $(this._element).data();
- if (typeof elementData.placement !== 'undefined') {
- elementData.placement = AttachmentMap[elementData.placement.toUpperCase()];
- }
-
config = $.extend({}, this.constructor.Default, $(this._element).data(), config);
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
@@ -1642,10 +1636,10 @@ var Dropdown = function () {
Dropdown.prototype._getPlacement = function _getPlacement() {
var $parentDropdown = $(this._element).parent();
- var placement = this._config.placement;
+ var placement = AttachmentMap.BOTTOM;
// Handle dropup
- if ($parentDropdown.hasClass(ClassName.DROPUP) || this._config.placement === AttachmentMap.TOP) {
+ if ($parentDropdown.hasClass(ClassName.DROPUP)) {
placement = AttachmentMap.TOP;
if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.TOPEND;
@@ -1671,9 +1665,10 @@ var Dropdown = function () {
enabled: this._config.flip
}
}
+ };
- // Disable Popper.js for Dropdown in Navbar
- };if (this._inNavbar) {
+ // Disable Popper.js for Dropdown in Navbar
+ if (this._inNavbar) {
popperConfig.modifiers.applyStyle = {
enabled: !this._inNavbar
};
@@ -1926,14 +1921,14 @@ var Modal = function () {
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT: '.sticky-top',
NAVBAR_TOGGLER: '.navbar-toggler'
+ };
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- };
var Modal = function () {
function Modal(element, config) {
classCallCheck(this, Modal);
@@ -2541,14 +2536,14 @@ var Tooltip = function () {
FOCUS: 'focus',
CLICK: 'click',
MANUAL: 'manual'
+ };
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- };
var Tooltip = function () {
function Tooltip(element, config) {
classCallCheck(this, Tooltip);
@@ -3172,14 +3167,14 @@ var Popover = function () {
FOCUSOUT: 'focusout' + EVENT_KEY,
MOUSEENTER: 'mouseenter' + EVENT_KEY,
MOUSELEAVE: 'mouseleave' + EVENT_KEY
+ };
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- };
var Popover = function (_Tooltip) {
inherits(Popover, _Tooltip);
@@ -3371,14 +3366,14 @@ var ScrollSpy = function () {
var OffsetMethod = {
OFFSET: 'offset',
POSITION: 'position'
+ };
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- };
var ScrollSpy = function () {
function ScrollSpy(element, config) {
var _this = this;
@@ -3672,14 +3667,14 @@ var Tab = function () {
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE: '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
+ };
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- };
var Tab = function () {
function Tab(element) {
classCallCheck(this, Tab);