0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-30 22:52:24 +01:00

Merge branch '2.1.2-wip' into box-sizing-exercise

This commit is contained in:
Mark Otto 2012-09-26 16:02:33 -07:00
commit ad96435d27
14 changed files with 32 additions and 64 deletions

View File

@ -4771,22 +4771,6 @@ input[type="submit"].btn::-moz-focus-inner {
background-color: #fff; background-color: #fff;
} }
.modal-open .modal .dropdown-menu {
z-index: 2050;
}
.modal-open .modal .dropdown.open {
*z-index: 2050;
}
.modal-open .modal .popover {
z-index: 2060;
}
.modal-open .modal .tooltip {
z-index: 2080;
}
.modal-backdrop { .modal-backdrop {
position: fixed; position: fixed;
top: 0; top: 0;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -28,7 +28,9 @@
var Affix = function (element, options) { var Affix = function (element, options) {
this.options = $.extend({}, $.fn.affix.defaults, options) this.options = $.extend({}, $.fn.affix.defaults, options)
this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) this.$window = $(window)
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
this.$element = $(element) this.$element = $(element)
this.checkPosition() this.checkPosition()
} }

View File

@ -49,8 +49,6 @@
if (this.isShown || e.isDefaultPrevented()) return if (this.isShown || e.isDefaultPrevented()) return
$('body').addClass('modal-open')
this.isShown = true this.isShown = true
this.escape() this.escape()
@ -96,8 +94,6 @@
this.isShown = false this.isShown = false
$('body').removeClass('modal-open')
this.escape() this.escape()
$(document).off('focusin.modal') $(document).off('focusin.modal')

View File

@ -121,7 +121,7 @@
$tip $tip
.remove() .remove()
.css({ top: 0, left: 0, display: 'block' }) .css({ top: 0, left: 0, display: 'block' })
.appendTo(inside ? this.$element : document.body) .insertAfter(this.$element)
pos = this.getPosition(inside) pos = this.getPosition(inside)
@ -144,7 +144,7 @@
} }
$tip $tip
.css(tp) .offset(tp)
.addClass(placement) .addClass(placement)
.addClass('in') .addClass('in')
} }
@ -269,7 +269,7 @@
, trigger: 'hover' , trigger: 'hover'
, title: '' , title: ''
, delay: 0 , delay: 0
, html: true , html: false
} }
}(window.jQuery); }(window.jQuery);

View File

