diff options
| author | fat <[email protected]> | 2013-02-07 22:13:13 -0800 |
|---|---|---|
| committer | fat <[email protected]> | 2013-02-07 22:13:13 -0800 |
| commit | 8c7f9c66a7d12f47f50618ef420868fe836d0c33 (patch) | |
| tree | 552f251d1637a1749c34fcdbb3390653d2fdb8ae /js/bootstrap-modal.js | |
| parent | ee91afba63bc6e9687397b9052858fca242c2ff5 (diff) | |
| parent | c4d47fb1ea45ed2fc3cf382d087ed87b87c69288 (diff) | |
| download | bootstrap-2.3.0.tar.xz bootstrap-2.3.0.zip | |
Merge branch '2.3.0-wip'v2.3.0
Diffstat (limited to 'js/bootstrap-modal.js')
| -rw-r--r-- | js/bootstrap-modal.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index 689a414ed..b5ffa95b3 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -1,5 +1,5 @@ /* ========================================================= - * bootstrap-modal.js v2.2.2 + * bootstrap-modal.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#modals * ========================================================= * Copyright 2012 Twitter, Inc. @@ -60,8 +60,7 @@ that.$element.appendTo(document.body) //don't move modals dom position } - that.$element - .show() + that.$element.show() if (transition) { that.$element[0].offsetWidth // force reflow @@ -139,12 +138,13 @@ }) } - , hideModal: function (that) { - this.$element - .hide() - .trigger('hidden') - - this.backdrop() + , hideModal: function () { + var that = this + this.$element.hide() + this.backdrop(function () { + that.removeBackdrop() + that.$element.trigger('hidden') + }) } , removeBackdrop: function () { @@ -172,6 +172,8 @@ this.$backdrop.addClass('in') + if (!callback) return + doAnimate ? this.$backdrop.one($.support.transition.end, callback) : callback() @@ -180,8 +182,8 @@ this.$backdrop.removeClass('in') $.support.transition && this.$element.hasClass('fade')? - this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) : - this.removeBackdrop() + this.$backdrop.one($.support.transition.end, callback) : + callback() } else if (callback) { callback() |
