1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-16 02:24:19 +02:00

fix modal

This commit is contained in:
Jacob Thornton
2015-08-12 21:12:03 -07:00
parent 9bdb6d13f6
commit 11abb0f7e9
38 changed files with 1750 additions and 4019 deletions

39
js/dist/alert.js vendored
View File

@@ -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