0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-18 10:52:19 +01:00

Merge branch 'master' into docs_derp

This commit is contained in:
Mark Otto 2013-11-16 22:02:59 -08:00
commit 03501f9c4a
18 changed files with 104 additions and 83 deletions

View File

@ -59,3 +59,21 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
With v3.1, we're moving from the Apache 2 to the MIT license for the Bootstrap code (not the docs). We're in the process of collecting permissions from all Bootstrap contributors with code still part of the project to make this happen. For details, please see [#2054](https://github.com/twbs/bootstrap/issues/2054). With v3.1, we're moving from the Apache 2 to the MIT license for the Bootstrap code (not the docs). We're in the process of collecting permissions from all Bootstrap contributors with code still part of the project to make this happen. For details, please see [#2054](https://github.com/twbs/bootstrap/issues/2054).
By contributing your code, you agree to dual-license your contribution under the [Apache 2](https://github.com/twbs/bootstrap/blob/master/LICENSE) and [MIT](https://github.com/twbs/bootstrap/blob/master/MIT) licenses. By contributing your code, you agree to dual-license your contribution under the [Apache 2](https://github.com/twbs/bootstrap/blob/master/LICENSE) and [MIT](https://github.com/twbs/bootstrap/blob/master/MIT) licenses.
## Release checklist
1. Close ship list issue for the release.
2. Close the milestone for the release.
3. Open new release issue that includes this checklist.
4. Ping folks to coordinate release (mainly @jdorfman for BootstrapCDN).
5. Update version numbers using `grunt change-version-number --oldver=A.B.C --newver=X.Y.Z`. Review the changes and stage them manually.
6. Run `grunt` one last time.
7. Push to `master` branch.
8. Merge `master` into `gh-pages`.
9. Generate `bootstrap-X.Y.Z-dist.zip` file for release.
10. Create release on GitHub with `/dist/` folder and release notes.
11. Push `gh-pages`.
12. Publish blog post.
13. Tweet tweet.

View File

@ -3,7 +3,19 @@
"version": "3.0.2", "version": "3.0.2",
"main": ["./dist/js/bootstrap.js", "./dist/css/bootstrap.css", "./dist/fonts/*"], "main": ["./dist/js/bootstrap.js", "./dist/css/bootstrap.css", "./dist/fonts/*"],
"ignore": [ "ignore": [
"**/.*" "**/.*",
"_*",
"docs-assets",
"examples",
"/fonts",
"js/tests",
"CNAME",
"CONTRIBUTING.md",
"Gruntfile.js",
"browserstack.json",
"composer.json",
"package.json",
"*.html"
], ],
"dependencies": { "dependencies": {
"jquery": ">= 1.9.0" "jquery": ">= 1.9.0"

View File

@ -1882,8 +1882,8 @@ base_url: "../"
<h2 id="nav-justified">Justified</h2> <h2 id="nav-justified">Justified</h2>
<p>Easily make tabs or pills equal widths of their parent at screens wider than 768px with <code>.nav-justified</code>. On smaller screens, the nav links are stacked.</p> <p>Easily make tabs or pills equal widths of their parent at screens wider than 768px with <code>.nav-justified</code>. On smaller screens, the nav links are stacked.</p>
<div class="bs-callout bs-callout-warning"> <div class="bs-callout bs-callout-warning">
<h4>WebKit and responsive justified navs</h4> <h4>Safari and responsive justified navs</h4>
<p>Chrome and Safari both exhibit a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing. This bug is also shown in the <a href="../examples/justified-nav/">justified nav example</a>.</p> <p>Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing. This bug is also shown in the <a href="../examples/justified-nav/">justified nav example</a>.</p>
</div> </div>
<div class="bs-example"> <div class="bs-example">
<ul class="nav nav-tabs nav-justified"> <ul class="nav nav-tabs nav-justified">

View File

@ -399,7 +399,7 @@ base_url: "../"
<input type="text" class="form-control" placeholder="Georgia, 'Times New Roman', Times, serif" data-var="@font-family-serif"> <input type="text" class="form-control" placeholder="Georgia, 'Times New Roman', Times, serif" data-var="@font-family-serif">
<p class="help-block">Default serif fonts.</p> <p class="help-block">Default serif fonts.</p>
<label>@font-family-monospace</label> <label>@font-family-monospace</label>
<input type="text" class="form-control" placeholder="Monaco, Menlo, Consolas, 'Courier New', monospace" data-var="@font-family-monospace"> <input type="text" class="form-control" placeholder="Menlo, Monaco, Consolas, 'Courier New', monospace" data-var="@font-family-monospace">
<p class="help-block">Default monospace fonts for <code>&lt;code&gt;</code> and <code>&lt;pre&gt;</code>.</p> <p class="help-block">Default monospace fonts for <code>&lt;code&gt;</code> and <code>&lt;pre&gt;</code>.</p>
<h4>Base type styes</h4> <h4>Base type styes</h4>

View File

@ -740,7 +740,7 @@ code,
kbd, kbd,
pre, pre,
samp { samp {
font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
} }
code { code {
@ -3462,7 +3462,6 @@ input[type="button"].btn-block {
vertical-align: middle; vertical-align: middle;
border-top: 4px solid #000000; border-top: 4px solid #000000;
border-right: 4px solid transparent; border-right: 4px solid transparent;
border-bottom: 0 dotted;
border-left: 4px solid transparent; border-left: 4px solid transparent;
} }
@ -3580,7 +3579,7 @@ input[type="button"].btn-block {
.dropup .caret, .dropup .caret,
.navbar-fixed-bottom .dropdown .caret { .navbar-fixed-bottom .dropdown .caret {
border-top: 0 dotted; border-top: 0;
border-bottom: 4px solid #000000; border-bottom: 4px solid #000000;
content: ""; content: "";
} }
@ -5396,24 +5395,6 @@ a.thumbnail.active {
} }
} }
@-moz-keyframes progress-bar-stripes {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
@-o-keyframes progress-bar-stripes {
from {
background-position: 0 0;
}
to {
background-position: 40px 0;
}
}
@keyframes progress-bar-stripes { @keyframes progress-bar-stripes {
from { from {
background-position: 40px 0; background-position: 40px 0;

File diff suppressed because one or more lines are too long

24
dist/js/bootstrap.js vendored
View File

@ -220,15 +220,21 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
Button.prototype.toggle = function () { Button.prototype.toggle = function () {
var $parent = this.$element.closest('[data-toggle="buttons"]') var $parent = this.$element.closest('[data-toggle="buttons"]')
var changed = true
if ($parent.length) { if ($parent.length) {
var $input = this.$element.find('input') var $input = this.$element.find('input')
.prop('checked', !this.$element.hasClass('active')) if ($input.prop('type') === 'radio') {
.trigger('change') // see if clicking on current one
if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active') if ($input.prop('checked') && this.$element.hasClass('active'))
changed = false
else
$parent.find('.active').removeClass('active')
}
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
} }
this.$element.toggleClass('active') if (changed) this.$element.toggleClass('active')
} }
@ -345,7 +351,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
if (pos > (this.$items.length - 1) || pos < 0) return if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) return this.$element.one('slid', function () { that.to(pos) }) if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
if (activeIndex == pos) return this.pause().cycle() if (activeIndex == pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@ -397,7 +403,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
if (this.$indicators.length) { if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active') this.$indicators.find('.active').removeClass('active')
this.$element.one('slid', function () { this.$element.one('slid.bs.carousel', function () {
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator && $nextIndicator.addClass('active') $nextIndicator && $nextIndicator.addClass('active')
}) })
@ -415,7 +421,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$next.removeClass([type, direction].join(' ')).addClass('active') $next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' ')) $active.removeClass(['active', direction].join(' '))
that.sliding = false that.sliding = false
setTimeout(function () { that.$element.trigger('slid') }, 0) setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
}) })
.emulateTransitionEnd(600) .emulateTransitionEnd(600)
} else { } else {
@ -424,7 +430,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$active.removeClass('active') $active.removeClass('active')
$next.addClass('active') $next.addClass('active')
this.sliding = false this.sliding = false
this.$element.trigger('slid') this.$element.trigger('slid.bs.carousel')
} }
isCycling && this.cycle() isCycling && this.cycle()
@ -1694,7 +1700,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
.addClass('active') .addClass('active')
} }
active.trigger('activate') active.trigger('activate.bs.scrollspy')
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -52,7 +52,8 @@
<!-- Example row of columns --> <!-- Example row of columns -->
<div class="row"> <div class="row">
<div class="col-lg-4"> <div class="col-lg-4">
<h2>Heading</h2> <h2>Safari bug warning!</h2>
<p class="text-danger">Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing.</p>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p> <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn btn-primary" href="#" role="button">View details &raquo;</a></p> <p><a class="btn btn-primary" href="#" role="button">View details &raquo;</a></p>
</div> </div>

