8000 Merge branch '2.1.2-wip' of github.com:twitter/bootstrap into 2.1.2-wip · rusongyu/bootstrap@24e277b · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 24e277b

Browse files
committed
Merge branch '2.1.2-wip' of github.com:twitter/bootstrap into 2.1.2-wip
2 parents 498a28b + 0540b63 commit 24e277b

13 files changed

+32
-64
lines changed

docs/assets/css/bootstrap.css

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4985,22 +4985,6 @@ input[type="submit"].btn.btn-mini {
49854985
background-color: #fff;
49864986
}
49874987

4988-
.modal-open .modal .dropdown-menu {
4989-
z-index: 2050;
4990-
}
4991-
4992-
.modal-open .modal .dropdown.open {
4993-
*z-index: 2050;
4994-
}
4995-
4996-
.modal-open .modal .popover {
4997-
z-index: 2060;
4998-
}
4999-
5000-
.modal-open .modal .tooltip {
5001-
z-index: 2080;
5002-
}
5003-
50044988
.modal-backdrop {
50054989
position: fixed;
50064990
top: 0;

docs/assets/js/bootstrap-affix.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828

2929
var Affix = function (element, options) {
3030
this.options = $.extend({}, $.fn.affix.defaults, options)
31-
this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
31+
this.$window = $(window)
32+
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
33+
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
3234
this.$element = $(element)
3335
this.checkPosition()
3436
}

docs/assets/js/bootstrap-modal.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949

5050
if (this.isShown || e.isDefaultPrevented()) return
5151

52-
$('body').addClass('modal-open')
53-
5452
this.isShown = true
5553

5654
this.escape()
@@ -96,8 +94,6 @@
9694

9795
this.isShown = false
9896

99-
$('body').removeClass('modal-open')
100-
10197
this.escape()
10298

10399
$(document).off('focusin.modal')

docs/assets/js/bootstrap-tooltip.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
$tip
122122
.remove()
123123
.css({ top: 0, left: 0, display: 'block' })
124-
.appendTo(inside ? this.$element : document.body)
124+
.insertAfter(this.$element)
125125

126126
pos = this.getPosition(inside)
127127

@@ -144,7 +144,7 @@
144144
}
145145

146146
$tip
147-
.css(tp)
147+
.offset(tp)
148148
.addClass(placement)
149149
.addClass('in')
150150
}
@@ -269,7 +269,7 @@
269269
, trigger: 'hover'
270270
, title: ''
271271
, delay: 0
272-
, html: true
272+
, html: false
273273
}
274274

275-
}(window.jQuery);
275+
}(window.jQuery);

docs/assets/js/bootstrap.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,6 @@
773773

774774
if (this.isShown || e.isDefaultPrevented()) return
775775

776-
$('body').addClass('modal-open')
777-
778776
this.isShown = true
779777

780778
this.escape()
@@ -820,8 +818,6 @@
820818

821819
this.isShown = false
822820

823-
$('body').removeClass('modal-open')
824-
825821
this.escape()
826822

827823
$(document).off('focusin.modal')
@@ -1083,7 +1079,7 @@
10831079
$tip
10841080
.remove()
10851081
.css({ top: 0, left: 0, display: 'block' })
1086-
.appendTo(inside ? this.$element : document.body)
1082+
.insertAfter(this.$element)
10871083

10881084
pos = this.getPosition(inside)
10891085

@@ -1106,7 +1102,7 @@
11061102
}
11071103

11081104
$tip
1109-
.css(tp)
1105+
.offset(tp)
11101106
.addClass(placement)
11111107
.addClass('in')
11121108
}
@@ -1231,11 +1227,10 @@
12311227
, trigger: 'hover'
12321228
, title: ''
12331229
, delay: 0
1234-
, html: true
1230+
, html: false
12351231
}
12361232

