mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-15 15:29:22 +01:00
Merge branch '3.0.0-wip' of github.com:twbs/bootstrap into 3.0.0-wip
This commit is contained in:
commit
fdb7121f41
4
dist/js/bootstrap.js
vendored
4
dist/js/bootstrap.js
vendored
@ -851,7 +851,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
|
|||||||
|
|
||||||
var Modal = function (element, options) {
|
var Modal = function (element, options) {
|
||||||
this.options = options
|
this.options = options
|
||||||
this.$element = $(element).on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
this.$element = $(element)
|
||||||
this.$backdrop =
|
this.$backdrop =
|
||||||
this.isShown = null
|
this.isShown = null
|
||||||
|
|
||||||
@ -880,6 +880,8 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
|
|||||||
|
|
||||||
this.escape()
|
this.escape()
|
||||||
|
|
||||||
|
this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
||||||
|
|
||||||
this.backdrop(function () {
|
this.backdrop(function () {
|
||||||
var transition = $.support.transition && that.$element.hasClass('fade')
|
var transition = $.support.transition && that.$element.hasClass('fade')
|
||||||
|
|
||||||
|
2
dist/js/bootstrap.min.js
vendored
2
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1104,7 +1104,7 @@ $('#myTooltip').on('hidden.bs.tooltip', function () {
|
|||||||
<td>string | false</td>
|
<td>string | false</td>
|
||||||
<td>false</td>
|
<td>false</td>
|
||||||
<td>
|
<td>
|
||||||
<p>Appends the popover to a specific element. Example: <code>container: 'body'</code></p>
|
<p>Appends the popover to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful inthat it allows you to position the popover in the flow of the document near the triggering element - which will prevent the popover from floating away from the triggering element during a window resize.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
var Modal = function (element, options) {
|
var Modal = function (element, options) {
|
||||||
this.options = options
|
this.options = options
|
||||||
this.$element = $(element).on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
this.$element = $(element)
|
||||||
this.$backdrop =
|
this.$backdrop =
|
||||||
this.isShown = null
|
this.isShown = null
|
||||||
|
|
||||||
@ -54,6 +54,8 @@
|
|||||||
|
|
||||||
this.escape()
|
this.escape()
|
||||||
|
|
||||||
|
this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
||||||
|
|
||||||
this.backdrop(function () {
|
this.backdrop(function () {
|
||||||
var transition = $.support.transition && that.$element.hasClass('fade')
|
var transition = $.support.transition && that.$element.hasClass('fade')
|
||||||
|
|
||||||
|
@ -174,4 +174,23 @@ $(function () {
|
|||||||
})
|
})
|
||||||
.modal("show")
|
.modal("show")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test("should close reopened modal with [data-dismiss=modal] click", function () {
|
||||||
|
stop()
|
||||||
|
$.support.transition = false
|
||||||
|
var div = $("<div id='modal-test'><div class='contents'><div id='close' data-dismiss='modal'></div></div></div>")
|
||||||
|
div
|
||||||
|
.bind("shown.bs.modal", function () {
|
||||||
|
$('#close').click()
|
||||||
|
ok(!$('#modal-test').is(":visible"), 'modal hidden')
|
||||||
|
})
|
||||||
|
.one("hidden.bs.modal", function() {
|
||||||
|
div.one('hidden.bs.modal', function () {
|
||||||
|
start()
|
||||||
|
}).modal("show")
|
||||||
|
})
|
||||||
|
.modal("show")
|
||||||
|
|
||||||
|
div.remove()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user