View File

@ -54,15 +54,21 @@
Button.prototype.toggle = function () { Button.prototype.toggle = function () {
var $parent = this.$element.closest('[data-toggle="buttons"]') var $parent = this.$element.closest('[data-toggle="buttons"]')
var changed = true
if ($parent.length) { if ($parent.length) {
var $input = this.$element.find('input') var $input = this.$element.find('input')
.prop('checked', !this.$element.hasClass('active')) if ($input.prop('type') === 'radio') {
.trigger('change') // see if clicking on current one
if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active') if ($input.prop('checked') && this.$element.hasClass('active'))
changed = false
else
$parent.find('.active').removeClass('active')
}
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
} }
this.$element.toggleClass('active') if (changed) this.$element.toggleClass('active')
} }

View File

@ -69,7 +69,7 @@
if (pos > (this.$items.length - 1) || pos < 0) return if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) return this.$element.one('slid', function () { that.to(pos) }) if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
if (activeIndex == pos) return this.pause().cycle() if (activeIndex == pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@ -121,7 +121,7 @@
if (this.$indicators.length) { if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active') this.$indicators.find('.active').removeClass('active')
this.$element.one('slid', function () { this.$element.one('slid.bs.carousel', function () {
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator && $nextIndicator.addClass('active') $nextIndicator && $nextIndicator.addClass('active')
}) })
@ -139,7 +139,7 @@
$next.removeClass([type, direction].join(' ')).addClass('active') $next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' ')) $active.removeClass(['active', direction].join(' '))
that.sliding = false that.sliding = false
setTimeout(function () { that.$element.trigger('slid') }, 0) setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
}) })
.emulateTransitionEnd(600) .emulateTransitionEnd(600)
} else { } else {
@ -148,7 +148,7 @@
$active.removeClass('active') $active.removeClass('active')
$next.addClass('active') $next.addClass('active')
this.sliding = false this.sliding = false
this.$element.trigger('slid') this.$element.trigger('slid.bs.carousel')
} }
isCycling && this.cycle() isCycling && this.cycle()

