2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-20 20:00:36 +03:00

only fire hidden once backdrop has been removed

This commit is contained in:
fat
2013-02-07 20:13:40 -08:00
parent 1bf070b4ce
commit 366e1e0a6d
4 changed files with 28 additions and 25 deletions
+9 -8
View File
@@ -138,12 +138,13 @@
}) })
} }
, hideModal: function (that) { , hideModal: function () {
this.$element var that = this
.hide() this.$element.hide()
.trigger('hidden') this.backdrop(function () {
that.removeBackdrop()
this.backdrop() that.$element.trigger('hidden')
})
} }
, removeBackdrop: function () { , removeBackdrop: function () {
@@ -181,8 +182,8 @@
this.$backdrop.removeClass('in') this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')? $.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) : this.$backdrop.one($.support.transition.end, callback) :
this.removeBackdrop() callback()
} else if (callback) { } else if (callback) {
callback() callback()
+9 -8
View File
@@ -936,12 +936,13 @@
}) })
} }
, hideModal: function (that) { , hideModal: function () {
this.$element var that = this
.hide() this.$element.hide()
.trigger('hidden') this.backdrop(function () {
that.removeBackdrop()
this.backdrop() that.$element.trigger('hidden')
})
} }
, removeBackdrop: function () { , removeBackdrop: function () {
@@ -979,8 +980,8 @@
this.$backdrop.removeClass('in') this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')? $.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) : this.$backdrop.one($.support.transition.end, callback) :
this.removeBackdrop() callback()
} else if (callback) { } else if (callback) {
callback() callback()
+1 -1
View File
File diff suppressed because one or more lines are too long
+9 -8
View File
@@ -138,12 +138,13 @@
}) })
} }
, hideModal: function (that) { , hideModal: function () {
this.$element var that = this
.hide() this.$element.hide()
.trigger('hidden') this.backdrop(function () {
that.removeBackdrop()
this.backdrop() that.$element.trigger('hidden')
})
} }
, removeBackdrop: function () { , removeBackdrop: function () {
@@ -181,8 +182,8 @@
this.$backdrop.removeClass('in') this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')? $.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) : this.$backdrop.one($.support.transition.end, callback) :
this.removeBackdrop() callback()
} else if (callback) { } else if (callback) {
callback() callback()