diff options
author | Jacob Thornton <jacobthornton@gmail.com> | 2015-08-13 07:12:03 +0300 |
---|---|---|
committer | Jacob Thornton <jacobthornton@gmail.com> | 2015-08-13 07:12:03 +0300 |
commit | 11abb0f7e94771bcf604c72b34f6688e6aa3a290 (patch) | |
tree | 35266bd178dc46aa2371b41d88e4c5b142749651 /js/dist/modal.js | |
parent | 9bdb6d13f606ec18d808a30e5ebc28ec3eb82a4b (diff) |
fix modal
Diffstat (limited to 'js/dist/modal.js')
-rw-r--r-- | js/dist/modal.js | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/js/dist/modal.js b/js/dist/modal.js index 2a63877259..ef33f10103 100644 --- a/js/dist/modal.js +++ b/js/dist/modal.js @@ -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
\ No newline at end of file +//# sourceMappingURL=modal.js.map |