View File

@ -113,7 +113,7 @@
.addClass('active') .addClass('active')
} }
active.trigger('activate') active.trigger('activate.bs.scrollspy')
} }

View File

@ -111,6 +111,12 @@ $(function () {
ok(!btn1.find('input').prop('checked'), 'btn1 is checked') ok(!btn1.find('input').prop('checked'), 'btn1 is checked')
ok(btn2.hasClass('active'), 'btn2 has active class') ok(btn2.hasClass('active'), 'btn2 has active class')
ok(btn2.find('input').prop('checked'), 'btn2 is checked') ok(btn2.find('input').prop('checked'), 'btn2 is checked')
btn2.find('input').click() /* clicking an already checked radio should not un-check it */
ok(!btn1.hasClass('active'), 'btn1 does not have active class')
ok(!btn1.find('input').prop('checked'), 'btn1 is checked')
ok(btn2.hasClass('active'), 'btn2 has active class')
ok(btn2.find('input').prop('checked'), 'btn2 is checked')
}) })
}) })

View File

@ -13,9 +13,6 @@
border-top: @caret-width-base solid @dropdown-caret-color; border-top: @caret-width-base solid @dropdown-caret-color;
border-right: @caret-width-base solid transparent; border-right: @caret-width-base solid transparent;
border-left: @caret-width-base solid transparent; border-left: @caret-width-base solid transparent;
// Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once fixed,
// we can just straight up remove this.
border-bottom: 0 dotted;
} }
// The dropdown wrapper (div) // The dropdown wrapper (div)
@ -163,9 +160,7 @@
.navbar-fixed-bottom .dropdown { .navbar-fixed-bottom .dropdown {
// Reverse the caret // Reverse the caret
.caret { .caret {
// Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once this border-top: 0;
// gets fixed, restore `border-top: 0;`.
border-top: 0 dotted;
border-bottom: @caret-width-base solid @dropdown-caret-color; border-bottom: @caret-width-base solid @dropdown-caret-color;
content: ""; content: "";
} }

View File

@ -12,18 +12,6 @@
to { background-position: 0 0; } to { background-position: 0 0; }
} }
// Firefox
@-moz-keyframes progress-bar-stripes {
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
// Opera
@-o-keyframes progress-bar-stripes {
from { background-position: 0 0; }
to { background-position: 40px 0; }
}
// Spec and IE10+ // Spec and IE10+
@keyframes progress-bar-stripes { @keyframes progress-bar-stripes {
from { background-position: 40px 0; } from { background-position: 40px 0; }

View File

@ -104,10 +104,12 @@ th {
// //
// Default zebra-stripe styles (alternating gray and transparent backgrounds) // Default zebra-stripe styles (alternating gray and transparent backgrounds)
.table-striped > tbody > tr:nth-child(odd) { .table-striped {
> td, > tbody > tr:nth-child(odd) {
> th { > td,
background-color: @table-bg-accent; > th {
background-color: @table-bg-accent;
}
} }
} }
@ -116,10 +118,12 @@ th {
// //
// Placed here since it has to come after the potential zebra striping // Placed here since it has to come after the potential zebra striping
.table-hover > tbody > tr:hover { .table-hover {
> td, > tbody > tr:hover {
> th { > td,
background-color: @table-bg-hover; > th {
background-color: @table-bg-hover;
}
} }
} }
@ -148,14 +152,18 @@ table {
// Exact selectors below required to override `.table-striped` and prevent // Exact selectors below required to override `.table-striped` and prevent
// inheritance to nested tables. // inheritance to nested tables.
.table > thead > tr, .table {
.table > tbody > tr, > thead,
.table > tfoot > tr { > tbody,
> td.active, > tfoot {
> th.active, > tr {
&.active > td, > td.active,
&.active > th { > th.active,
background-color: @table-bg-active; &.active > td,
&.active > th {
background-color: @table-bg-active;
}
}
} }
} }

View File

@ -41,7 +41,7 @@
@font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif; @font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
@font-family-serif: Georgia, "Times New Roman", Times, serif; @font-family-serif: Georgia, "Times New Roman", Times, serif;
@font-family-monospace: Monaco, Menlo, Consolas, "Courier New", monospace; @font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace;
@font-family-base: @font-family-sans-serif; @font-family-base: @font-family-sans-serif;
@font-size-base: 14px; @font-size-base: 14px;