Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'docs/assets/js/bootstrap-modal.js')
-rw-r--r--docs/assets/js/bootstrap-modal.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/docs/assets/js/bootstrap-modal.js b/docs/assets/js/bootstrap-modal.js
index 689a414ed6..b5ffa95b3b 100644
--- a/docs/assets/js/bootstrap-modal.js
+++ b/docs/assets/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()