0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Merge branch '2.1.1-wip' of github.com:twitter/bootstrap into 2.1.1-wip

This commit is contained in:
Mark Otto 2012-08-27 21:06:29 -07:00
commit 55982664d0
8 changed files with 38 additions and 18 deletions

View File

@ -4831,19 +4831,19 @@ input[type="submit"].btn.btn-mini {
background-color: #fff;
}
.modal-open .dropdown-menu {
.modal-open .modal .dropdown-menu {
z-index: 2050;
}
.modal-open .dropdown.open {
.modal-open .modal .dropdown.open {
*z-index: 2050;
}
.modal-open .popover {
.modal-open .modal .popover {
z-index: 2060;
}
.modal-open .tooltip {
.modal-open .modal .tooltip {
z-index: 2080;
}

View File

@ -51,7 +51,7 @@
}
Button.prototype.toggle = function () {
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
$parent && $parent
.find('.active')

View File

@ -199,7 +199,7 @@
}
Button.prototype.toggle = function () {
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
$parent && $parent
.find('.active')

File diff suppressed because one or more lines are too long

View File

@ -37,14 +37,14 @@
<div class="row-fluid">
<div class="span6">
<h2>Download compiled</h2>
<p><strong>Fastest way to get started:</strong> get the compiled and minified versions of our CSS, JS, and images. No docs or original source files.</p>
<p><a class="btn btn-large btn-primary" href="assets/bootstrap.zip" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download compiled']);"{{/production}}>Download Bootstrap</a></p>
<h2>{{_i}}Download compiled{{/i}}</h2>
<p>{{_i}}<strong>Fastest way to get started:</strong> get the compiled and minified versions of our CSS, JS, and images. No docs or original source files.{{/i}}</p>
<p><a class="btn btn-large btn-primary" href="assets/bootstrap.zip" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download compiled']);"{{/production}}>{{_i}}Download Bootstrap{{/i}}</a></p>
</div>
<div class="span6">
<h2>Download source</h2>
<p>Get the original files for all CSS and JavaScript, along with a local copy of the docs by downloading the latest version directly from GitHub.</p>
<p><a class="btn btn-large" href="https://github.com/twitter/bootstrap/zipball/master" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download source']);"{{/production}}>Download Bootstrap source</a></p>
<p><a class="btn btn-large" href="https://github.com/twitter/bootstrap/zipball/master" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download source']);"{{/production}}>{{_i}}Download Bootstrap source{{/i}}</a></p>
</div>
</div>
</section>
@ -204,9 +204,9 @@
<div class="page-header">
<h1>{{_i}}What next?{{/i}}</h1>
</div>
<p class="lead">Head to the docs for information, examples, and code snippets, or take the next leap and customize Bootstrap for any upcoming project.</p>
<a class="btn btn-large btn-primary" href="./scaffolding.html" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Next steps', 'Visit docs']);"{{/production}}>Visit the Bootstrap docs</a>
<a class="btn btn-large" href="./customize.html" style="margin-left: 5px;" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Next steps', 'Customize']);"{{/production}}>Customize Bootstrap</a>
<p class="lead">{{_i}}Head to the docs for information, examples, and code snippets, or take the next leap and customize Bootstrap for any upcoming project.{{/i}}</p>
<a class="btn btn-large btn-primary" href="./scaffolding.html" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Next steps', 'Visit docs']);"{{/production}}>{{_i}}Visit the Bootstrap docs{{/i}}</a>
<a class="btn btn-large" href="./customize.html" style="margin-left: 5px;" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Next steps', 'Customize']);"{{/production}}>{{_i}}Customize Bootstrap{{/i}}</a>
</section>

View File

@ -51,7 +51,7 @@
}
Button.prototype.toggle = function () {
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
$parent && $parent
.find('.active')

View File

@ -62,7 +62,7 @@ $(function () {
ok(btn.hasClass('active'), 'btn has class active')
})
test("should toggle active when btn children are clicked within btn-group", function () {
test("should toggle active when btn children are clicked within btn-group", function () {
var btngroup = $('<div class="btn-group" data-toggle="buttons-checkbox"></div>')
, btn = $('<button class="btn">fat</button>')
, inner = $('<i></i>')
@ -74,4 +74,23 @@ $(function () {
ok(btn.hasClass('active'), 'btn has class active')
})
test("should check for closest matching toggle", function () {
var group = $("<div data-toggle='buttons-radio'></div>")
, btn1 = $("<button class='btn active'></button>")
, btn2 = $("<button class='btn'></button>")
, wrap = $("<div></div>")
wrap.append(btn1, btn2)
group
.append(wrap)
.appendTo($('#qunit-fixture'))
ok(btn1.hasClass('active'), 'btn1 has active class')
ok(!btn2.hasClass('active'), 'btn2 does not have active class')
btn2.click()
ok(!btn1.hasClass('active'), 'btn1 does not have active class')
ok(btn2.hasClass('active'), 'btn2 has active class')
})
})

View File

@ -3,8 +3,9 @@
// --------------------------------------------------
// Recalculate z-index where appropriate
.modal-open {
// 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; }