mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-13 17:14:04 +02:00
fix modal
This commit is contained in:
39
js/dist/alert.js
vendored
39
js/dist/alert.js
vendored
@@ -34,7 +34,7 @@ var Alert = (function ($) {
|
||||
var Event = {
|
||||
CLOSE: 'close' + EVENT_KEY,
|
||||
CLOSED: 'closed' + EVENT_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
@@ -56,6 +56,14 @@ var Alert = (function ($) {
|
||||
this._element = element;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Alert, [{
|
||||
key: 'close',
|
||||
|
||||
@@ -79,11 +87,11 @@ var Alert = (function ($) {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
}
|
||||
}, {
|
||||
key: '_getRootElement',
|
||||
|
||||
// private
|
||||
|
||||
}, {
|
||||
key: '_getRootElement',
|
||||
value: function _getRootElement(element) {
|
||||
var parent = false;
|
||||
var selector = Util.getSelectorFromElement(element);
|
||||
@@ -122,19 +130,11 @@ var Alert = (function ($) {
|
||||
value: function _destroyElement(element) {
|
||||
$(element).detach().trigger(Event.CLOSED).remove();
|
||||
}
|
||||
}], [{
|
||||
key: 'VERSION',
|
||||
|
||||
// getters
|
||||
|
||||
get: function () {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: '_jQueryInterface',
|
||||
|
||||
// static
|
||||
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = $(this);
|
||||
@@ -161,17 +161,16 @@ var Alert = (function ($) {
|
||||
alertInstance.close(this);
|
||||
};
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Alert;
|
||||
})();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
|
||||
|
||||
/**
|
||||
@@ -189,4 +188,4 @@ var Alert = (function ($) {
|
||||
|
||||
return Alert;
|
||||
})(jQuery);
|
||||
//# sourceMappingURL=alert.js.map
|
||||
//# sourceMappingURL=alert.js.map
|
||||
|
2
js/dist/alert.js.map
vendored
2
js/dist/alert.js.map
vendored
File diff suppressed because one or more lines are too long
49
js/dist/button.js
vendored
49
js/dist/button.js
vendored
@@ -1,9 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0): button.js
|
||||
@@ -11,6 +5,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
||||
|
||||
var Button = (function ($) {
|
||||
|
||||
/**
|
||||
@@ -42,8 +42,8 @@ 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)
|
||||
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)
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -59,6 +59,14 @@ var Button = (function ($) {
|
||||
this._element = element;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Button, [{
|
||||
key: 'toggle',
|
||||
|
||||
@@ -103,19 +111,11 @@ var Button = (function ($) {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
}
|
||||
}], [{
|
||||
key: 'VERSION',
|
||||
|
||||
// getters
|
||||
|
||||
get: function () {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: '_jQueryInterface',
|
||||
|
||||
// static
|
||||
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
@@ -130,17 +130,16 @@ var Button = (function ($) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Button;
|
||||
})();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -171,4 +170,4 @@ var Button = (function ($) {
|
||||
|
||||
return Button;
|
||||
})(jQuery);
|
||||
//# sourceMappingURL=button.js.map
|
||||
//# sourceMappingURL=button.js.map
|
||||
|
2
js/dist/button.js.map
vendored
2
js/dist/button.js.map
vendored
File diff suppressed because one or more lines are too long
51
js/dist/carousel.js
vendored
51
js/dist/carousel.js
vendored
@@ -54,8 +54,8 @@ var Carousel = (function ($) {
|
||||
KEYDOWN: 'keydown' + EVENT_KEY,
|
||||
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY,
|
||||
LOAD_DATA_API: 'load' + EVENT_KEY + '' + DATA_API_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY
|
||||
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
@@ -101,6 +101,14 @@ var Carousel = (function ($) {
|
||||
this._addEventListeners();
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Carousel, [{
|
||||
key: 'next',
|
||||
|
||||
@@ -194,11 +202,11 @@ var Carousel = (function ($) {
|
||||
this._activeElement = null;
|
||||
this._indicatorsElement = null;
|
||||
}
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
|
||||
// private
|
||||
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
value: function _getConfig(config) {
|
||||
config = $.extend({}, Default, config);
|
||||
Util.typeCheckConfig(NAME, config, DefaultType);
|
||||
@@ -354,24 +362,11 @@ var Carousel = (function ($) {
|
||||
this.cycle();
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: 'VERSION',
|
||||
|
||||
// getters
|
||||
|
||||
get: function () {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function () {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: '_jQueryInterface',
|
||||
|
||||
// static
|
||||
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
@@ -428,17 +423,21 @@ var Carousel = (function ($) {
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Carousel;
|
||||
})();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
|
||||
|
||||
$(window).on(Event.LOAD_DATA_API, function () {
|
||||
@@ -463,4 +462,4 @@ var Carousel = (function ($) {
|
||||
|
||||
return Carousel;
|
||||
})(jQuery);
|
||||
//# sourceMappingURL=carousel.js.map
|
||||
//# sourceMappingURL=carousel.js.map
|
||||
|
2
js/dist/carousel.js.map
vendored
2
js/dist/carousel.js.map
vendored
File diff suppressed because one or more lines are too long
49
js/dist/collapse.js
vendored
49
js/dist/collapse.js
vendored
@@ -42,7 +42,7 @@ var Collapse = (function ($) {
|
||||
SHOWN: 'shown' + EVENT_KEY,
|
||||
HIDE: 'hide' + EVENT_KEY,
|
||||
HIDDEN: 'hidden' + EVENT_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
@@ -88,6 +88,14 @@ var Collapse = (function ($) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Collapse, [{
|
||||
key: 'toggle',
|
||||
|
||||
@@ -234,11 +242,11 @@ var Collapse = (function ($) {
|
||||
this._triggerArray = null;
|
||||
this._isTransitioning = null;
|
||||
}
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
|
||||
// private
|
||||
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
value: function _getConfig(config) {
|
||||
config = $.extend({}, Default, config);
|
||||
config.toggle = !!config.toggle; // coerce string values
|
||||
@@ -277,24 +285,11 @@ var Collapse = (function ($) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: 'VERSION',
|
||||
|
||||
// getters
|
||||
|
||||
get: function () {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function () {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: '_getTargetFromElement',
|
||||
|
||||
// static
|
||||
|
||||
}], [{
|
||||
key: '_getTargetFromElement',
|
||||
value: function _getTargetFromElement(element) {
|
||||
var selector = Util.getSelectorFromElement(element);
|
||||
return selector ? $(selector)[0] : null;
|
||||
@@ -321,17 +316,21 @@ var Collapse = (function ($) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Collapse;
|
||||
})();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -358,4 +357,4 @@ var Collapse = (function ($) {
|
||||
|
||||
return Collapse;
|
||||
})(jQuery);
|
||||
//# sourceMappingURL=collapse.js.map
|
||||
//# sourceMappingURL=collapse.js.map
|
||||
|
2
js/dist/collapse.js.map
vendored
2
js/dist/collapse.js.map
vendored
File diff suppressed because one or more lines are too long
41
js/dist/dropdown.js
vendored
41
js/dist/dropdown.js
vendored
@@ -32,8 +32,8 @@ var Dropdown = (function ($) {
|
||||
SHOW: 'show' + EVENT_KEY,
|
||||
SHOWN: 'shown' + EVENT_KEY,
|
||||
CLICK: 'click' + EVENT_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY,
|
||||
KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + '' + DATA_API_KEY
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
|
||||
KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
@@ -67,6 +67,14 @@ var Dropdown = (function ($) {
|
||||
this._addEventListeners();
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Dropdown, [{
|
||||
key: 'toggle',
|
||||
|
||||
@@ -119,27 +127,19 @@ var Dropdown = (function ($) {
|
||||
$(this._element).off(EVENT_KEY);
|
||||
this._element = null;
|
||||
}
|
||||
}, {
|
||||
key: '_addEventListeners',
|
||||
|
||||
// private
|
||||
|
||||
}, {
|
||||
key: '_addEventListeners',
|
||||
value: function _addEventListeners() {
|
||||
$(this._element).on(Event.CLICK, this.toggle);
|
||||
}
|
||||
}], [{
|
||||
key: 'VERSION',
|
||||
|
||||
// getters
|
||||
|
||||
get: function () {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: '_jQueryInterface',
|
||||
|
||||
// static
|
||||
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
@@ -248,17 +248,16 @@ var Dropdown = (function ($) {
|
||||
|
||||
items[index].focus();
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Dropdown;
|
||||
})();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
@@ -278,4 +277,4 @@ var Dropdown = (function ($) {
|
||||
|
||||
return Dropdown;
|
||||
})(jQuery);
|
||||
//# sourceMappingURL=dropdown.js.map
|
||||
//# sourceMappingURL=dropdown.js.map
|
||||
|
2
js/dist/dropdown.js.map
vendored
2
js/dist/dropdown.js.map
vendored
File diff suppressed because one or more lines are too long
55
js/dist/modal.js
vendored
55
js/dist/modal.js
vendored
@@ -53,7 +53,7 @@ var Modal = (function ($) {
|
||||
KEYDOWN_DISMISS: 'keydown.dismiss' + EVENT_KEY,
|
||||
MOUSEUP_DISMISS: 'mouseup.dismiss' + EVENT_KEY,
|
||||
MOUSEDOWN_DISMISS: 'mousedown.dismiss' + EVENT_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
@@ -91,6 +91,14 @@ var Modal = (function ($) {
|
||||
this._scrollbarWidth = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Modal, [{
|
||||
key: 'toggle',
|
||||
|
||||
@@ -190,11 +198,11 @@ var Modal = (function ($) {
|
||||
this._originalBodyPadding = null;
|
||||
this._scrollbarWidth = null;
|
||||
}
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
|
||||
// private
|
||||
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
value: function _getConfig(config) {
|
||||
config = $.extend({}, Default, config);
|
||||
Util.typeCheckConfig(NAME, config, DefaultType);
|
||||
@@ -312,7 +320,7 @@ var Modal = (function ($) {
|
||||
$(this._backdrop).addClass(animate);
|
||||
}
|
||||
|
||||
$(this._backdrop).appendTo(this.$body);
|
||||
$(this._backdrop).appendTo(document.body);
|
||||
|
||||
$(this._element).on(Event.CLICK_DISMISS, function (event) {
|
||||
if (_this6._ignoreBackdropClick) {
|
||||
@@ -364,14 +372,14 @@ var Modal = (function ($) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_handleUpdate',
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// the following methods are used to handle overflowing modals
|
||||
// todo (fat): these should probably be refactored out of modal.js
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
}, {
|
||||
key: '_handleUpdate',
|
||||
value: function _handleUpdate() {
|
||||
this._adjustDialog();
|
||||
}
|
||||
@@ -433,24 +441,11 @@ var Modal = (function ($) {
|
||||
document.body.removeChild(scrollDiv);
|
||||
return scrollbarWidth;
|
||||
}
|
||||
}], [{
|
||||
key: 'VERSION',
|
||||
|
||||
// getters
|
||||
|
||||
get: function () {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function () {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: '_jQueryInterface',
|
||||
|
||||
// static
|
||||
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
value: function _jQueryInterface(config, relatedTarget) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
@@ -468,17 +463,21 @@ var Modal = (function ($) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Modal;
|
||||
})();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
var _this7 = this;
|
||||
|
||||
@@ -526,4 +525,4 @@ var Modal = (function ($) {
|
||||
|
||||
return Modal;
|
||||
})(jQuery);
|
||||
//# sourceMappingURL=modal.js.map
|
||||
//# sourceMappingURL=modal.js.map
|
||||
|
2
js/dist/modal.js.map
vendored
2
js/dist/modal.js.map
vendored
File diff suppressed because one or more lines are too long
108
js/dist/popover.js
vendored
108
js/dist/popover.js
vendored
@@ -2,9 +2,11 @@
|
||||
|
||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
||||
|
||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
@@ -69,15 +71,19 @@ var Popover = (function ($) {
|
||||
*/
|
||||
|
||||
var Popover = (function (_Tooltip) {
|
||||
_inherits(Popover, _Tooltip);
|
||||
|
||||
function Popover() {
|
||||
_classCallCheck(this, Popover);
|
||||
|
||||
if (_Tooltip != null) {
|
||||
_Tooltip.apply(this, arguments);
|
||||
}
|
||||
_get(Object.getPrototypeOf(Popover.prototype), 'constructor', this).apply(this, arguments);
|
||||
}
|
||||
|
||||
_inherits(Popover, _Tooltip);
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
_createClass(Popover, [{
|
||||
key: 'isWithContent',
|
||||
@@ -111,57 +117,19 @@ var Popover = (function ($) {
|
||||
|
||||
this.cleanupTether();
|
||||
}
|
||||
}, {
|
||||
key: '_getContent',
|
||||
|
||||
// private
|
||||
|
||||
}, {
|
||||
key: '_getContent',
|
||||
value: function _getContent() {
|
||||
return this.element.getAttribute('data-content') || (typeof this.config.content == 'function' ? this.config.content.call(this.element) : this.config.content);
|
||||
}
|
||||
}], [{
|
||||
key: 'VERSION',
|
||||
|
||||
// getters
|
||||
|
||||
get: function () {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function () {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: 'NAME',
|
||||
get: function () {
|
||||
return NAME;
|
||||
}
|
||||
}, {
|
||||
key: 'DATA_KEY',
|
||||
get: function () {
|
||||
return DATA_KEY;
|
||||
}
|
||||
}, {
|
||||
key: 'Event',
|
||||
get: function () {
|
||||
return Event;
|
||||
}
|
||||
}, {
|
||||
key: 'EVENT_KEY',
|
||||
get: function () {
|
||||
return EVENT_KEY;
|
||||
}
|
||||
}, {
|
||||
key: 'DefaultType',
|
||||
get: function () {
|
||||
return DefaultType;
|
||||
}
|
||||
}, {
|
||||
key: '_jQueryInterface',
|
||||
|
||||
// static
|
||||
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
@@ -181,17 +149,49 @@ var Popover = (function ($) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
|
||||
// getters
|
||||
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: 'NAME',
|
||||
get: function get() {
|
||||
return NAME;
|
||||
}
|
||||
}, {
|
||||
key: 'DATA_KEY',
|
||||
get: function get() {
|
||||
return DATA_KEY;
|
||||
}
|
||||
}, {
|
||||
key: 'Event',
|
||||
get: function get() {
|
||||
return Event;
|
||||
}
|
||||
}, {
|
||||
key: 'EVENT_KEY',
|
||||
get: function get() {
|
||||
return EVENT_KEY;
|
||||
}
|
||||
}, {
|
||||
key: 'DefaultType',
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Popover;
|
||||
})(Tooltip);
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Popover._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Popover;
|
||||
$.fn[NAME].noConflict = function () {
|
||||
@@ -201,4 +201,4 @@ var Popover = (function ($) {
|
||||
|
||||
return Popover;
|
||||
})(jQuery);
|
||||
//# sourceMappingURL=popover.js.map
|
||||
//# sourceMappingURL=popover.js.map
|
||||
|
2
js/dist/popover.js.map
vendored
2
js/dist/popover.js.map
vendored
File diff suppressed because one or more lines are too long
53
js/dist/scrollspy.js
vendored
53
js/dist/scrollspy.js
vendored
@@ -41,7 +41,7 @@ var ScrollSpy = (function ($) {
|
||||
var Event = {
|
||||
ACTIVATE: 'activate' + EVENT_KEY,
|
||||
SCROLL: 'scroll' + EVENT_KEY,
|
||||
LOAD_DATA_API: 'load' + EVENT_KEY + '' + DATA_API_KEY
|
||||
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
@@ -75,7 +75,7 @@ var ScrollSpy = (function ($) {
|
||||
this._element = element;
|
||||
this._scrollElement = element.tagName === 'BODY' ? window : element;
|
||||
this._config = this._getConfig(config);
|
||||
this._selector = '' + this._config.target + ' ' + Selector.NAV_ANCHORS;
|
||||
this._selector = this._config.target + ' ' + Selector.NAV_ANCHORS;
|
||||
this._offsets = [];
|
||||
this._targets = [];
|
||||
this._activeTarget = null;
|
||||
@@ -87,6 +87,14 @@ var ScrollSpy = (function ($) {
|
||||
this._process();
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(ScrollSpy, [{
|
||||
key: 'refresh',
|
||||
|
||||
@@ -144,11 +152,11 @@ var ScrollSpy = (function ($) {
|
||||
this._activeTarget = null;
|
||||
this._scrollHeight = null;
|
||||
}
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
|
||||
// private
|
||||
|
||||
}, {
|
||||
key: '_getConfig',
|
||||
value: function _getConfig(config) {
|
||||
config = $.extend({}, Default, config);
|
||||
|
||||
@@ -215,7 +223,7 @@ var ScrollSpy = (function ($) {
|
||||
|
||||
this._clear();
|
||||
|
||||
var selector = '' + this._selector + '[data-target="' + target + '"],' + ('' + this._selector + '[href="' + target + '"]');
|
||||
var selector = this._selector + '[data-target="' + target + '"],' + (this._selector + '[href="' + target + '"]');
|
||||
|
||||
// todo (fat): getting all the raw li's up the tree is not great.
|
||||
var parentListItems = $(selector).parents(Selector.LI);
|
||||
@@ -244,24 +252,11 @@ var ScrollSpy = (function ($) {
|
||||
$(activeParents[i]).removeClass(ClassName.ACTIVE);
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: 'VERSION',
|
||||
|
||||
// getters
|
||||
|
||||
get: function () {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function () {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: '_jQueryInterface',
|
||||
|
||||
// static
|
||||
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
@@ -277,17 +272,21 @@ var ScrollSpy = (function ($) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return ScrollSpy;
|
||||
})();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(window).on(Event.LOAD_DATA_API, function () {
|
||||
var scrollSpys = $.makeArray($(Selector.DATA_SPY));
|
||||
|
||||
@@ -312,4 +311,4 @@ var ScrollSpy = (function ($) {
|
||||
|
||||
return ScrollSpy;
|
||||
})(jQuery);
|
||||
//# sourceMappingURL=scrollspy.js.map
|
||||
//# sourceMappingURL=scrollspy.js.map
|
||||
|
2
js/dist/scrollspy.js.map
vendored
2
js/dist/scrollspy.js.map
vendored
File diff suppressed because one or more lines are too long
39
js/dist/tab.js
vendored
39
js/dist/tab.js
vendored
@@ -32,7 +32,7 @@ var Tab = (function ($) {
|
||||
HIDDEN: 'hidden' + EVENT_KEY,
|
||||
SHOW: 'show' + EVENT_KEY,
|
||||
SHOWN: 'shown' + EVENT_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
|
||||
var ClassName = {
|
||||
@@ -67,6 +67,14 @@ var Tab = (function ($) {
|
||||
this._element = element;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Tab, [{
|
||||
key: 'show',
|
||||
|
||||
@@ -142,11 +150,11 @@ var Tab = (function ($) {
|
||||
$.removeClass(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
}
|
||||
}, {
|
||||
key: '_activate',
|
||||
|
||||
// private
|
||||
|
||||
}, {
|
||||
key: '_activate',
|
||||
value: function _activate(element, container, callback) {
|
||||
var active = $(container).find(Selector.ACTIVE_CHILD)[0];
|
||||
var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || !!$(container).find(Selector.FADE_CHILD)[0]);
|
||||
@@ -211,19 +219,11 @@ var Tab = (function ($) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: 'VERSION',
|
||||
|
||||
// getters
|
||||
|
||||
get: function () {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: '_jQueryInterface',
|
||||
|
||||
// static
|
||||
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
@@ -239,17 +239,16 @@ var Tab = (function ($) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Tab;
|
||||
})();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
Tab._jQueryInterface.call($(this), 'show');
|
||||
@@ -270,4 +269,4 @@ var Tab = (function ($) {
|
||||
|
||||
return Tab;
|
||||
})(jQuery);
|
||||
//# sourceMappingURL=tab.js.map
|
||||
//# sourceMappingURL=tab.js.map
|
||||
|
2
js/dist/tab.js.map
vendored
2
js/dist/tab.js.map
vendored
File diff suppressed because one or more lines are too long
101
js/dist/tooltip.js
vendored
101
js/dist/tooltip.js
vendored
@@ -125,6 +125,14 @@ var Tooltip = (function ($) {
|
||||
this._setListeners();
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// getters
|
||||
|
||||
_createClass(Tooltip, [{
|
||||
key: 'enable',
|
||||
|
||||
@@ -296,11 +304,11 @@ var Tooltip = (function ($) {
|
||||
|
||||
this._hoverState = '';
|
||||
}
|
||||
}, {
|
||||
key: 'isWithContent',
|
||||
|
||||
// protected
|
||||
|
||||
}, {
|
||||
key: 'isWithContent',
|
||||
value: function isWithContent() {
|
||||
return !!this.getTitle();
|
||||
}
|
||||
@@ -346,11 +354,11 @@ var Tooltip = (function ($) {
|
||||
$(this.tip).removeClass(this._removeTetherClasses);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: '_getAttachment',
|
||||
|
||||
// private
|
||||
|
||||
}, {
|
||||
key: '_getAttachment',
|
||||
value: function _getAttachment(placement) {
|
||||
return AttachmentMap[placement.toUpperCase()];
|
||||
}
|
||||
@@ -509,49 +517,11 @@ var Tooltip = (function ($) {
|
||||
|
||||
return config;
|
||||
}
|
||||
}], [{
|
||||
key: 'VERSION',
|
||||
|
||||
// getters
|
||||
|
||||
get: function () {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function () {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: 'NAME',
|
||||
get: function () {
|
||||
return NAME;
|
||||
}
|
||||
}, {
|
||||
key: 'DATA_KEY',
|
||||
get: function () {
|
||||
return DATA_KEY;
|
||||
}
|
||||
}, {
|
||||
key: 'Event',
|
||||
get: function () {
|
||||
return Event;
|
||||
}
|
||||
}, {
|
||||
key: 'EVENT_KEY',
|
||||
get: function () {
|
||||
return EVENT_KEY;
|
||||
}
|
||||
}, {
|
||||
key: 'DefaultType',
|
||||
get: function () {
|
||||
return DefaultType;
|
||||
}
|
||||
}, {
|
||||
key: '_jQueryInterface',
|
||||
|
||||
// static
|
||||
|
||||
}], [{
|
||||
key: '_jQueryInterface',
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
@@ -571,17 +541,46 @@ var Tooltip = (function ($) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'VERSION',
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: 'NAME',
|
||||
get: function get() {
|
||||
return NAME;
|
||||
}
|
||||
}, {
|
||||
key: 'DATA_KEY',
|
||||
get: function get() {
|
||||
return DATA_KEY;
|
||||
}
|
||||
}, {
|
||||
key: 'Event',
|
||||
get: function get() {
|
||||
return Event;
|
||||
}
|
||||
}, {
|
||||
key: 'EVENT_KEY',
|
||||
get: function get() {
|
||||
return EVENT_KEY;
|
||||
}
|
||||
}, {
|
||||
key: 'DefaultType',
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Tooltip;
|
||||
})();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Tooltip._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Tooltip;
|
||||
$.fn[NAME].noConflict = function () {
|
||||
@@ -591,4 +590,4 @@ var Tooltip = (function ($) {
|
||||
|
||||
return Tooltip;
|
||||
})(jQuery);
|
||||
//# sourceMappingURL=tooltip.js.map
|
||||
//# sourceMappingURL=tooltip.js.map
|
||||
|
2
js/dist/tooltip.js.map
vendored
2
js/dist/tooltip.js.map
vendored
File diff suppressed because one or more lines are too long
4
js/dist/util.js
vendored
4
js/dist/util.js
vendored
@@ -137,7 +137,7 @@ var Util = (function ($) {
|
||||
if (value && isElement(value)) valueType = 'element';else valueType = toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new Error('' + componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".'));
|
||||
throw new Error(componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".'));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -148,4 +148,4 @@ var Util = (function ($) {
|
||||
|
||||
return Util;
|
||||
})(jQuery);
|
||||
//# sourceMappingURL=util.js.map
|
||||
//# sourceMappingURL=util.js.map
|
||||
|
2
js/dist/util.js.map
vendored
2
js/dist/util.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -313,7 +313,7 @@ const Modal = (($) => {
|
||||
$(this._backdrop).addClass(animate)
|
||||
}
|
||||
|
||||
$(this._backdrop).appendTo(this.$body)
|
||||
$(this._backdrop).appendTo(document.body)
|
||||
|
||||
$(this._element).on(Event.CLICK_DISMISS, (event) => {
|
||||
if (this._ignoreBackdropClick) {
|
||||
|
Reference in New Issue
Block a user