@ -773,8 +773,6 @@
if (this.isShown || e.isDefaultPrevented()) return if (this.isShown || e.isDefaultPrevented()) return
$('body').addClass('modal-open')
this.isShown = true this.isShown = true
this.escape() this.escape()
@ -820,8 +818,6 @@
this.isShown = false this.isShown = false
$('body').removeClass('modal-open')
this.escape() this.escape()
$(document).off('focusin.modal') $(document).off('focusin.modal')
@ -1083,7 +1079,7 @@
$tip $tip
.remove() .remove()
.css({ top: 0, left: 0, display: 'block' }) .css({ top: 0, left: 0, display: 'block' })
.appendTo(inside ? this.$element : document.body) .insertAfter(this.$element)
pos = this.getPosition(inside) pos = this.getPosition(inside)
@ -1106,7 +1102,7 @@
} }
$tip $tip
.css(tp) .offset(tp)
.addClass(placement) .addClass(placement)
.addClass('in') .addClass('in')
} }
@ -1231,11 +1227,10 @@
, trigger: 'hover' , trigger: 'hover'
, title: '' , title: ''
, delay: 0 , delay: 0
, html: true , html: false
} }
}(window.jQuery); }(window.jQuery);/* ===========================================================
/* ===========================================================
* bootstrap-popover.js v2.1.2 * bootstrap-popover.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#popovers * http://twitter.github.com/bootstrap/javascript.html#popovers
* =========================================================== * ===========================================================
@ -1960,7 +1955,9 @@
var Affix = function (element, options) { var Affix = function (element, options) {
this.options = $.extend({}, $.fn.affix.defaults, options) this.options = $.extend({}, $.fn.affix.defaults, options)
this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) this.$window = $(window)
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
this.$element = $(element) this.$element = $(element)
this.checkPosition() this.checkPosition()
} }

File diff suppressed because one or more lines are too long

View File

@ -504,8 +504,8 @@ $('#myModal').on('hidden', function () {
<p><em>None</em></p> <p><em>None</em></p>
<h3>Methods</h3> <h3>Methods</h3>
<h4>$().dropdown()</h4> <h4>$().dropdown('toggle')</h4>
<p>A programatic api for activating menus for a given navbar or tabbed navigation.</p> <p>A programatic api for toggling menus for a given navbar or tabbed navigation.</p>
</section> </section>
@ -802,7 +802,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<tr> <tr>
<td>html</td> <td>html</td>
<td>boolean</td> <td>boolean</td>
<td>true</td> <td>false</td>
<td>Insert html into the tooltip. If false, jquery's <code>text</code> method will be used to insert content into the dom. Use text if you're worried about XSS attacks.</td> <td>Insert html into the tooltip. If false, jquery's <code>text</code> method will be used to insert content into the dom. Use text if you're worried about XSS attacks.</td>
</tr> </tr>
<tr> <tr>
@ -962,7 +962,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<tr> <tr>
<td>html</td> <td>html</td>
<td>boolean</td> <td>boolean</td>
<td>true</td> <td>false</td>
<td>Insert html into the popover. If false, jquery's <code>text</code> method will be used to insert content into the dom. Use text if you're worried about XSS attacks.</td> <td>Insert html into the popover. If false, jquery's <code>text</code> method will be used to insert content into the dom. Use text if you're worried about XSS attacks.</td>
</tr> </tr>
<tr> <tr>

View File

@ -436,8 +436,8 @@ $('#myModal').on('hidden', function () {
<p><em>{{_i}}None{{/i}}</em></p> <p><em>{{_i}}None{{/i}}</em></p>
<h3>{{_i}}Methods{{/i}}</h3> <h3>{{_i}}Methods{{/i}}</h3>
<h4>$().dropdown()</h4> <h4>$().dropdown('toggle')</h4>
<p>{{_i}}A programatic api for activating menus for a given navbar or tabbed navigation.{{/i}}</p> <p>{{_i}}A programatic api for toggling menus for a given navbar or tabbed navigation.{{/i}}</p>
</section> </section>
@ -734,7 +734,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<tr> <tr>
<td>{{_i}}html{{/i}}</td> <td>{{_i}}html{{/i}}</td>
<td>{{_i}}boolean{{/i}}</td> <td>{{_i}}boolean{{/i}}</td>
<td>true</td> <td>false</td>
<td>{{_i}}Insert html into the tooltip. If false, jquery's <code>text</code> method will be used to insert content into the dom. Use text if you're worried about XSS attacks.{{/i}}</td> <td>{{_i}}Insert html into the tooltip. If false, jquery's <code>text</code> method will be used to insert content into the dom. Use text if you're worried about XSS attacks.{{/i}}</td>
</tr> </tr>
<tr> <tr>
@ -894,7 +894,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<tr> <tr>
<td>{{_i}}html{{/i}}</td> <td>{{_i}}html{{/i}}</td>
<td>{{_i}}boolean{{/i}}</td> <td>{{_i}}boolean{{/i}}</td>
<td>true</td> <td>false</td>
<td>{{_i}}Insert html into the popover. If false, jquery's <code>text</code> method will be used to insert content into the dom. Use text if you're worried about XSS attacks.{{/i}}</td> <td>{{_i}}Insert html into the popover. If false, jquery's <code>text</code> method will be used to insert content into the dom. Use text if you're worried about XSS attacks.{{/i}}</td>
</tr> </tr>
<tr> <tr>

View File

@ -28,7 +28,9 @@
var Affix = function (element, options) { var Affix = function (element, options) {
this.options = $.extend({}, $.fn.affix.defaults, options) this.options = $.extend({}, $.fn.affix.defaults, options)
this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) this.$window = $(window)
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
this.$element = $(element) this.$element = $(element)
this.checkPosition() this.checkPosition()
} }

View File

@ -49,8 +49,6 @@
if (this.isShown || e.isDefaultPrevented()) return if (this.isShown || e.isDefaultPrevented()) return
$('body').addClass('modal-open')
this.isShown = true this.isShown = true
this.escape() this.escape()
@ -96,8 +94,6 @@
this.isShown = false this.isShown = false
$('body').removeClass('modal-open')
this.escape() this.escape()
$(document).off('focusin.modal') $(document).off('focusin.modal')

View File

@ -121,7 +121,7 @@
$tip $tip
.remove() .remove()
.css({ top: 0, left: 0, display: 'block' }) .css({ top: 0, left: 0, display: 'block' })
.appendTo(inside ? this.$element : document.body) .insertAfter(this.$element)
pos = this.getPosition(inside) pos = this.getPosition(inside)
@ -144,7 +144,7 @@
} }
$tip $tip
.css(tp) .offset(tp)
.addClass(placement) .addClass(placement)
.addClass('in') .addClass('in')
} }
@ -269,7 +269,7 @@
, trigger: 'hover' , trigger: 'hover'
, title: '' , title: ''
, delay: 0 , delay: 0
, html: true , html: false
} }
}(window.jQuery); }(window.jQuery);

View File

@ -37,10 +37,11 @@ $(function () {
tooltip.tooltip('hide') tooltip.tooltip('hide')
}) })
test("should always allow html entities", function () { test("should allow html entities", function () {
$.support.transition = false $.support.transition = false
var tooltip = $('<a href="#" rel="tooltip" title="<b>@fat</b>"></a>') var tooltip = $('<a href="#" rel="tooltip" title="<b>@fat</b>"></a>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
.tooltip({html: true})
.tooltip('show') .tooltip('show')
ok($('.tooltip b').length, 'b tag was inserted') ok($('.tooltip b').length, 'b tag was inserted')

View File

@ -2,16 +2,6 @@
// Modals // Modals
// -------------------------------------------------- // --------------------------------------------------
// Recalculate z-index where appropriate,
// but only apply to elements within modal
.modal-open .modal {
.dropdown-menu { z-index: @zindexDropdown + @zindexModal; }
.dropdown.open { *z-index: @zindexDropdown + @zindexModal; }
.popover { z-index: @zindexPopover + @zindexModal; }
.tooltip { z-index: @zindexTooltip + @zindexModal; }
}
// Background // Background
.modal-backdrop { .modal-backdrop {
position: fixed; position: fixed;