1237-
}(window.jQuery);
1238-
/* ===========================================================
1233+
}(window.jQuery);/* ===========================================================
12391234
* bootstrap-popover.js v2.1.2
12401235
* http://twitter.github.com/bootstrap/javascript.html#popovers
12411236
* ===========================================================
@@ -1960,7 +1955,9 @@
19601955

19611956
var Affix = function (element, options) {
19621957
this.options = $.extend({}, $.fn.affix.defaults, options)
1963-
this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
1958+
this.$window = $(window)
1959+
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
1960+
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
19641961
this.$element = $(element)
19651962
this.checkPosition()
19661963
}

docs/assets/js/bootstrap.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/javascript.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,8 @@ <h3>Options</h3>
506506
<p><em>None</em></p>
507507

508508
<h3>Methods</h3>
509-
<h4>$().dropdown()</h4>
510-
<p>A programatic api for activating menus for a given navbar or tabbed navigation.</p>
509+
<h4>$().dropdown('toggle')</h4>
510+
<p>A programatic api for toggling menus for a given navbar or tabbed navigation.</p>
511511
</section>
512512

513513

@@ -804,7 +804,7 @@ <h3>Options</h3>
804804
<tr>
805805
<td>html</td>
806806
<td>boolean</td>
807-
<td>true</td>
807+
<td>false</td>
808808
<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>
809809
</tr>
810810
<tr>
@@ -964,7 +964,7 @@ <h3>Options</h3>
964964
<tr>
965965
<td>html</td>
966966
<td>boolean</td>
967-
<td>true</td>
967+
<td>false</td>
968968
<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>
969969
</tr>
970970
<tr>
< F438 /div>

docs/templates/pages/javascript.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,8 @@ $('#myModal').on('hidden', function () {
436436
<p><em>{{_i}}None{{/i}}</em></p>
437437

438438
<h3>{{_i}}Methods{{/i}}</h3>
439-
<h4>$().dropdown()</h4>
440-
<p>{{_i}}A programatic api for activating menus for a given navbar or tabbed navigation.{{/i}}</p>
439+
<h4>$().dropdown('toggle')</h4>
440+
<p>{{_i}}A programatic api for toggling menus for a given navbar or tabbed navigation.{{/i}}</p>
441441
</section>
442442

443443

@@ -734,7 +734,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
734734
<tr>
735735
<td>{{_i}}html{{/i}}</td>
736736
<td>{{_i}}boolean{{/i}}</td>
737-
<td>true</td>
737+
<td>false</td>
738738
<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>
739739
</tr>
740740
<tr>
@@ -894,7 +894,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
894894
<tr>
895895
<td>{{_i}}html{{/i}}</td>
896896
<td>{{_i}}boolean{{/i}}</td>
897-
<td>true</td>
897+
<td>false</td>
898898
<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>
899899
</tr>
900900
<tr>

js/bootstrap-affix.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828

2929
var Affix = function 10000 (element, options) {
3030
this.options = $.extend({}, $.fn.affix.defaults, options)
31-
this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
31+
this.$window = $(window)
32+
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
33+
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
3234
this.$element = $(element)
3335
this.checkPosition()
3436
}

js/bootstrap-modal.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949

5050
if (this.isShown || e.isDefaultPrevented()) return
5151

52-
$('body').addClass('modal-open')
53-
5452
this.isShown = true
5553

5654
this.escape()
@@ -96,8 +94,6 @@
9694

9795
this.isShown = false
9896

99-
$('body').removeClass('modal-open')
100-
10197
this.escape()
10298

10399
$(document).off('focusin.modal')

js/bootstrap-tooltip.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
$tip
122122
.remove()
123123
.css({ top: 0, left: 0, display: 'block' })
124-
.appendTo(inside ? this.$element : document.body)
124+
.insertAfter(this.$element)
125125

126126
pos = this.getPosition(inside)
127127

@@ -144,7 +144,7 @@
144144
}
145145

146146
$tip
147-
.css(tp)
147+
.offset(tp)
148148
.addClass(placement)
149149
.addClass('in')
150150
}
@@ -269,7 +269,7 @@
269269
, trigger: 'hover'
270270
, title: ''
271271
, delay: 0
272-
, html: true
272+
, html: false
273273
}
274274

275-
}(window.jQuery);
275+
}(window.jQuery);

js/tests/unit/bootstrap-tooltip.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ $(function () {
3737
tooltip.tooltip('hide')
3838
})
3939

40-
test("should always allow html entities", function () {
40+
test("should allow html entities", function () {
4141
$.support.transition = false
4242
var tooltip = $('<a href="#" rel="tooltip" title="<b>@fat</b>"></a>')
4343
.appendTo('#qunit-fixture')
44+
.tooltip({html: true})
4445
.tooltip('show')
4546

4647
ok($('.tooltip b').length, 'b tag was inserted')

less/modals.less

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22
// Modals
33
// --------------------------------------------------
44

5-
6-
// Recalculate z-index where appropriate,
7-
// but only apply to elements within modal
8-
.modal-open .modal {
9-
.dropdown-menu { z-index: @zindexDropdown + @zindexModal; }
10-
.dropdown.open { *z-index: @zindexDropdown + @zindexModal; }
11-
.popover { z-index: @zindexPopover + @zindexModal; }
12-
.tooltip { z-index: @zindexTooltip + @zindexModal; }
13-
}
14-
155
// Background
166
.modal-backdrop {
177
position: fixed;

0 commit comments

Comments
 (0)
0