mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-19 11:51:23 +02:00
grunt
This commit is contained in:
18
dist/js/bootstrap.js
vendored
18
dist/js/bootstrap.js
vendored
@@ -963,6 +963,7 @@ if (typeof jQuery === 'undefined') {
|
||||
|
||||
this.setScrollbar()
|
||||
this.escape()
|
||||
if (this.options.backdrop) this.resize()
|
||||
|
||||
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
||||
|
||||
@@ -977,6 +978,8 @@ if (typeof jQuery === 'undefined') {
|
||||
.show()
|
||||
.scrollTop(0)
|
||||
|
||||
if (that.options.backdrop) that.setBackdropHeight()
|
||||
|
||||
if (transition) {
|
||||
that.$element[0].offsetWidth // force reflow
|
||||
}
|
||||
@@ -1011,6 +1014,7 @@ if (typeof jQuery === 'undefined') {
|
||||
this.isShown = false
|
||||
|
||||
this.escape()
|
||||
if (this.options.backdrop) this.resize()
|
||||
|
||||
$(document).off('focusin.bs.modal')
|
||||
|
||||
@@ -1046,6 +1050,14 @@ if (typeof jQuery === 'undefined') {
|
||||
}
|
||||
}
|
||||
|
||||
Modal.prototype.resize = function () {
|
||||
if (this.isShown) {
|
||||
$(window).on('resize.bs.modal', $.proxy(this.setBackdropHeight, this))
|
||||
} else {
|
||||
$(window).off('resize.bs.modal')
|
||||
}
|
||||
}
|
||||
|
||||
Modal.prototype.hideModal = function () {
|
||||
var that = this
|
||||
this.$element.hide()
|
||||
@@ -1107,6 +1119,12 @@ if (typeof jQuery === 'undefined') {
|
||||
}
|
||||
}
|
||||
|
||||
Modal.prototype.setBackdropHeight = function () {
|
||||
this.$backdrop
|
||||
.css('height', 0)
|
||||
.css('height', this.$element[0].scrollHeight)
|
||||
}
|
||||
|
||||
Modal.prototype.checkScrollbar = function () {
|
||||
this.scrollbarWidth = this.measureScrollbar()
|
||||
}
|
||||
|
4
dist/js/bootstrap.min.js
vendored
4
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user