Commit b253cb2c authored by Mark Otto's avatar Mark Otto
Browse files

Merge branch 'master' into docs_derp

Conflicts:
	_config.yml
	docs/_includes/footer.html
	docs/_includes/nav-main.html
	docs/_includes/old-bs-docs.html
	docs/_layouts/default.html
	docs/_layouts/home.html
	docs/getting-started.html
	docs/index.html
parents 9e1153d0 8812856d
No related merge requests found
Showing with 52 additions and 36 deletions
+52 -36
File moved
...@@ -3,7 +3,6 @@ layout: default ...@@ -3,7 +3,6 @@ layout: default
title: Getting started title: Getting started
slug: getting-started slug: getting-started
lead: "An overview of Bootstrap, how to download and use, basic templates and examples, and more." lead: "An overview of Bootstrap, how to download and use, basic templates and examples, and more."
base_url: "../"
--- ---
...@@ -19,17 +18,17 @@ base_url: "../" ...@@ -19,17 +18,17 @@ base_url: "../"
<div class="col-sm-4"> <div class="col-sm-4">
<h3 id="download-bootstrap">Bootstrap</h3> <h3 id="download-bootstrap">Bootstrap</h3>
<p>Compiled and minified CSS, JavaScript, and fonts. No docs or original source files are included.</p> <p>Compiled and minified CSS, JavaScript, and fonts. No docs or original source files are included.</p>
<a href="{{ site.download_dist }}" class="btn btn-lg btn-outline" role="button" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download compiled']);">Download Bootstrap</a> <a href="{{ site.download.dist }}" class="btn btn-lg btn-outline" role="button" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download compiled']);">Download Bootstrap</a>
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<h3 id="download-source">Source code</h3> <h3 id="download-source">Source code</h3>
<p>Source Less, JavaScript, and font files, along with our docs. <strong>Requires a Less compiler and <a href="{{ site.repo }}#compiling-css-and-javascript">some setup.</a></strong></p> <p>Source Less, JavaScript, and font files, along with our docs. <strong>Requires a Less compiler and <a href="{{ site.repo }}#compiling-css-and-javascript">some setup.</a></strong></p>
<a href="{{ site.download_source }}" class="btn btn-lg btn-outline" role="button" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download source']);">Download source</a> <a href="{{ site.download.source }}" class="btn btn-lg btn-outline" role="button" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download source']);">Download source</a>
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<h3 id="download-sass">Sass</h3> <h3 id="download-sass">Sass</h3>
<p><a href="{{ site.sass }}">Bootstrap ported from Less to Sass</a> for easy inclusion in Rails, Compass, or Sass-only projects.</p> <p><a href="{{ site.sass }}">Bootstrap ported from Less to Sass</a> for easy inclusion in Rails, Compass, or Sass-only projects.</p>
<a href="{{ site.download_sass }}" class="btn btn-lg btn-outline" role="button" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download Sass']);">Download Sass</a> <a href="{{ site.download.sass }}" class="btn btn-lg btn-outline" role="button" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download Sass']);">Download Sass</a>
</div> </div>
</div> </div>
...@@ -37,13 +36,13 @@ base_url: "../" ...@@ -37,13 +36,13 @@ base_url: "../"
<p>The folks over at <a href="http://www.maxcdn.com/">MaxCDN</a> graciously provide CDN support for Bootstrap's CSS and JavaScript. Just use these <a href="http://www.bootstrapcdn.com/">Bootstrap CDN</a> links.</p> <p>The folks over at <a href="http://www.maxcdn.com/">MaxCDN</a> graciously provide CDN support for Bootstrap's CSS and JavaScript. Just use these <a href="http://www.bootstrapcdn.com/">Bootstrap CDN</a> links.</p>
{% highlight html %} {% highlight html %}
<!-- Latest compiled and minified CSS --> <!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="{{ site.cdn_css }}"> <link rel="stylesheet" href="{{ site.cdn.css }}">
<!-- Optional theme --> <!-- Optional theme -->
<link rel="stylesheet" href="{{ site.cdn_theme_css }}"> <link rel="stylesheet" href="{{ site.cdn.css_theme }}">
<!-- Latest compiled and minified JavaScript --> <!-- Latest compiled and minified JavaScript -->
<script src="{{ site.cdn_js }}"></script> <script src="{{ site.cdn.js }}"></script>
{% endhighlight %} {% endhighlight %}
<h3 id="download-bower">Install with Bower</h3> <h3 id="download-bower">Install with Bower</h3>
...@@ -99,12 +98,12 @@ bootstrap/ ...@@ -99,12 +98,12 @@ bootstrap/
│ ├── css/ │ ├── css/
│ ├── js/ │ ├── js/
│ └── fonts/ │ └── fonts/
├── docs-assets/ ├── docs/assets/
├── examples/ ├── examples/
└── *.html └── *.html
{% endhighlight %} {% endhighlight %}
</div> </div>
<p>The <code>less/</code>, <code>js/</code>, and <code>fonts/</code> are the source code for our CSS, JS, and icon fonts (respectively). The <code>dist/</code> folder includes everything listed in the precompiled download section above. <code>docs-assets/</code>, <code>examples/</code>, and all <code>*.html</code> files are for our documentation. Beyond that, any other included file provides support for packages, license information, and development.</p> <p>The <code>less/</code>, <code>js/</code>, and <code>fonts/</code> are the source code for our CSS, JS, and icon fonts (respectively). The <code>dist/</code> folder includes everything listed in the precompiled download section above. <code>docs/assets/</code>, <code>examples/</code>, and all <code>*.html</code> files are for our documentation. Beyond that, any other included file provides support for packages, license information, and development.</p>
<!-- Template <!-- Template
...@@ -878,6 +877,8 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) { ...@@ -878,6 +877,8 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
<p>Support for <code>overflow: hidden</code> on the <code>&lt;body&gt;</code> element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the <code>&lt;body&gt;</code> content will begin to scroll.</p> <p>Support for <code>overflow: hidden</code> on the <code>&lt;body&gt;</code> element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the <code>&lt;body&gt;</code> content will begin to scroll.</p>
<h4>Virtual keyboards</h4> <h4>Virtual keyboards</h4>
<p>Also, note that if you're using inputs in your modal or navbar, iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few workarounds for this include transforming your elements to <code>position: absolute</code> or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.</p> <p>Also, note that if you're using inputs in your modal or navbar, iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few workarounds for this include transforming your elements to <code>position: absolute</code> or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.</p>
<h4>Navbar Dropdowns</h4>
<p>The <code>.dropdown-backdrop</code> element isn't used on iOS in the nav because of the complexity of z-indexing. Thus, to close dropdowns in navbars, you must directly click the dropdown element (or any other element which will fire a click event in iOS).</p>
<h3 id="support-browser-zoom">Browser zooming</h3> <h3 id="support-browser-zoom">Browser zooming</h3>
<p>Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds.</p> <p>Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds.</p>
......
--- ---
layout: home layout: home
title: Bootstrap title: Bootstrap
base_url: "./"
--- ---
<main class="bs-masthead" id="content" role="main"> <main class="bs-masthead" id="content" role="main">
...@@ -9,7 +8,9 @@ base_url: "./" ...@@ -9,7 +8,9 @@ base_url: "./"
<span class="bs-booticon bs-booticon-lg">B</span> <span class="bs-booticon bs-booticon-lg">B</span>
<h1>Bootstrap</h1> <h1>Bootstrap</h1>
<p class="lead">The most popular front-end framework for designing and building on the web.</p> <p class="lead">The most popular front-end framework for designing and building on the web.</p>
<p class="lead"><a href="{{ page.base_url }}getting-started#download" class="btn btn-outline btn-lg" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Download', 'Download {{ site.current_version }}']);">Download Bootstrap</a></p> <p class="lead">
<a href="getting-started#download" class="btn btn-outline btn-lg" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Download', 'Download {{ site.current_version }}']);">Download Bootstrap</a>
</p>
{% include ads.html %} {% include ads.html %}
</div> </div>
</main> </main>
......
...@@ -3,7 +3,6 @@ layout: default ...@@ -3,7 +3,6 @@ layout: default
title: JavaScript title: JavaScript
slug: js slug: js
lead: "Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one." lead: "Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one."
base_url: "../"
--- ---
...@@ -110,7 +109,7 @@ $('#myModal').on('show.bs.modal', function (e) { ...@@ -110,7 +109,7 @@ $('#myModal').on('show.bs.modal', function (e) {
</div> </div>
<div class="bs-callout bs-callout-warning"> <div class="bs-callout bs-callout-warning">
<h4>Mobile device caveats</h4> <h4>Mobile device caveats</h4>
<p>There are some caveats regarding using modals on mobile devices. <a href="{{ page.base_url }}getting-started#fixed-position-keyboards">See our browser support docs</a> for details.</p> <p>There are some caveats regarding using modals on mobile devices. <a href="{{ site.baseurl }}getting-started#fixed-position-keyboards">See our browser support docs</a> for details.</p>
</div> </div>
<h3>Static example</h3> <h3>Static example</h3>
...@@ -570,19 +569,19 @@ $('.dropdown-toggle').dropdown() ...@@ -570,19 +569,19 @@ $('.dropdown-toggle').dropdown()
<tbody> <tbody>
<tr> <tr>
<td>show.bs.dropdown</td> <td>show.bs.dropdown</td>
<td>This event fires immediately when the show instance method is called.</td> <td>This event fires immediately when the show instance method is called. The toggling anchor element is available as the <code>relatedTarget</code> property of the event.</td>
</tr> </tr>
<tr> <tr>
<td>shown.bs.dropdown</td> <td>shown.bs.dropdown</td>
<td>This event is fired when the dropdown has been made visible to the user (will wait for CSS transitions, to complete).</td> <td>This event is fired when the dropdown has been made visible to the user (will wait for CSS transitions, to complete). The toggling anchor element is available as the <code>relatedTarget</code> property of the event.</td>
</tr> </tr>
<tr> <tr>
<td>hide.bs.dropdown</td> <td>hide.bs.dropdown</td>
<td>This event is fired immediately when the hide instance method has been called.</td> <td>This event is fired immediately when the hide instance method has been called. The toggling anchor element is available as the <code>relatedTarget</code> property of the event.</td>
</tr> </tr>
<tr> <tr>
<td>hidden.bs.dropdown</td> <td>hidden.bs.dropdown</td>
<td>This event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions, to complete).</td> <td>This event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions, to complete). The toggling anchor element is available as the <code>relatedTarget</code> property of the event.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -796,7 +795,7 @@ $('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed) ...@@ -796,7 +795,7 @@ $('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
{% endhighlight %} {% endhighlight %}
<h3>Markup</h3> <h3>Markup</h3>
<p>You can activate a tab or pill navigation without writing any JavaScript by simply specifying <code>data-toggle="tab"</code> or <code>data-toggle="pill"</code> on an element. Adding the <code>nav</code> and <code>nav-tabs</code> classes to the tab <code>ul</code> will apply the Bootstrap <a href="{{ page.base_url }}components#nav-tabs">tab styling</a>, while adding the <code>nav</code> and <code>nav-pills</code> classes will apply <a href="{{ page.base_url }}components#nav-pills">pill styling</a>.</p> <p>You can activate a tab or pill navigation without writing any JavaScript by simply specifying <code>data-toggle="tab"</code> or <code>data-toggle="pill"</code> on an element. Adding the <code>nav</code> and <code>nav-tabs</code> classes to the tab <code>ul</code> will apply the Bootstrap <a href="{{ site.baseurl }}components#nav-tabs">tab styling</a>, while adding the <code>nav</code> and <code>nav-pills</code> classes will apply <a href="{{ site.baseurl }}components#nav-pills">pill styling</a>.</p>
{% highlight html %} {% highlight html %}
<!-- Nav tabs --> <!-- Nav tabs -->
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
$next = this.$element.find('.item')[fallback]() $next = this.$element.find('.item')[fallback]()
} }
if ($next.hasClass('active')) return if ($next.hasClass('active')) return this.sliding = false
var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
this.$element.trigger(e) this.$element.trigger(e)
......
...@@ -34,13 +34,14 @@ ...@@ -34,13 +34,14 @@
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus) $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
} }
$parent.trigger(e = $.Event('show.bs.dropdown')) var relatedTarget = { relatedTarget: this }
$parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return if (e.isDefaultPrevented()) return
$parent $parent
.toggleClass('open') .toggleClass('open')
.trigger('shown.bs.dropdown') .trigger('shown.bs.dropdown', relatedTarget)
$this.focus() $this.focus()
} }
...@@ -66,7 +67,8 @@ ...@@ -66,7 +67,8 @@
return $this.click() return $this.click()
} }
var $items = $('[role=menu] li:not(.divider):visible a', $parent) var desc = ' li:not(.divider):visible a'
var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc)
if (!$items.length) return if (!$items.length) return
...@@ -79,14 +81,15 @@ ...@@ -79,14 +81,15 @@
$items.eq(index).focus() $items.eq(index).focus()
} }
function clearMenus() { function clearMenus(e) {
$(backdrop).remove() $(backdrop).remove()
$(toggle).each(function (e) { $(toggle).each(function () {
var $parent = getParent($(this)) var $parent = getParent($(this))
var relatedTarget = { relatedTarget: this }
if (!$parent.hasClass('open')) return if (!$parent.hasClass('open')) return
$parent.trigger(e = $.Event('hide.bs.dropdown')) $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return if (e.isDefaultPrevented()) return
$parent.removeClass('open').trigger('hidden.bs.dropdown') $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
}) })
} }
...@@ -138,6 +141,6 @@ ...@@ -138,6 +141,6 @@
.on('click.bs.dropdown.data-api', clearMenus) .on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]', Dropdown.prototype.keydown) .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown)
}(jQuery); }(jQuery);
...@@ -18,9 +18,13 @@ ...@@ -18,9 +18,13 @@
this.$backdrop = this.$backdrop =
this.isShown = null this.isShown = null
if (this.options.remote) this.$element.find('.modal-content').load(this.options.remote, $.proxy(function () { if (this.options.remote) {
this.$element.trigger('loaded.bs.modal') this.$element
}, this)) .find('.modal-content')
.load(this.options.remote, $.proxy(function () {
this.$element.trigger('loaded.bs.modal')
}, this))
}
} }
Modal.DEFAULTS = { Modal.DEFAULTS = {
...@@ -54,7 +58,9 @@ ...@@ -54,7 +58,9 @@
that.$element.appendTo(document.body) // don't move modals dom position that.$element.appendTo(document.body) // don't move modals dom position
} }
that.$element.show() that.$element
.show()
.scrollTop(0)
if (transition) { if (transition) {
that.$element[0].offsetWidth // force reflow that.$element[0].offsetWidth // force reflow
......
...@@ -43,7 +43,9 @@ ...@@ -43,7 +43,9 @@
var content = this.getContent() var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content) $tip.find('.popover-content')[ // we use append for html objects to maintain js events
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
](content)
$tip.removeClass('fade top bottom left right in') $tip.removeClass('fade top bottom left right in')
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
return ($href return ($href
&& $href.length && $href.length
&& $href.is(':visible')
&& [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
}) })
.sort(function (a, b) { return a[0] - b[0] }) .sort(function (a, b) { return a[0] - b[0] })
...@@ -73,6 +74,10 @@ ...@@ -73,6 +74,10 @@
return activeTarget != (i = targets.last()[0]) && this.activate(i) return activeTarget != (i = targets.last()[0]) && this.activate(i)
} }
if (activeTarget && scrollTop <= offsets[0]) {
return activeTarget != (i = targets[0]) && this.activate(i)
}
for (i = offsets.length; i--;) { for (i = offsets.length; i--;) {
activeTarget != targets[i] activeTarget != targets[i]
&& scrollTop >= offsets[i] && scrollTop >= offsets[i]
......
File moved
File moved
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
# { # FIXME: currently fails 1 tooltip test # { # FIXME: currently fails 1 tooltip test
# browserName: "firefox", # browserName: "firefox",
# version: "25", # platform: "OS X 10.9"
# platform: "OS X 10.6"
# }, # },
# Mac Opera not currently supported by Sauce Labs # Mac Opera not currently supported by Sauce Labs
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment