Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile43
-rw-r--r--README.md20
-rw-r--r--docs/assets/css/bootstrap.css49
-rw-r--r--docs/assets/css/docs.css3
-rw-r--r--docs/assets/img/bootstrap-docs-readme.pngbin0 -> 30612 bytes
-rw-r--r--docs/assets/img/examples/bootstrap-example-carousel.pngbin53908 -> 339980 bytes
-rw-r--r--docs/assets/img/examples/bootstrap-example-fluid.jpgbin23408 -> 0 bytes
-rw-r--r--docs/assets/img/examples/bootstrap-example-fluid.pngbin0 -> 209039 bytes
-rw-r--r--docs/assets/img/examples/bootstrap-example-hero.jpgbin19805 -> 0 bytes
-rw-r--r--docs/assets/img/examples/bootstrap-example-justified-nav.pngbin0 -> 136021 bytes
-rw-r--r--docs/assets/img/examples/bootstrap-example-marketing-narrow.pngbin21869 -> 117303 bytes
-rw-r--r--docs/assets/img/examples/bootstrap-example-marketing.pngbin0 -> 134269 bytes
-rw-r--r--docs/assets/img/examples/bootstrap-example-signin.pngbin4202 -> 22037 bytes
-rw-r--r--docs/assets/img/examples/bootstrap-example-starter.jpgbin5584 -> 0 bytes
-rw-r--r--docs/assets/img/examples/bootstrap-example-starter.pngbin0 -> 36099 bytes
-rw-r--r--docs/assets/img/examples/bootstrap-example-sticky-footer.pngbin9749 -> 30820 bytes
-rw-r--r--docs/assets/js/application.js6
-rw-r--r--docs/assets/js/bootstrap-carousel.js10
-rw-r--r--docs/assets/js/bootstrap-collapse.js2
-rw-r--r--docs/assets/js/bootstrap-dropdown.js7
-rw-r--r--docs/assets/js/bootstrap-popover.js2
-rw-r--r--docs/assets/js/bootstrap-scrollspy.js2
-rw-r--r--docs/assets/js/bootstrap-tooltip.js45
-rw-r--r--docs/assets/js/bootstrap-typeahead.js1
-rw-r--r--docs/assets/js/bootstrap.js70
-rw-r--r--docs/assets/js/bootstrap.min.js4
-rwxr-xr-xdocs/assets/js/holder/holder.js167
-rw-r--r--docs/components.html27
-rw-r--r--docs/examples/carousel.html6
-rw-r--r--docs/examples/hero.html2
-rw-r--r--docs/examples/justified-nav.html (renamed from docs/examples/marketing-alternate.html)4
-rw-r--r--docs/examples/marketing-narrow.html2
-rw-r--r--docs/examples/sticky-footer-navbar.html161
-rw-r--r--docs/examples/sticky-footer.html1
-rw-r--r--docs/getting-started.html13
-rw-r--r--docs/javascript.html114
-rw-r--r--docs/templates/pages/components.mustache27
-rw-r--r--docs/templates/pages/getting-started.mustache13
-rw-r--r--docs/templates/pages/javascript.mustache114
-rw-r--r--js/bootstrap-carousel.js10
-rw-r--r--js/bootstrap-collapse.js2
-rw-r--r--js/bootstrap-dropdown.js7
-rw-r--r--js/bootstrap-popover.js2
-rw-r--r--js/bootstrap-scrollspy.js2
-rw-r--r--js/bootstrap-tooltip.js45
-rw-r--r--js/bootstrap-typeahead.js1
-rw-r--r--js/tests/unit/bootstrap-carousel.js12
-rw-r--r--js/tests/unit/bootstrap-tooltip.js97
-rw-r--r--js/tests/unit/bootstrap-typeahead.js5
-rw-r--r--less/buttons.less1
-rw-r--r--less/mixins.less6
-rw-r--r--less/navbar.less4
-rw-r--r--less/popovers.less6
-rw-r--r--less/responsive-767px-max.less1
-rw-r--r--less/tables.less40
-rw-r--r--less/tooltip.less1
-rw-r--r--less/type.less4
57 files changed, 869 insertions, 292 deletions
diff --git a/Makefile b/Makefile
index 0e01355456..18f77c2254 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ build:
@echo "Compiling documentation... ${CHECK} Done"
@cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js js/bootstrap-affix.js > docs/assets/js/bootstrap.js
@./node_modules/.bin/uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js
- @echo "/**\n* Bootstrap.js v2.2.3 by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js
+ @echo "/**\n* Bootstrap.js v2.3.0 by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js
@cat docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js > docs/assets/js/bootstrap.min.js
@rm docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js
@echo "Compiling and minifying javascript... ${CHECK} Done"
@@ -59,13 +59,16 @@ clean:
# recess & uglifyjs are required
#
-bootstrap:
- mkdir -p bootstrap/fonts
- mkdir -p bootstrap/css
+bootstrap: bootstrap-fonts bootstrap-css bootstrap-js
+
+
+#
+# JS COMPILE
+#
+bootstrap-js: bootstrap/js/*.js
+
+bootstrap/js/*.js: js/*.js
mkdir -p bootstrap/js
- cp fonts/* bootstrap/fonts/
- ./node_modules/.bin/recess --compile ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.css
- ./node_modules/.bin/recess --compress ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css
cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js js/bootstrap-affix.js > bootstrap/js/bootstrap.js
./node_modules/.bin/uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.tmp.js
echo "/*!\n* Bootstrap.js by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > bootstrap/js/copyright.js
@@ -73,6 +76,30 @@ bootstrap:
rm bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js
#
+# CSS COMPLILE
+#
+
+bootstrap-css: bootstrap/css/*.css
+
+bootstrap/css/*.css: less/*.less
+ mkdir -p bootstrap/css
+ ./node_modules/.bin/recess --compile ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.css
+ ./node_modules/.bin/recess --compress ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css
+ ./node_modules/.bin/recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css
+ ./node_modules/.bin/recess --compress ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.min.css
+
+#
+# FONTS
+#
+
+bootstrap-fonts: bootstrap/fonts/*
+
+bootstrap/fonts/*: fonts/*
+ mkdir -p bootstrap/fonts
+ cp fonts/* bootstrap/fonts/
+
+
+#
# MAKE FOR GH-PAGES 4 FAT & MDO ONLY (O_O )
#
@@ -93,4 +120,4 @@ watch:
watchr -e "watch('less/.*\.less') { system 'make' }"
-.PHONY: docs watch gh-pages \ No newline at end of file
+.PHONY: docs watch gh-pages bootstrap-img bootstrap-css bootstrap-js
diff --git a/README.md b/README.md
index 2714cdf9ee..786453e0e5 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,12 @@
-# [Twitter Bootstrap v3.0.0](http://twitter.github.com/bootstrap) [![Build Status](https://secure.travis-ci.org/twitter/bootstrap.png)](http://travis-ci.org/twitter/bootstrap)
+<a href="http://getbootstrap.com">
+ <img src="http://twitter.github.com/bootstrap/assets/img/bootstrap-docs-readme.png" width="100px">
+</a>
+
+# [Bootstrap v3.0.0](http://twitter.github.com/bootstrap) [![Build Status](https://secure.travis-ci.org/twitter/bootstrap.png)](http://travis-ci.org/twitter/bootstrap)
Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created and maintained by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat).
-To get started, checkout http://getbootstrap.com!
+To get started, checkout [http://getbootstrap.com](http://getbootstrap.com)!
@@ -30,7 +34,7 @@ And constructed with the following guidelines:
* New additions without breaking backward compatibility bumps the minor (and resets the patch)
* Bug fixes and misc changes bumps the patch
-For more information on SemVer, please visit http://semver.org/.
+For more information on SemVer, please visit [http://semver.org/](http://semver.org/).
@@ -85,13 +89,13 @@ Thanks!
**Mark Otto**
-+ http://twitter.com/mdo
-+ http://github.com/mdo
++ [http://twitter.com/mdo](http://twitter.com/mdo)
++ [http://github.com/mdo](http://github.com/mdo)
**Jacob Thornton**
-+ http://twitter.com/fat
-+ http://github.com/fat
++ [http://twitter.com/fat](http://twitter.com/fat)
++ [http://github.com/fat](http://github.com/fat)
@@ -103,7 +107,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this work except in compliance with the License.
You may obtain a copy of the License in the LICENSE file, or at:
- http://www.apache.org/licenses/LICENSE-2.0
+ [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css
index 10a05729c9..dc4ff24a02 100644
--- a/docs/assets/css/bootstrap.css
+++ b/docs/assets/css/bootstrap.css
@@ -694,9 +694,9 @@ blockquote {
blockquote p {
margin-bottom: 0;
- font-size: 16px;
+ font-size: 17.5px;
font-weight: 300;
- line-height: 25px;
+ line-height: 1.25;
}
blockquote small {
@@ -1439,24 +1439,30 @@ table {
}
.table-bordered thead:first-child tr:first-child > th:first-child,
-.table-bordered tbody:first-child tr:first-child > td:first-child {
+.table-bordered tbody:first-child tr:first-child > td:first-child,
+.table-bordered tbody:first-child tr:first-child > th:first-child {
border-top-left-radius: 4px;
}
.table-bordered thead:first-child tr:first-child > th:last-child,
-.table-bordered tbody:first-child tr:first-child > td:last-child {
+.table-bordered tbody:first-child tr:first-child > td:last-child,
+.table-bordered tbody:first-child tr:first-child > th:last-child {
border-top-right-radius: 4px;
}
.table-bordered thead:last-child tr:last-child > th:first-child,
.table-bordered tbody:last-child tr:last-child > td:first-child,
-.table-bordered tfoot:last-child tr:last-child > td:first-child {
+.table-bordered tbody:last-child tr:last-child > th:first-child,
+.table-bordered tfoot:last-child tr:last-child > td:first-child,
+.table-bordered tfoot:last-child tr:last-child > th:first-child {
border-bottom-left-radius: 4px;
}
.table-bordered thead:last-child tr:last-child > th:last-child,
.table-bordered tbody:last-child tr:last-child > td:last-child,
-.table-bordered tfoot:last-child tr:last-child > td:last-child {
+.table-bordered tbody:last-child tr:last-child > th:last-child,
+.table-bordered tfoot:last-child tr:last-child > td:last-child,
+.table-bordered tfoot:last-child tr:last-child > th:last-child {
border-bottom-right-radius: 4px;
}
@@ -1487,8 +1493,8 @@ table {
background-color: #f9f9f9;
}
-.table-hover tbody tr:hover td,
-.table-hover tbody tr:hover th {
+.table-hover tbody tr:hover > td,
+.table-hover tbody tr:hover > th {
background-color: #f5f5f5;
}
@@ -1499,35 +1505,35 @@ table th[class*="span"] {
margin-left: 0;
}
-.table tbody tr.success td {
+.table tbody tr.success > td {
background-color: #dff0d8;
}
-.table tbody tr.error td {
+.table tbody tr.error > td {
background-color: #f2dede;
}
-.table tbody tr.warning td {
+.table tbody tr.warning > td {
background-color: #fcf8e3;
}
-.table tbody tr.info td {
+.table tbody tr.info > td {
background-color: #d9edf7;
}
-.table-hover tbody tr.success:hover td {
+.table-hover tbody tr.success:hover > td {
background-color: #d0e9c6;
}
-.table-hover tbody tr.error:hover td {
+.table-hover tbody tr.error:hover > td {
background-color: #ebcccc;
}
-.table-hover tbody tr.warning:hover td {
+.table-hover tbody tr.warning:hover > td {
background-color: #faf2cc;
}
-.table-hover tbody tr.info:hover td {
+.table-hover tbody tr.info:hover > td {
background-color: #c4e3f3;
}
@@ -3360,8 +3366,8 @@ fieldset[disabled] .navbar .btn-navbar {
}
.navbar .nav li.dropdown > a:hover .caret {
- border-top-color: #555555;
- border-bottom-color: #555555;
+ border-top-color: #333333;
+ border-bottom-color: #333333;
}
.navbar .nav li.dropdown.open > .dropdown-toggle,
@@ -3842,6 +3848,7 @@ fieldset[disabled] .navbar-inverse .btn-navbar {
display: block;
padding: 5px;
font-size: 11px;
+ line-height: 1.4;
opacity: 0;
filter: alpha(opacity=0);
visibility: visible;
@@ -3924,7 +3931,7 @@ fieldset[disabled] .navbar-inverse .btn-navbar {
left: 0;
z-index: 1010;
display: none;
- width: 236px;
+ max-width: 276px;
padding: 1px;
text-align: left;
white-space: normal;
@@ -3966,6 +3973,10 @@ fieldset[disabled] .navbar-inverse .btn-navbar {
border-radius: 5px 5px 0 0;
}
+.popover-title:empty {
+ display: none;
+}
+
.popover-content {
padding: 9px 14px;
}
diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css
index cd2e93436d..978f68ba92 100644
--- a/docs/assets/css/docs.css
+++ b/docs/assets/css/docs.css
@@ -528,6 +528,9 @@ h2 + .row {
/* Example page
------------------------- */
+.bootstrap-examples h4 {
+ margin: 10px 0 5px;
+}
.bootstrap-examples p {
font-size: 13px;
line-height: 18px;
diff --git a/docs/assets/img/bootstrap-docs-readme.png b/docs/assets/img/bootstrap-docs-readme.png
new file mode 100644
index 0000000000..36603bd3b4
--- /dev/null
+++ b/docs/assets/img/bootstrap-docs-readme.png
Binary files differ
diff --git a/docs/assets/img/examples/bootstrap-example-carousel.png b/docs/assets/img/examples/bootstrap-example-carousel.png
index a2f668abe1..725fe07b9e 100644
--- a/docs/assets/img/examples/bootstrap-example-carousel.png
+++ b/docs/assets/img/examples/bootstrap-example-carousel.png
Binary files differ
diff --git a/docs/assets/img/examples/bootstrap-example-fluid.jpg b/docs/assets/img/examples/bootstrap-example-fluid.jpg
deleted file mode 100644
index d616ba001b..0000000000
--- a/docs/assets/img/examples/bootstrap-example-fluid.jpg
+++ /dev/null
Binary files differ
diff --git a/docs/assets/img/examples/bootstrap-example-fluid.png b/docs/assets/img/examples/bootstrap-example-fluid.png
new file mode 100644
index 0000000000..5f49a332f3
--- /dev/null
+++ b/docs/assets/img/examples/bootstrap-example-fluid.png
Binary files differ
diff --git a/docs/assets/img/examples/bootstrap-example-hero.jpg b/docs/assets/img/examples/bootstrap-example-hero.jpg
deleted file mode 100644
index a9662d2b4b..0000000000
--- a/docs/assets/img/examples/bootstrap-example-hero.jpg
+++ /dev/null
Binary files differ
diff --git a/docs/assets/img/examples/bootstrap-example-justified-nav.png b/docs/assets/img/examples/bootstrap-example-justified-nav.png
new file mode 100644
index 0000000000..3d1e233891
--- /dev/null
+++ b/docs/assets/img/examples/bootstrap-example-justified-nav.png
Binary files differ
diff --git a/docs/assets/img/examples/bootstrap-example-marketing-narrow.png b/docs/assets/img/examples/bootstrap-example-marketing-narrow.png
index a7ac9ef98b..4bca8cdafd 100644
--- a/docs/assets/img/examples/bootstrap-example-marketing-narrow.png
+++ b/docs/assets/img/examples/bootstrap-example-marketing-narrow.png
Binary files differ
diff --git a/docs/assets/img/examples/bootstrap-example-marketing.png b/docs/assets/img/examples/bootstrap-example-marketing.png
new file mode 100644
index 0000000000..206e26e342
--- /dev/null
+++ b/docs/assets/img/examples/bootstrap-example-marketing.png
Binary files differ
diff --git a/docs/assets/img/examples/bootstrap-example-signin.png b/docs/assets/img/examples/bootstrap-example-signin.png
index 39210096b4..b649a985dc 100644
--- a/docs/assets/img/examples/bootstrap-example-signin.png
+++ b/docs/assets/img/examples/bootstrap-example-signin.png
Binary files differ
diff --git a/docs/assets/img/examples/bootstrap-example-starter.jpg b/docs/assets/img/examples/bootstrap-example-starter.jpg
deleted file mode 100644
index 3b1cbf9e78..0000000000
--- a/docs/assets/img/examples/bootstrap-example-starter.jpg
+++ /dev/null
Binary files differ
diff --git a/docs/assets/img/examples/bootstrap-example-starter.png b/docs/assets/img/examples/bootstrap-example-starter.png
new file mode 100644
index 0000000000..1bf4b85ece
--- /dev/null
+++ b/docs/assets/img/examples/bootstrap-example-starter.png
Binary files differ
diff --git a/docs/assets/img/examples/bootstrap-example-sticky-footer.png b/docs/assets/img/examples/bootstrap-example-sticky-footer.png
index c2255044df..fb80e7b92f 100644
--- a/docs/assets/img/examples/bootstrap-example-sticky-footer.png
+++ b/docs/assets/img/examples/bootstrap-example-sticky-footer.png
Binary files differ
diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js
index ba77673000..cc442ade4f 100644
--- a/docs/assets/js/application.js
+++ b/docs/assets/js/application.js
@@ -43,14 +43,14 @@
// tooltip demo
$('.tooltip-demo').tooltip({
- selector: "a[rel=tooltip]"
+ selector: "a[data-toggle=tooltip]"
})
$('.tooltip-test').tooltip()
$('.popover-test').popover()
// popover demo
- $("a[rel=popover]")
+ $("a[data-toggle=popover]")
.popover()
.click(function(e) {
e.preventDefault()
@@ -153,4 +153,4 @@ $.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) {
}
})
-}(window.jQuery) \ No newline at end of file
+}(window.jQuery)
diff --git a/docs/assets/js/bootstrap-carousel.js b/docs/assets/js/bootstrap-carousel.js
index d9c580e855..fad16def24 100644
--- a/docs/assets/js/bootstrap-carousel.js
+++ b/docs/assets/js/bootstrap-carousel.js
@@ -108,6 +108,7 @@
e = $.Event('slide', {
relatedTarget: $next[0]
+ , direction: direction
})
if ($next.hasClass('active')) return
@@ -187,11 +188,18 @@
/* CAROUSEL DATA-API
* ================= */
- $(document).on('click.carousel.data-api', '[data-slide]', function (e) {
+ $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, options = $.extend({}, $target.data(), $this.data())
+ , slideIndex
+
$target.carousel(options)
+
+ if (slideIndex = $this.attr('data-slide-to')) {
+ $target.data('carousel').pause().to(slideIndex).cycle()
+ }
+
e.preventDefault()
})
diff --git a/docs/assets/js/bootstrap-collapse.js b/docs/assets/js/bootstrap-collapse.js
index 48dea44c48..e1d5a856e8 100644
--- a/docs/assets/js/bootstrap-collapse.js
+++ b/docs/assets/js/bootstrap-collapse.js
@@ -129,7 +129,7 @@
return this.each(function () {
var $this = $(this)
, data = $this.data('collapse')
- , options = typeof option == 'object' && option
+ , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
diff --git a/docs/assets/js/bootstrap-dropdown.js b/docs/assets/js/bootstrap-dropdown.js
index 93d645970d..37819e361a 100644
--- a/docs/assets/js/bootstrap-dropdown.js
+++ b/docs/assets/js/bootstrap-dropdown.js
@@ -81,7 +81,10 @@
isActive = $parent.hasClass('open')
- if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
+ if (!isActive || (isActive && e.keyCode == 27)) {
+ if (e.which == 27) $parent.find(toggle).focus()
+ return $this.click()
+ }
$items = $('[role=menu] li:not(.divider):visible a', $parent)
@@ -154,7 +157,7 @@
$(document)
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
- .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+ .on('click.dropdown.data-api touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
diff --git a/docs/assets/js/bootstrap-popover.js b/docs/assets/js/bootstrap-popover.js
index dc639a63e2..4480c6cb67 100644
--- a/docs/assets/js/bootstrap-popover.js
+++ b/docs/assets/js/bootstrap-popover.js
@@ -99,7 +99,7 @@
placement: 'right'
, trigger: 'click'
, content: ''
- , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'
+ , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
diff --git a/docs/assets/js/bootstrap-scrollspy.js b/docs/assets/js/bootstrap-scrollspy.js
index b61c330067..7e845a513f 100644
--- a/docs/assets/js/bootstrap-scrollspy.js
+++ b/docs/assets/js/bootstrap-scrollspy.js
@@ -59,7 +59,7 @@
, $href = /^#\w/.test(href) && $(href)
return ( $href
&& $href.length
- && [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
+ && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
diff --git a/docs/assets/js/bootstrap-tooltip.js b/docs/assets/js/bootstrap-tooltip.js
index bbb5327767..d57cd9d7f1 100644
--- a/docs/assets/js/bootstrap-tooltip.js
+++ b/docs/assets/js/bootstrap-tooltip.js
@@ -38,19 +38,27 @@
, init: function (type, element, options) {
var eventIn
, eventOut
+ , triggers
+ , trigger
+ , i
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.enabled = true
- if (this.options.trigger == 'click') {
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
- } else if (this.options.trigger != 'manual') {
- eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
- eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ triggers = this.options.trigger.split(' ')
+
+ for (i = triggers.length; i--;) {
+ trigger = triggers[i]
+ if (trigger == 'click') {
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+ } else if (trigger != 'manual') {
+ eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
+ eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ }
}
this.options.selector ?
@@ -102,8 +110,11 @@
, actualHeight
, placement
, tp
+ , e = $.Event('show')
if (this.hasContent() && this.enabled) {
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
$tip = this.tip()
this.setContent()
@@ -118,7 +129,8 @@
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
- .insertAfter(this.$element)
+
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
pos = this.getPosition()
@@ -144,6 +156,8 @@
.offset(tp)
.addClass(placement)
.addClass('in')
+
+ this.$element.trigger('shown')
}
}
@@ -158,6 +172,10 @@
, hide: function () {
var that = this
, $tip = this.tip()
+ , e = $.Event('hide')
+
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
$tip.removeClass('in')
@@ -176,6 +194,8 @@
removeWithAnimation() :
$tip.detach()
+ this.$element.trigger('hidden')
+
return this
}
@@ -234,8 +254,8 @@
}
, toggle: function (e) {
- var self = $(e.currentTarget)[this.type](this._options).data(this.type)
- self[self.tip().hasClass('in') ? 'hide' : 'show']()
+ var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
+ self.tip().hasClass('in') ? self.hide() : self.show()
}
, destroy: function () {
@@ -267,10 +287,11 @@
, placement: 'top'
, selector: false
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
- , trigger: 'hover'
+ , trigger: 'hover focus'
, title: ''
, delay: 0
, html: false
+ , container: false
}
@@ -282,4 +303,4 @@
return this
}
-}(window.jQuery); \ No newline at end of file
+}(window.jQuery);
diff --git a/docs/assets/js/bootstrap-typeahead.js b/docs/assets/js/bootstrap-typeahead.js
index 609be260cc..8624bc7bc0 100644
--- a/docs/assets/js/bootstrap-typeahead.js
+++ b/docs/assets/js/bootstrap-typeahead.js
@@ -271,6 +271,7 @@
e.stopPropagation()
e.preventDefault()
this.select()
+ this.$element.focus()
}
, mouseenter: function (e) {
diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js
index 22925ee713..f0a03ee823 100644
--- a/docs/assets/js/bootstrap.js
+++ b/docs/assets/js/bootstrap.js
@@ -369,6 +369,7 @@
e = $.Event('slide', {
relatedTarget: $next[0]
+ , direction: direction
})
if ($next.hasClass('active')) return
@@ -448,11 +449,18 @@
/* CAROUSEL DATA-API
* ================= */
- $(document).on('click.carousel.data-api', '[data-slide]', function (e) {
+ $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, options = $.extend({}, $target.data(), $this.data())
+ , slideIndex
+
$target.carousel(options)
+
+ if (slideIndex = $this.attr('data-slide-to')) {
+ $target.data('carousel').pause().to(slideIndex).cycle()
+ }
+
e.preventDefault()
})
@@ -587,7 +595,7 @@
return this.each(function () {
var $this = $(this)
, data = $this.data('collapse')
- , options = typeof option == 'object' && option
+ , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
@@ -705,7 +713,10 @@
isActive = $parent.hasClass('open')
- if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
+ if (!isActive || (isActive && e.keyCode == 27)) {
+ if (e.which == 27) $parent.find(toggle).focus()
+ return $this.click()
+ }
$items = $('[role=menu] li:not(.divider):visible a', $parent)
@@ -778,7 +789,7 @@
$(document)
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
- .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+ .on('click.dropdown.data-api touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
@@ -1067,19 +1078,27 @@
, init: function (type, element, options) {
var eventIn
, eventOut
+ , triggers
+ , trigger
+ , i
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.enabled = true
- if (this.options.trigger == 'click') {
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
- } else if (this.options.trigger != 'manual') {
- eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
- eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ triggers = this.options.trigger.split(' ')
+
+ for (i = triggers.length; i--;) {
+ trigger = triggers[i]
+ if (trigger == 'click') {
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+ } else if (trigger != 'manual') {
+ eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
+ eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ }
}
this.options.selector ?
@@ -1131,8 +1150,11 @@
, actualHeight
, placement
, tp
+ , e = $.Event('show')
if (this.hasContent() && this.enabled) {
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
$tip = this.tip()
this.setContent()
@@ -1147,7 +1169,8 @@
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
- .insertAfter(this.$element)
+
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
pos = this.getPosition()
@@ -1173,6 +1196,8 @@
.offset(tp)
.addClass(placement)
.addClass('in')
+
+ this.$element.trigger('shown')
}
}
@@ -1187,6 +1212,10 @@
, hide: function () {
var that = this
, $tip = this.tip()
+ , e = $.Event('hide')
+
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
$tip.removeClass('in')
@@ -1205,6 +1234,8 @@
removeWithAnimation() :
$tip.detach()
+ this.$element.trigger('hidden')
+
return this
}
@@ -1263,8 +1294,8 @@
}
, toggle: function (e) {
- var self = $(e.currentTarget)[this.type](this._options).data(this.type)
- self[self.tip().hasClass('in') ? 'hide' : 'show']()
+ var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
+ self.tip().hasClass('in') ? self.hide() : self.show()
}
, destroy: function () {
@@ -1296,10 +1327,11 @@
, placement: 'top'
, selector: false
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
- , trigger: 'hover'
+ , trigger: 'hover focus'
, title: ''
, delay: 0
, html: false
+ , container: false
}
@@ -1311,7 +1343,8 @@
return this
}
-}(window.jQuery);/* ===========================================================
+}(window.jQuery);
+/* ===========================================================
* bootstrap-popover.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
@@ -1412,7 +1445,7 @@
placement: 'right'
, trigger: 'click'
, content: ''
- , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'
+ , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
@@ -1486,7 +1519,7 @@
, $href = /^#\w/.test(href) && $(href)
return ( $href
&& $href.length
- && [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
+ && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
@@ -2002,6 +2035,7 @@
e.stopPropagation()
e.preventDefault()
this.select()
+ this.$element.focus()
}
, mouseenter: function (e) {
diff --git a/docs/assets/js/bootstrap.min.js b/docs/assets/js/bootstrap.min.js
index ed0ce6fa2f..6ae2fbe4de 100644
--- a/docs/assets/js/bootstrap.min.js
+++ b/docs/assets/js/bootstrap.min.js
@@ -1,6 +1,6 @@
/**
-* Bootstrap.js v2.2.3 by @fat & @mdo
+* Bootstrap.js v2.3.0 by @fat & @mdo
* Copyright 2012 Twitter, Inc.
* http://www.apache.org/licenses/LICENSE-2.0.txt
*/
-!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0]});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||s.toggleClass("open"),n.focus(),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider):visible a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<r.length-1&&a++,~a||(a=0),r.eq(a).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api touchstart.dropdown.data-api",r).on("click.dropdown touchstart.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("touchstart.dropdown.data-api",".dropdown-menu",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(e){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),i=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,e.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),t=this.getPosition(),n=e[0].offsetWidth,r=e[0].offsetHeight;switch(i){case"bottom":s={top:t.top+t.height,left:t.left+t.width/2-n/2};break;case"top":s={top:t.top-r,left:t.left+t.width/2-n/2};break;case"left":s={top:t.top+t.height/2-r/2,left:t.left-n};break;case"right":s={top:t.top+t.height/2-r/2,left:t.left+t.width}}e.offset(s).addClass(i).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.detach(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);n[n.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+t.$scrollElement.scrollTop(),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery); \ No newline at end of file
+!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||s.toggleClass("open"),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api touchstart.dropdown.data-api",r).on("click.dropdown.data-api touchstart.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("touchstart.dropdown.data-api",".dropdown-menu",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(e){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}t.offset(o).addClass(s).addClass("in"),this.$element.trigger("shown")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery); \ No newline at end of file
diff --git a/docs/assets/js/holder/holder.js b/docs/assets/js/holder/holder.js
index 2377badf0e..9c36d4281d 100755
--- a/docs/assets/js/holder/holder.js
+++ b/docs/assets/js/holder/holder.js
@@ -1,7 +1,7 @@
/*
-Holder - 1.6 - client side image placeholders
-(c) 2012 Ivan Malopinsky / http://imsky.co
+Holder - 1.9 - client side image placeholders
+(c) 2012-2013 Ivan Malopinsky / http://imsky.co
Provided under the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0
Commercial use requires attribution.
@@ -33,6 +33,13 @@ function selector(a){
//shallow object property extend
function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}
+//hasOwnProperty polyfill
+if (!Object.prototype.hasOwnProperty)
+ Object.prototype.hasOwnProperty = function(prop) {
+ var proto = this.__proto__ || this.constructor.prototype;
+ return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
+ }
+
function text_size(width, height, template) {
var dimension_arr = [height, width].sort();
var maxFactor = Math.round(dimension_arr[1] / 16),
@@ -47,6 +54,7 @@ function draw(ctx, dimensions, template, ratio) {
var ts = text_size(dimensions.width, dimensions.height, template);
var text_height = ts.height;
var width = dimensions.width * ratio, height = dimensions.height * ratio;
+ var font = template.font ? template.font : "sans-serif";
canvas.width = width;
canvas.height = height;
ctx.textAlign = "center";
@@ -54,39 +62,42 @@ function draw(ctx, dimensions, template, ratio) {
ctx.fillStyle = template.background;
ctx.fillRect(0, 0, width, height);
ctx.fillStyle = template.foreground;
- ctx.font = "bold " + text_height + "px sans-serif";
+ ctx.font = "bold " + text_height + "px "+font;
var text = template.text ? template.text : (dimensions.width + "x" + dimensions.height);
if (ctx.measureText(text).width / width > 1) {
text_height = template.size / (ctx.measureText(text).width / width);
}
- ctx.font = "bold " + (text_height * ratio) + "px sans-serif";
+ //Resetting font size if necessary
+ ctx.font = "bold " + (text_height * ratio) + "px "+font;
ctx.fillText(text, (width / 2), (height / 2), width);
return canvas.toDataURL("image/png");
}
function render(mode, el, holder, src) {
-
var dimensions = holder.dimensions,
theme = holder.theme,
- text = holder.text;
+ text = holder.text ? decodeURIComponent(holder.text) : holder.text;
var dimensions_caption = dimensions.width + "x" + dimensions.height;
- theme = (text ? extend(theme, {
- text: text
- }) : theme);
+ theme = (text ? extend(theme, { text: text }) : theme);
+ theme = (holder.font ? extend(theme, {font: holder.font}) : theme);
var ratio = 1;
if(window.devicePixelRatio && window.devicePixelRatio > 1){
ratio = window.devicePixelRatio;
}
-
+
if (mode == "image") {
el.setAttribute("data-src", src);
el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption);
- el.style.width = dimensions.width + "px";
- el.style.height = dimensions.height + "px";
+
+ if(fallback || !holder.auto){
+ el.style.width = dimensions.width + "px";
+ el.style.height = dimensions.height + "px";
+ }
if (fallback) {
el.style.backgroundColor = theme.background;
+
}
else{
el.setAttribute("src", draw(ctx, dimensions, theme, ratio));
@@ -108,14 +119,7 @@ function fluid(el, holder, src) {
text: text
}) : theme);
- var fluid = document.createElement("table");
- fluid.setAttribute("cellspacing",0)
- fluid.setAttribute("cellpadding",0)
- fluid.setAttribute("border",0)
-
- var row = document.createElement("tr")
- .appendChild(document.createElement("td")
- .appendChild(document.createTextNode(theme.text)));
+ var fluid = document.createElement("div");
fluid.style.backgroundColor = theme.background;
fluid.style.color = theme.foreground;
@@ -124,31 +128,38 @@ function fluid(el, holder, src) {
fluid.style.height = holder.dimensions.height + (holder.dimensions.height.indexOf("%")>0?"":"px");
fluid.id = el.id;
- var frag = document.createDocumentFragment(),
- tbody = document.createElement("tbody"),
- tr = document.createElement("tr"),
- td = document.createElement("td");
- tr.appendChild(td);
- tbody.appendChild(tr);
- frag.appendChild(tbody);
-
+ el.style.width=0;
+ el.style.height=0;
+
if (theme.text) {
- td.appendChild(document.createTextNode(theme.text))
- fluid.appendChild(frag);
+ fluid.appendChild(document.createTextNode(theme.text))
} else {
- td.appendChild(document.createTextNode(dimensions_caption))
- fluid.appendChild(frag);
+ fluid.appendChild(document.createTextNode(dimensions_caption))
fluid_images.push(fluid);
setTimeout(fluid_update, 0);
}
-
- el.parentNode.replaceChild(fluid, el);
+
+ el.parentNode.insertBefore(fluid, el.nextSibling)
+
+ if(window.jQuery){
+ jQuery(function($){
+ $(el).on("load", function(){
+ el.style.width = fluid.style.width;
+ el.style.height = fluid.style.height;
+ $(el).show();
+ $(fluid).remove();
+ });
+ })
+ }
}
function fluid_update() {
for (i in fluid_images) {
- var el = fluid_images[i];
- var label = el.getElementsByTagName("td")[0].firstChild;
+ if(!fluid_images.hasOwnProperty(i)) continue;
+ var el = fluid_images[i],
+ label = el.firstChild;
+
+ el.style.lineHeight = el.offsetHeight+"px";
label.data = el.offsetWidth + "x" + el.offsetHeight;
}
}
@@ -175,6 +186,11 @@ function parse_flags(flags, options) {
ret.theme = options.themes[flag];
} else if (app.flags.text.match(flag)) {
ret.text = app.flags.text.output(flag);
+ } else if(app.flags.font.match(flag)){
+ ret.font = app.flags.font.output(flag);
+ }
+ else if(app.flags.auto.match(flag)){
+ ret.auto = true;
}
}
@@ -199,7 +215,7 @@ var fluid_images = [];
var settings = {
domain: "holder.js",
images: "img",
- elements: ".holderjs",
+ bgnodes: ".holderjs",
themes: {
"gray": {
background: "#eee",
@@ -217,13 +233,13 @@ var settings = {
size: 12
}
},
- stylesheet: ".holderjs-fluid {font-size:16px;font-weight:bold;text-align:center;font-family:sans-serif;border-collapse:collapse;border:0;vertical-align:middle;margin:0}"
+ stylesheet: ".holderjs-fluid {font-size:16px;font-weight:bold;text-align:center;font-family:sans-serif;margin:0}"
};
app.flags = {
dimensions: {
- regex: /(\d+)x(\d+)/,
+ regex: /^(\d+)x(\d+)$/,
output: function (val) {
var exec = this.regex.exec(val);
return {
@@ -233,7 +249,7 @@ app.flags = {
}
},
fluid: {
- regex: /([0-9%]+)x([0-9%]+)/,
+ regex: /^([0-9%]+)x([0-9%]+)$/,
output: function (val) {
var exec = this.regex.exec(val);
return {
@@ -258,10 +274,20 @@ app.flags = {
output: function (val) {
return this.regex.exec(val)[1];
}
+ },
+ font: {
+ regex: /font\:(.*)/,
+ output: function(val){
+ return this.regex.exec(val)[1];
+ }
+ },
+ auto: {
+ regex: /^auto$/
}
}
for (var flag in app.flags) {
+ if(!app.flags.hasOwnProperty(flag)) continue;
app.flags[flag].match = function (val) {
return val.match(this.regex)
}
@@ -285,29 +311,58 @@ app.add_image = function (src, el) {
};
app.run = function (o) {
- var options = extend(settings, o),
- images_nodes = selector(options.images),
- elements = selector(options.elements),
- preempted = true,
- images = [];
+ var options = extend(settings, o), images = [];
+
+ if(options.images instanceof window.NodeList){
+ imageNodes = options.images;
+ }
+ else if(options.images instanceof window.Node){
+ imageNodes = [options.images];
+ }
+ else{
+ imageNodes = selector(options.images);
+ }
+
+ if(options.elements instanceof window.NodeList){
+ bgnodes = options.bgnodes;
+ }
+ else if(options.bgnodes instanceof window.Node){
+ bgnodes = [options.bgnodes];
+ }
+ else{
+ bgnodes = selector(options.bgnodes);
+ }
- for (i = 0, l = images_nodes.length; i < l; i++) images.push(images_nodes[i]);
+ preempted = true;
- var holdercss = document.createElement("style");
- holdercss.type = "text/css";
- holdercss.styleSheet ? holdercss.styleSheet.cssText = options.stylesheet : holdercss.textContent = options.stylesheet;
- document.getElementsByTagName("head")[0].appendChild(holdercss);
+ for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]);
+
+ var holdercss = document.getElementById("holderjs-style");
+
+ if(!holdercss){
+ holdercss = document.createElement("style");
+ holdercss.setAttribute("id", "holderjs-style");
+ holdercss.type = "text/css";
+ document.getElementsByTagName("head")[0].appendChild(holdercss);
+ }
+
+ if(holdercss.styleSheet){
+ holdercss.styleSheet += options.stylesheet;
+ }
+ else{
+ holdercss.textContent+= options.stylesheet;
+ }
var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)");
- for (var l = elements.length, i = 0; i < l; i++) {
- var src = window.getComputedStyle(elements[i], null)
+ for (var l = bgnodes.length, i = 0; i < l; i++) {
+ var src = window.getComputedStyle(bgnodes[i], null)
.getPropertyValue("background-image");
var flags = src.match(cssregex);
if (flags) {
var holder = parse_flags(flags[1].split("/"), options);
if (holder) {
- render("background", elements[i], holder, src);
+ render("background", bgnodes[i], holder, src);
}
}
}
@@ -339,4 +394,8 @@ contentLoaded(win, function () {
preempted || app.run();
});
-})(Holder, window);
+if ( typeof define === "function" && define.amd ) {
+ define( "Holder", [], function () { return app; } );
+}
+
+})(Holder, window); \ No newline at end of file
diff --git a/docs/components.html b/docs/components.html
index c0dfd6cc79..17ea3a0d46 100644
--- a/docs/components.html
+++ b/docs/components.html
@@ -159,6 +159,25 @@
...
&lt;/ul&gt;
</pre>
+
+ <h3>Disabled menu options</h3>
+ <p>Add <code>.disabled</code> to a <code>&lt;li&gt;</code> in the dropdown to disable the link.</p>
+ <div class="bs-docs-example">
+ <div class="dropdown clearfix">
+ <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" style="display: block; position: static; margin-bottom: 5px; *width: 180px;">
+ <li><a tabindex="-1" href="#">Regular link</a></li>
+ <li class="disabled"><a tabindex="-1" href="#">Disabled link</a></li>
+ <li><a tabindex="-1" href="#">Another link</a></li>
+ </ul>
+ </div>
+ </div>
+<pre class="prettyprint linenums">
+&lt;ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"&gt;
+ &lt;li&gt;&lt;a tabindex="-1" href="#"&gt;Regular link&lt;/a&gt;&lt;/li&gt;
+ &lt;li&gt;&lt;a tabindex="-1" href="#"&gt;Disabled link&lt;/a&gt;&lt;/li&gt;
+ &lt;li&gt;&lt;a tabindex="-1" href="#"&gt;Another link&lt;/a&gt;&lt;/li&gt;
+&lt;/ul&gt;
+</pre>
</section>
@@ -185,9 +204,9 @@
</div>
<pre class="prettyprint linenums">
&lt;div class="btn-group"&gt;
- &lt;button class="btn"&gt;1&lt;/button&gt;
- &lt;button class="btn"&gt;2&lt;/button&gt;
- &lt;button class="btn"&gt;3&lt;/button&gt;
+ &lt;button class="btn"&gt;Left&lt;/button&gt;
+ &lt;button class="btn"&gt;Middle&lt;/button&gt;
+ &lt;button class="btn"&gt;Right&lt;/button&gt;
&lt;/div&gt;
</pre>
@@ -1977,7 +1996,7 @@
<p><button class="close" style="float: none;">&times;</button></p>
</div>
<pre class="prettyprint linenums">&lt;button class="close"&gt;&amp;times;&lt;/button&gt;</pre>
- <p>iOS devices require an href="#" for click events if you would rather use an anchor.</p>
+ <p>iOS devices require an <code>href="#"</code> for click events if you would rather use an anchor.</p>
<pre class="prettyprint linenums">&lt;a class="close" href="#"&gt;&amp;times;&lt;/a&gt;</pre>
<h2>Helper classes</h2>
diff --git a/docs/examples/carousel.html b/docs/examples/carousel.html
index 0958103fc6..328fe5a1e1 100644
--- a/docs/examples/carousel.html
+++ b/docs/examples/carousel.html
@@ -68,7 +68,7 @@
- /* CUSTOMIZE THE NAVBAR
+ /* CUSTOMIZE THE CAROUSEL
-------------------------------------------------- */
/* Carousel base class */
@@ -88,6 +88,7 @@
text-shadow: 0 1px 1px rgba(0,0,0,.4);
background-color: transparent;
border: 0;
+ z-index: 10;
}
.carousel .item {
@@ -417,7 +418,7 @@
<!-- FOOTER -->
<footer>
<p class="pull-right"><a href="#">Back to top</a></p>
- <p>&copy; 2012 Company, Inc. &middot; <a href="#">Privacy</a> &middot; <a href="#">Terms</a></p>
+ <p>&copy; 2013 Company, Inc. &middot; <a href="#">Privacy</a> &middot; <a href="#">Terms</a></p>
</footer>
</div><!-- /.container -->
@@ -448,5 +449,6 @@
})
}(window.jQuery)
</script>
+ <script src="../assets/js/holder/holder.js"></script>
</body>
</html>
diff --git a/docs/examples/hero.html b/docs/examples/hero.html
index f0a5e17093..6c585eac25 100644
--- a/docs/examples/hero.html
+++ b/docs/examples/hero.html
@@ -100,7 +100,7 @@
<hr>
<footer>
- <p>&copy; Company 2012</p>
+ <p>&copy; Company 2013</p>
</footer>
</div> <!-- /container -->
diff --git a/docs/examples/marketing-alternate.html b/docs/examples/justified-nav.html
index 8cbeb02a25..9071a8d81b 100644
--- a/docs/examples/marketing-alternate.html
+++ b/docs/examples/justified-nav.html
@@ -57,6 +57,8 @@
}
.navbar .nav {
margin: 0;
+ display: table;
+ width: 100%;
}
.navbar .nav li {
display: table-cell;
@@ -146,7 +148,7 @@
<hr>
<div class="footer">
- <p>&copy; Company 2012</p>
+ <p>&copy; Company 2013</p>
</div>
</div> <!-- /container -->
diff --git a/docs/examples/marketing-narrow.html b/docs/examples/marketing-narrow.html
index 9ce1cd5bc6..996f8a1da1 100644
--- a/docs/examples/marketing-narrow.html
+++ b/docs/examples/marketing-narrow.html
@@ -111,7 +111,7 @@
<hr>
<div class="footer">
- <p>&copy; Company 2012</p>
+ <p>&copy; Company 2013</p>
</div>
</div> <!-- /container -->
diff --git a/docs/examples/sticky-footer-navbar.html b/docs/examples/sticky-footer-navbar.html
new file mode 100644
index 0000000000..ad4f87a04f
--- /dev/null
+++ b/docs/examples/sticky-footer-navbar.html
@@ -0,0 +1,161 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Sticky footer &middot; Twitter Bootstrap</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="">
+
+ <!-- CSS -->
+ <link href="../assets/css/bootstrap.css" rel="stylesheet">
+ <style type="text/css">
+
+ /* Sticky footer styles
+ -------------------------------------------------- */
+
+ html,
+ body {
+ height: 100%;
+ /* The html and body elements cannot have any padding or margin. */
+ }
+
+ /* Wrapper for page content to push down footer */
+ #wrap {
+ min-height: 100%;
+ height: auto !important;
+ height: 100%;
+ /* Negative indent footer by it's height */
+ margin: 0 auto -60px;
+ }
+
+ /* Set the fixed height of the footer here */
+ #push,
+ #footer {
+ height: 60px;
+ }
+ #footer {
+ background-color: #f5f5f5;
+ }
+
+ /* Lastly, apply responsive CSS fixes as necessary */
+ @media (max-width: 767px) {
+ #footer {
+ margin-left: -20px;
+ margin-right: -20px;
+ padding-left: 20px;
+ padding-right: 20px;
+ }
+ }
+
+
+
+ /* Custom page CSS
+ -------------------------------------------------- */
+ /* Not required for template or sticky footer method. */
+
+ #wrap > .container {
+ padding-top: 60px;
+ }
+ .container .credit {
+ margin: 20px 0;
+ }
+
+ code {
+ font-size: 80%;
+ }
+
+ </style>
+ <link href="../assets/css/bootstrap-responsive.css" rel="stylesheet">
+
+ <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+
+ <!-- Fav and touch icons -->
+ <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
+ <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
+ <link rel="shortcut icon" href="../assets/ico/favicon.png">
+ </head>
+
+ <body>
+
+
+ <!-- Part 1: Wrap all page content here -->
+ <div id="wrap">
+
+ <!-- Fixed navbar -->
+ <div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+ <a class="brand" href="#">Project name</a>
+ <div class="nav-collapse collapse">
+ <ul class="nav">
+ <li class="active"><a href="#">Home</a></li>
+ <li><a href="#about">About</a></li>
+ <li><a href="#contact">Contact</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li><a href="#">Action</a></li>
+ <li><a href="#">Another action</a></li>
+ <li><a href="#">Something else here</a></li>
+ <li class="divider"></li>
+ <li class="nav-header">Nav header</li>
+ <li><a href="#">Separated link</a></li>
+ <li><a href="#">One more separated link</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div><!--/.nav-collapse -->
+ </div>
+ </div>
+ </div>
+
+ <!-- Begin page content -->
+ <div class="container">
+ <div class="page-header">
+ <h1>Sticky footer with fixed navbar</h1>
+ </div>
+ <p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added within <code>#wrap</code> with <code>padding-top: 60px;</code> on the <code>.container</code>.</p>
+ <p>Back to <a href="./sticky-footer.html">the sticky footer</a> minus the navbar.</p>
+ </div>
+
+ <div id="push"></div>
+ </div>
+
+ <div id="footer">
+ <div class="container">
+ <p class="muted credit">Example courtesy <a href="http://martinbean.co.uk">Martin Bean</a> and <a href="http://ryanfait.com/sticky-footer/">Ryan Fait</a>.</p>
+ </div>
+ </div>
+
+
+
+ <!-- Le javascript
+ ================================================== -->
+ <!-- Placed at the end of the document so the pages load faster -->
+ <script src="../assets/js/jquery.js"></script>
+ <script src="../assets/js/bootstrap-transition.js"></script>
+ <script src="../assets/js/bootstrap-alert.js"></script>
+ <script src="../assets/js/bootstrap-modal.js"></script>
+ <script src="../assets/js/bootstrap-dropdown.js"></script>
+ <script src="../assets/js/bootstrap-scrollspy.js"></script>
+ <script src="../assets/js/bootstrap-tab.js"></script>
+ <script src="../assets/js/bootstrap-tooltip.js"></script>
+ <script src="../assets/js/bootstrap-popover.js"></script>
+ <script src="../assets/js/bootstrap-button.js"></script>
+ <script src="../assets/js/bootstrap-collapse.js"></script>
+ <script src="../assets/js/bootstrap-carousel.js"></script>
+ <script src="../assets/js/bootstrap-typeahead.js"></script>
+
+ </body>
+</html>
diff --git a/docs/examples/sticky-footer.html b/docs/examples/sticky-footer.html
index 1c9c36149e..80490ffd0c 100644
--- a/docs/examples/sticky-footer.html
+++ b/docs/examples/sticky-footer.html
@@ -90,6 +90,7 @@
<h1>Sticky footer</h1>
</div>
<p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.</p>
+ <p>Use <a href="./sticky-footer-navbar.html">the sticky footer</a> with a fixed navbar if need be, too.</p>
</div>
<div id="push"></div>
diff --git a/docs/getting-started.html b/docs/getting-started.html
index 3bd33e8a57..99996c4f82 100644
--- a/docs/getting-started.html
+++ b/docs/getting-started.html
@@ -195,7 +195,7 @@
<div class="page-header">
<h1>4. Basic HTML template</h1>
</div>
- <p class="lead">With a brief intro into the contents out of the way, we can focus on putting Bootstrap to use. To do that, we'll utilize a basic HTML template that includes everything we mentioned in the <a href="#file-structure">File structure</a>.</p>
+ <p class="lead">With a brief intro into the contents out of the way, we can focus on putting Bootstrap to use. To do that, we'll utilize a basic HTML template that includes everything we mentioned in the <a href="./getting-started.html#file-structure">File structure</a>.</p>
<p>Now, here's a look at a <strong>typical HTML file</strong>:</p>
<pre class="prettyprint linenums">
&lt;!DOCTYPE html&gt;
@@ -240,14 +240,14 @@
<div class="row bootstrap-examples">
<div class="span4">
<a class="thumbnail" href="examples/starter-template.html">
- <img src="assets/img/examples/bootstrap-example-starter.jpg" alt="">
+ <img src="assets/img/examples/bootstrap-example-starter.png" alt="">
</a>
<h4>Starter template</h4>
<p>A barebones HTML document with all the Bootstrap CSS and JavaScript included.</p>
</div>
<div class="span4">
<a class="thumbnail" href="examples/hero.html">
- <img src="assets/img/examples/bootstrap-example-hero.jpg" alt="">
+ <img src="assets/img/examples/bootstrap-example-marketing.png" alt="">
</a>
<h4>Basic marketing site</h4>
<p>Featuring a hero unit for a primary message and three supporting elements.</p>
@@ -260,6 +260,13 @@
<p>Slim, lightweight marketing template for small projects or teams.</p>
</div>
<div class="span4">
+ <a class="thumbnail" href="examples/justified-nav.html">
+ <img src="assets/img/examples/bootstrap-example-justified-nav.png" alt="">
+ </a>
+ <h4>Justified nav</h4>
+ <p>Marketing page with equal-width navigation links in a modified navbar.</p>
+ </div>
+ <div class="span4">
<a class="thumbnail" href="examples/signin.html">
<img src="assets/img/examples/bootstrap-example-signin.png" alt="">
</a>
diff --git a/docs/javascript.html b/docs/javascript.html
index 2d01af561f..81bc40ad43 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -402,21 +402,21 @@ $('#myModal').on('hidden', function () {
<li class="dropdown">
<a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
- <li><a tabindex="-1" href="http://google.com">Action</a></li>
- <li><a tabindex="-1" href="#anotherAction">Another action</a></li>
- <li><a tabindex="-1" href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a tabindex="-1" href="#">Separated link</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="http://google.com">Action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#anotherAction">Another action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 2 <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
- <li><a tabindex="-1" href="#">Action</a></li>
- <li><a tabindex="-1" href="#">Another action</a></li>
- <li><a tabindex="-1" href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a tabindex="-1" href="#">Separated link</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</li>
</ul>
@@ -424,11 +424,11 @@ $('#myModal').on('hidden', function () {
<li id="fat-menu" class="dropdown">
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 3 <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
- <li><a tabindex="-1" href="#">Action</a></li>
- <li><a tabindex="-1" href="#">Another action</a></li>
- <li><a tabindex="-1" href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a tabindex="-1" href="#">Separated link</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</li>
</ul>
@@ -444,31 +444,31 @@ $('#myModal').on('hidden', function () {
<li class="dropdown">
<a class="dropdown-toggle" id="drop4" role="button" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a>
<ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4">
- <li><a tabindex="-1" href="#">Action</a></li>
- <li><a tabindex="-1" href="#">Another action</a></li>
- <li><a tabindex="-1" href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a tabindex="-1" href="#">Separated link</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 2 <b class="caret"></b></a>
<ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5">
- <li><a tabindex="-1" href="#">Action</a></li>
- <li><a tabindex="-1" href="#">Another action</a></li>
- <li><a tabindex="-1" href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a tabindex="-1" href="#">Separated link</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 3 <b class="caret"></b></a>
<ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop5">
- <li><a tabindex="-1" href="#">Action</a></li>
- <li><a tabindex="-1" href="#">Another action</a></li>
- <li><a tabindex="-1" href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a tabindex="-1" href="#">Separated link</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</li>
</ul> <!-- /tabs -->
@@ -767,17 +767,17 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<p>Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.</p>
<p>Hover over the links below to see tooltips:</p>
<div class="bs-docs-example tooltip-demo">
- <p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" rel="tooltip" title="Default tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" rel="tooltip" title="Another tooltip">have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan <a href="#" rel="tooltip" title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" rel="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
+ <p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" data-toggle="tooltip" title="Default tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" data-toggle="tooltip" title="Another tooltip">have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan <a href="#" data-toggle="tooltip" title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" data-toggle="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
</p>
</div>
<h3>Four directions</h3>
<div class="bs-docs-example tooltip-demo">
<ul class="bs-docs-tooltip-examples">
- <li><a href="#" rel="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</a></li>
- <li><a href="#" rel="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</a></li>
- <li><a href="#" rel="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</a></li>
- <li><a href="#" rel="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</a></li>
+ <li><a href="#" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</a></li>
+ <li><a href="#" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</a></li>
+ <li><a href="#" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</a></li>
+ <li><a href="#" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</a></li>
</ul>
</div>
@@ -815,7 +815,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
</tr>
<tr>
<td>placement</td>
- <td>string|function</td>
+ <td>string | function</td>
<td>'top'</td>
<td>how to position the tooltip - top | bottom | left | right</td>
</tr>
@@ -834,8 +834,8 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<tr>
<td>trigger</td>
<td>string</td>
- <td>'hover'</td>
- <td>how tooltip is triggered - click | hover | focus | manual</td>
+ <td>'hover focus'</td>
+ <td>how tooltip is triggered - click | hover | focus | manual. Note you case pass trigger mutliple, space seperated, trigger types.</td>
</tr>
<tr>
<td>delay</td>
@@ -847,6 +847,14 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
</td>
</tr>
+ <tr>
+ <td>container</td>
+ <td>string | false</td>
+ <td>false</td>
+ <td>
+ <p>Appends the tooltip to a specific element <code>container: 'body'</code></p>
+ </td>
+ </tr>
</tbody>
</table>
<div class="alert alert-info">
@@ -855,8 +863,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
</div>
<h3>Markup</h3>
- <p>For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.</p>
- <pre class="prettyprint linenums">&lt;a href="#" rel="tooltip" title="first tooltip"&gt;hover over me&lt;/a&gt;</pre>
+ <pre class="prettyprint linenums">&lt;a href="#" data-toggle="tooltip" title="first tooltip"&gt;hover over me&lt;/a&gt;</pre>
<h3>Methods</h3>
<h4>$().tooltip(options)</h4>
@@ -928,16 +935,16 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<h3>Live demo</h3>
<div class="bs-docs-example" style="padding-bottom: 24px;">
- <a href="#" class="btn btn-large btn-danger" rel="popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">Click to toggle popover</a>
+ <a href="#" class="btn btn-large btn-danger" data-toggle="popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">Click to toggle popover</a>
</div>
<h4>Four directions</h4>
<div class="bs-docs-example tooltip-demo">
<ul class="bs-docs-tooltip-examples">
- <li><a href="#" class="btn" rel="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on top">Popover on top</a></li>
- <li><a href="#" class="btn" rel="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on right">Popover on right</a></li>
- <li><a href="#" class="btn" rel="popover" data-placement="bottom" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on bottom">Popover on bottom</a></li>
- <li><a href="#" class="btn" rel="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on left">Popover on left</a></li>
+ <li><a href="#" class="btn" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on top">Popover on top</a></li>
+ <li><a href="#" class="btn" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on right">Popover on right</a></li>
+ <li><a href="#" class="btn" data-toggle="popover" data-placement="bottom" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on bottom">Popover on bottom</a></li>
+ <li><a href="#" class="btn" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on left">Popover on left</a></li>
</ul>
</div>
@@ -975,7 +982,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
</tr>
<tr>
<td>placement</td>
- <td>string|function</td>
+ <td>string | function</td>
<td>'right'</td>
<td>how to position the popover - top | bottom | left | right</td>
</tr>
@@ -1421,9 +1428,9 @@ $('#myCollapsible').on('hidden', function () {
<div class="bs-docs-example">
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
- <li class="active"></li>
- <li></li>
- <li></li>
+ <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
+ <li data-target="#myCarousel" data-slide-to="1"></li>
+ <li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
@@ -1458,6 +1465,11 @@ $('#myCollapsible').on('hidden', function () {
</div>
<pre class="prettyprint linenums">
&lt;div id="myCarousel" class="carousel slide"&gt;
+ &lt;ol class="carousel-indicators"&gt
+ &lt;li data-target="#myCarousel" data-slide-to="0" class="active"&gt&lt;/li&gt
+ &lt;li data-target="#myCarousel" data-slide-to="1"&gt&lt;/li&gt
+ &lt;li data-target="#myCarousel" data-slide-to="2"&gt&lt;/li&gt
+ &lt;/ol&gt
&lt;!-- Carousel items --&gt;
&lt;div class="carousel-inner"&gt;
&lt;div class="active item"&gt;…&lt;/div&gt;
@@ -1482,7 +1494,7 @@ $('#myCollapsible').on('hidden', function () {
<h2>Usage</h2>
<h3>Via data attributes</h3>
- <p>...</p>
+ <p>Use data attributes to easily control the position of the carousel. <code>data-slide</code> accepts the keywords <code>prev</code> or <code>next</code>, which alters the slide position relative to it's current position. Alternatively, use <code>data-slide-to</code> to pass a raw slide index to the carousel <code>data-slide-to="2"</code>, which jump's the slide position to a particular index beginning with <code>0</code>.</p>
<h3>Via JavaScript</h3>
<p>Call carousel manually with:</p>
@@ -1572,7 +1584,7 @@ $('.carousel').carousel({
<input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="4" data-source='["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]'>
</div>
<pre class="prettyprint linenums">&lt;input type="text" data-provide="typeahead"&gt;</pre>
-
+ <p>You'll want to set <code>autocomplete="off"</code> to prevent default browser menus from appearing over the Bootstrap typeahead dropdown.</p>
<hr class="bs-docs-separator">
diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache
index f56fbc9d02..10a7ab0675 100644
--- a/docs/templates/pages/components.mustache
+++ b/docs/templates/pages/components.mustache
@@ -91,6 +91,25 @@
...
&lt;/ul&gt;
</pre>
+
+ <h3>Disabled menu options</h3>
+ <p>Add <code>.disabled</code> to a <code>&lt;li&gt;</code> in the dropdown to disable the link.</p>
+ <div class="bs-docs-example">
+ <div class="dropdown clearfix">
+ <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" style="display: block; position: static; margin-bottom: 5px; *width: 180px;">
+ <li><a tabindex="-1" href="#">Regular link</a></li>
+ <li class="disabled"><a tabindex="-1" href="#">Disabled link</a></li>
+ <li><a tabindex="-1" href="#">Another link</a></li>
+ </ul>
+ </div>
+ </div>{{! /example }}
+<pre class="prettyprint linenums">
+&lt;ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"&gt;
+ &lt;li&gt;&lt;a tabindex="-1" href="#"&gt;Regular link&lt;/a&gt;&lt;/li&gt;
+ &lt;li&gt;&lt;a tabindex="-1" href="#"&gt;Disabled link&lt;/a&gt;&lt;/li&gt;
+ &lt;li&gt;&lt;a tabindex="-1" href="#"&gt;Another link&lt;/a&gt;&lt;/li&gt;
+&lt;/ul&gt;
+</pre>
</section>
@@ -117,9 +136,9 @@
</div>
<pre class="prettyprint linenums">
&lt;div class="btn-group"&gt;
- &lt;button class="btn"&gt;1&lt;/button&gt;
- &lt;button class="btn"&gt;2&lt;/button&gt;
- &lt;button class="btn"&gt;3&lt;/button&gt;
+ &lt;button class="btn"&gt;Left&lt;/button&gt;
+ &lt;button class="btn"&gt;Middle&lt;/button&gt;
+ &lt;button class="btn"&gt;Right&lt;/button&gt;
&lt;/div&gt;
</pre>
@@ -1909,7 +1928,7 @@
<p><button class="close" style="float: none;">&times;</button></p>
</div>
<pre class="prettyprint linenums">&lt;button class="close"&gt;&amp;times;&lt;/button&gt;</pre>
- <p>iOS devices require an href="#" for click events if you would rather use an anchor.</p>
+ <p>iOS devices require an <code>href="#"</code> for click events if you would rather use an anchor.</p>
<pre class="prettyprint linenums">&lt;a class="close" href="#"&gt;&amp;times;&lt;/a&gt;</pre>
<h2>Helper classes</h2>
diff --git a/docs/templates/pages/getting-started.mustache b/docs/templates/pages/getting-started.mustache
index faa23ec50a..6330e6e11d 100644
--- a/docs/templates/pages/getting-started.mustache
+++ b/docs/templates/pages/getting-started.mustache
@@ -127,7 +127,7 @@
<div class="page-header">
<h1>4. Basic HTML template</h1>
</div>
- <p class="lead">With a brief intro into the contents out of the way, we can focus on putting Bootstrap to use. To do that, we'll utilize a basic HTML template that includes everything we mentioned in the <a href="#file-structure">File structure</a>.</p>
+ <p class="lead">With a brief intro into the contents out of the way, we can focus on putting Bootstrap to use. To do that, we'll utilize a basic HTML template that includes everything we mentioned in the <a href="./getting-started.html#file-structure">File structure</a>.</p>
<p>Now, here's a look at a <strong>typical HTML file</strong>:</p>
<pre class="prettyprint linenums">
&lt;!DOCTYPE html&gt;
@@ -172,14 +172,14 @@
<div class="row bootstrap-examples">
<div class="span4">
<a class="thumbnail" href="examples/starter-template.html">
- <img src="assets/img/examples/bootstrap-example-starter.jpg" alt="">
+ <img src="assets/img/examples/bootstrap-example-starter.png" alt="">
</a>
<h4>Starter template</h4>
<p>A barebones HTML document with all the Bootstrap CSS and JavaScript included.</p>
</div>
<div class="span4">
<a class="thumbnail" href="examples/hero.html">
- <img src="assets/img/examples/bootstrap-example-hero.jpg" alt="">
+ <img src="assets/img/examples/bootstrap-example-marketing.png" alt="">
</a>
<h4>Basic marketing site</h4>
<p>Featuring a hero unit for a primary message and three supporting elements.</p>
@@ -192,6 +192,13 @@
<p>Slim, lightweight marketing template for small projects or teams.</p>
</div>
<div class="span4">
+ <a class="thumbnail" href="examples/justified-nav.html">
+ <img src="assets/img/examples/bootstrap-example-justified-nav.png" alt="">
+ </a>
+ <h4>{{_i}}Justified nav{{/i}}</h4>
+ <p>{{_i}}Marketing page with equal-width navigation links in a modified navbar.{{/i}}</p>
+ </div>
+ <div class="span4">
<a class="thumbnail" href="examples/signin.html">
<img src="assets/img/examples/bootstrap-example-signin.png" alt="">
</a>
diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache
index 55a52e2589..f87b1705ff 100644
--- a/docs/templates/pages/javascript.mustache
+++ b/docs/templates/pages/javascript.mustache
@@ -335,21 +335,21 @@ $('#myModal').on('hidden', function () {
<li class="dropdown">
<a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
- <li><a tabindex="-1" href="http://google.com">Action</a></li>
- <li><a tabindex="-1" href="#anotherAction">Another action</a></li>
- <li><a tabindex="-1" href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a tabindex="-1" href="#">Separated link</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="http://google.com">Action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#anotherAction">Another action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 2 <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
- <li><a tabindex="-1" href="#">Action</a></li>
- <li><a tabindex="-1" href="#">Another action</a></li>
- <li><a tabindex="-1" href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a tabindex="-1" href="#">Separated link</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</li>
</ul>
@@ -357,11 +357,11 @@ $('#myModal').on('hidden', function () {
<li id="fat-menu" class="dropdown">
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 3 <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
- <li><a tabindex="-1" href="#">Action</a></li>
- <li><a tabindex="-1" href="#">Another action</a></li>
- <li><a tabindex="-1" href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a tabindex="-1" href="#">Separated link</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</li>
</ul>
@@ -377,31 +377,31 @@ $('#myModal').on('hidden', function () {
<li class="dropdown">
<a class="dropdown-toggle" id="drop4" role="button" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a>
<ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4">
- <li><a tabindex="-1" href="#">Action</a></li>
- <li><a tabindex="-1" href="#">Another action</a></li>
- <li><a tabindex="-1" href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a tabindex="-1" href="#">Separated link</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 2 <b class="caret"></b></a>
<ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5">
- <li><a tabindex="-1" href="#">Action</a></li>
- <li><a tabindex="-1" href="#">Another action</a></li>
- <li><a tabindex="-1" href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a tabindex="-1" href="#">Separated link</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 3 <b class="caret"></b></a>
<ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop5">
- <li><a tabindex="-1" href="#">Action</a></li>
- <li><a tabindex="-1" href="#">Another action</a></li>
- <li><a tabindex="-1" href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a tabindex="-1" href="#">Separated link</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</li>
</ul> <!-- /tabs -->
@@ -700,17 +700,17 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<p>Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.</p>
<p>Hover over the links below to see tooltips:</p>
<div class="bs-docs-example tooltip-demo">
- <p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" rel="tooltip" title="Default tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" rel="tooltip" title="Another tooltip">have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan <a href="#" rel="tooltip" title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" rel="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
+ <p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" data-toggle="tooltip" title="Default tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" data-toggle="tooltip" title="Another tooltip">have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan <a href="#" data-toggle="tooltip" title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" data-toggle="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
</p>
</div>{{! /example }}
<h3>Four directions</h3>
<div class="bs-docs-example tooltip-demo">
<ul class="bs-docs-tooltip-examples">
- <li><a href="#" rel="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</a></li>
- <li><a href="#" rel="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</a></li>
- <li><a href="#" rel="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</a></li>
- <li><a href="#" rel="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</a></li>
+ <li><a href="#" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</a></li>
+ <li><a href="#" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</a></li>
+ <li><a href="#" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</a></li>
+ <li><a href="#" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</a></li>
</ul>
</div>{{! /example }}
@@ -748,7 +748,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
</tr>
<tr>
<td>placement</td>
- <td>string|function</td>
+ <td>string | function</td>
<td>'top'</td>
<td>how to position the tooltip - top | bottom | left | right</td>
</tr>
@@ -767,8 +767,8 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<tr>
<td>trigger</td>
<td>string</td>
- <td>'hover'</td>
- <td>how tooltip is triggered - click | hover | focus | manual</td>
+ <td>'hover focus'</td>
+ <td>how tooltip is triggered - click | hover | focus | manual. Note you case pass trigger mutliple, space seperated, trigger types.</td>
</tr>
<tr>
<td>delay</td>
@@ -780,6 +780,14 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
</td>
</tr>
+ <tr>
+ <td>container</td>
+ <td>string | false</td>
+ <td>false</td>
+ <td>
+ <p>Appends the tooltip to a specific element <code>container: 'body'</code></p>
+ </td>
+ </tr>
</tbody>
</table>
<div class="alert alert-info">
@@ -788,8 +796,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
</div>
<h3>Markup</h3>
- <p>For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.</p>
- <pre class="prettyprint linenums">&lt;a href="#" rel="tooltip" title="first tooltip"&gt;hover over me&lt;/a&gt;</pre>
+ <pre class="prettyprint linenums">&lt;a href="#" data-toggle="tooltip" title="first tooltip"&gt;hover over me&lt;/a&gt;</pre>
<h3>Methods</h3>
<h4>$().tooltip(options)</h4>
@@ -861,16 +868,16 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<h3>Live demo</h3>
<div class="bs-docs-example" style="padding-bottom: 24px;">
- <a href="#" class="btn btn-large btn-danger" rel="popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">Click to toggle popover</a>
+ <a href="#" class="btn btn-large btn-danger" data-toggle="popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">Click to toggle popover</a>
</div>
<h4>Four directions</h4>
<div class="bs-docs-example tooltip-demo">
<ul class="bs-docs-tooltip-examples">
- <li><a href="#" class="btn" rel="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on top">Popover on top</a></li>
- <li><a href="#" class="btn" rel="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on right">Popover on right</a></li>
- <li><a href="#" class="btn" rel="popover" data-placement="bottom" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on bottom">Popover on bottom</a></li>
- <li><a href="#" class="btn" rel="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on left">Popover on left</a></li>
+ <li><a href="#" class="btn" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on top">Popover on top</a></li>
+ <li><a href="#" class="btn" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on right">Popover on right</a></li>
+ <li><a href="#" class="btn" data-toggle="popover" data-placement="bottom" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on bottom">Popover on bottom</a></li>
+ <li><a href="#" class="btn" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on left">Popover on left</a></li>
</ul>
</div>{{! /example }}
@@ -908,7 +915,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
</tr>
<tr>
<td>placement</td>
- <td>string|function</td>
+ <td>string | function</td>
<td>'right'</td>
<td>how to position the popover - top | bottom | left | right</td>
</tr>
@@ -1354,9 +1361,9 @@ $('#myCollapsible').on('hidden', function () {
<div class="bs-docs-example">
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
- <li class="active"></li>
- <li></li>
- <li></li>
+ <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
+ <li data-target="#myCarousel" data-slide-to="1"></li>
+ <li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
@@ -1391,6 +1398,11 @@ $('#myCollapsible').on('hidden', function () {
</div>{{! /example }}
<pre class="prettyprint linenums">
&lt;div id="myCarousel" class="carousel slide"&gt;
+ &lt;ol class="carousel-indicators"&gt
+ &lt;li data-target="#myCarousel" data-slide-to="0" class="active"&gt&lt;/li&gt
+ &lt;li data-target="#myCarousel" data-slide-to="1"&gt&lt;/li&gt
+ &lt;li data-target="#myCarousel" data-slide-to="2"&gt&lt;/li&gt
+ &lt;/ol&gt
&lt;!-- Carousel items --&gt;
&lt;div class="carousel-inner"&gt;
&lt;div class="active item"&gt;…&lt;/div&gt;
@@ -1415,7 +1427,7 @@ $('#myCollapsible').on('hidden', function () {
<h2>Usage</h2>
<h3>Via data attributes</h3>
- <p>...</p>
+ <p>Use data attributes to easily control the position of the carousel. <code>data-slide</code> accepts the keywords <code>prev</code> or <code>next</code>, which alters the slide position relative to it's current position. Alternatively, use <code>data-slide-to</code> to pass a raw slide index to the carousel <code>data-slide-to="2"</code>, which jump's the slide position to a particular index beginning with <code>0</code>.</p>
<h3>Via JavaScript</h3>
<p>Call carousel manually with:</p>
@@ -1505,7 +1517,7 @@ $('.carousel').carousel({
<input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="4" data-source='["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]'>
</div>{{! /example }}
<pre class="prettyprint linenums">&lt;input type="text" data-provide="typeahead"&gt;</pre>
-
+ <p>You'll want to set <code>autocomplete="off"</code> to prevent default browser menus from appearing over the Bootstrap typeahead dropdown.</p>
<hr class="bs-docs-separator">
diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js
index d9c580e855..fad16def24 100644
--- a/js/bootstrap-carousel.js
+++ b/js/bootstrap-carousel.js
@@ -108,6 +108,7 @@
e = $.Event('slide', {
relatedTarget: $next[0]
+ , direction: direction
})
if ($next.hasClass('active')) return
@@ -187,11 +188,18 @@
/* CAROUSEL DATA-API
* ================= */
- $(document).on('click.carousel.data-api', '[data-slide]', function (e) {
+ $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, options = $.extend({}, $target.data(), $this.data())
+ , slideIndex
+
$target.carousel(options)
+
+ if (slideIndex = $this.attr('data-slide-to')) {
+ $target.data('carousel').pause().to(slideIndex).cycle()
+ }
+
e.preventDefault()
})
diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js
index 48dea44c48..e1d5a856e8 100644
--- a/js/bootstrap-collapse.js
+++ b/js/bootstrap-collapse.js
@@ -129,7 +129,7 @@
return this.each(function () {
var $this = $(this)
, data = $this.data('collapse')
- , options = typeof option == 'object' && option
+ , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js
index 93d645970d..37819e361a 100644
--- a/js/bootstrap-dropdown.js
+++ b/js/bootstrap-dropdown.js
@@ -81,7 +81,10 @@
isActive = $parent.hasClass('open')
- if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
+ if (!isActive || (isActive && e.keyCode == 27)) {
+ if (e.which == 27) $parent.find(toggle).focus()
+ return $this.click()
+ }
$items = $('[role=menu] li:not(.divider):visible a', $parent)
@@ -154,7 +157,7 @@
$(document)
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
- .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+ .on('click.dropdown.data-api touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
diff --git a/js/bootstrap-popover.js b/js/bootstrap-popover.js
index dc639a63e2..4480c6cb67 100644
--- a/js/bootstrap-popover.js
+++ b/js/bootstrap-popover.js
@@ -99,7 +99,7 @@
placement: 'right'
, trigger: 'click'
, content: ''
- , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'
+ , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js
index b61c330067..7e845a513f 100644
--- a/js/bootstrap-scrollspy.js
+++ b/js/bootstrap-scrollspy.js
@@ -59,7 +59,7 @@
, $href = /^#\w/.test(href) && $(href)
return ( $href
&& $href.length
- && [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
+ && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js
index bbb5327767..d57cd9d7f1 100644
--- a/js/bootstrap-tooltip.js
+++ b/js/bootstrap-tooltip.js
@@ -38,19 +38,27 @@
, init: function (type, element, options) {
var eventIn
, eventOut
+ , triggers
+ , trigger
+ , i
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.enabled = true
- if (this.options.trigger == 'click') {
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
- } else if (this.options.trigger != 'manual') {
- eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
- eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ triggers = this.options.trigger.split(' ')
+
+ for (i = triggers.length; i--;) {
+ trigger = triggers[i]
+ if (trigger == 'click') {
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+ } else if (trigger != 'manual') {
+ eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
+ eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ }
}
this.options.selector ?
@@ -102,8 +110,11 @@
, actualHeight
, placement
, tp
+ , e = $.Event('show')
if (this.hasContent() && this.enabled) {
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
$tip = this.tip()
this.setContent()
@@ -118,7 +129,8 @@
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
- .insertAfter(this.$element)
+
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
pos = this.getPosition()
@@ -144,6 +156,8 @@
.offset(tp)
.addClass(placement)
.addClass('in')
+
+ this.$element.trigger('shown')
}
}
@@ -158,6 +172,10 @@
, hide: function () {
var that = this
, $tip = this.tip()
+ , e = $.Event('hide')
+
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
$tip.removeClass('in')
@@ -176,6 +194,8 @@
removeWithAnimation() :
$tip.detach()
+ this.$element.trigger('hidden')
+
return this
}
@@ -234,8 +254,8 @@
}
, toggle: function (e) {
- var self = $(e.currentTarget)[this.type](this._options).data(this.type)
- self[self.tip().hasClass('in') ? 'hide' : 'show']()
+ var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
+ self.tip().hasClass('in') ? self.hide() : self.show()
}
, destroy: function () {
@@ -267,10 +287,11 @@
, placement: 'top'
, selector: false
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
- , trigger: 'hover'
+ , trigger: 'hover focus'
, title: ''
, delay: 0
, html: false
+ , container: false
}
@@ -282,4 +303,4 @@
return this
}
-}(window.jQuery); \ No newline at end of file
+}(window.jQuery);
diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js
index 609be260cc..8624bc7bc0 100644
--- a/js/bootstrap-typeahead.js
+++ b/js/bootstrap-typeahead.js
@@ -271,6 +271,7 @@
e.stopPropagation()
e.preventDefault()
this.select()
+ this.$element.focus()
}
, mouseenter: function (e) {
diff --git a/js/tests/unit/bootstrap-carousel.js b/js/tests/unit/bootstrap-carousel.js
index 13b8f721fc..80b6e139b6 100644
--- a/js/tests/unit/bootstrap-carousel.js
+++ b/js/tests/unit/bootstrap-carousel.js
@@ -31,6 +31,18 @@ $(function () {
.carousel('next')
})
+ test("should fire slide event with direction", function () {
+ var template = '<div id="myCarousel" class="carousel slide"><div class="carousel-inner"><div class="item active"><img alt=""><div class="carousel-caption"><h4>{{_i}}First Thumbnail label{{/i}}</h4><p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p></div></div><div class="item"><img alt=""><div class="carousel-caption"><h4>{{_i}}Second Thumbnail label{{/i}}</h4><p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p></div></div><div class="item"><img alt=""><div class="carousel-caption"><h4>{{_i}}Third Thumbnail label{{/i}}</h4><p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p></div></div></div><a class="left carousel-control" href="#myCarousel" data-slide="prev">&lsaquo;</a><a class="right carousel-control" href="#myCarousel" data-slide="next">&rsaquo;</a></div>'
+ $.support.transition = false
+ stop()
+ $(template).on('slide', function (e) {
+ e.preventDefault()
+ ok(e.direction)
+ ok(e.direction === 'right' || e.direction === 'left')
+ start()
+ }).carousel('next')
+ })
+
test("should fire slide event with relatedTarget", function () {
var template = '<div id="myCarousel" class="carousel slide"><div class="carousel-inner"><div class="item active"><img alt=""><div class="carousel-caption"><h4>{{_i}}First Thumbnail label{{/i}}</h4><p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p></div></div><div class="item"><img alt=""><div class="carousel-caption"><h4>{{_i}}Second Thumbnail label{{/i}}</h4><p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p></div></div><div class="item"><img alt=""><div class="carousel-caption"><h4>{{_i}}Third Thumbnail label{{/i}}</h4><p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p></div></div></div><a class="left carousel-control" href="#myCarousel" data-slide="prev">&lsaquo;</a><a class="right carousel-control" href="#myCarousel" data-slide="next">&rsaquo;</a></div>'
$.support.transition = false
diff --git a/js/tests/unit/bootstrap-tooltip.js b/js/tests/unit/bootstrap-tooltip.js
index ba51347433..ef21bd96b4 100644
--- a/js/tests/unit/bootstrap-tooltip.js
+++ b/js/tests/unit/bootstrap-tooltip.js
@@ -66,6 +66,83 @@ $(function () {
ok(!$(".tooltip").length, 'tooltip removed')
})
+ test("should fire show event", function () {
+ stop()
+ var tooltip = $('<div title="tooltip title"></div>')
+ .bind("show", function() {
+ ok(true, "show was called")
+ start()
+ })
+ .tooltip('show')
+ })
+
+ test("should fire shown event", function () {
+ stop()
+ var tooltip = $('<div title="tooltip title"></div>')
+ .bind("shown", function() {
+ ok(true, "shown was called")
+ start()
+ })
+ .tooltip('show')
+ })
+
+ test("should not fire shown event when default prevented", function () {
+ stop()
+ var tooltip = $('<div title="tooltip title"></div>')
+ .bind("show", function(e) {
+ e.preventDefault()
+ ok(true, "show was called")
+ start()
+ })
+ .bind("shown", function() {
+ ok(false, "shown was called")
+ })
+ .tooltip('show')
+ })
+
+ test("should fire hide event", function () {
+ stop()
+ var tooltip = $('<div title="tooltip title"></div>')
+ .bind("shown", function() {
+ $(this).tooltip('hide')
+ })
+ .bind("hide", function() {
+ ok(true, "hide was called")
+ start()
+ })
+ .tooltip('show')
+ })
+
+ test("should fire hidden event", function () {
+ stop()
+ var tooltip = $('<div title="tooltip title"></div>')
+ .bind("shown", function() {
+ $(this).tooltip('hide')
+ })
+ .bind("hidden", function() {
+ ok(true, "hidden was called")
+ start()
+ })
+ .tooltip('show')
+ })
+
+ test("should not fire hidden event when default prevented", function () {
+ stop()
+ var tooltip = $('<div title="tooltip title"></div>')
+ .bind("shown", function() {
+ $(this).tooltip('hide')
+ })
+ .bind("hide", function(e) {
+ e.preventDefault()
+ ok(true, "hide was called")
+ start()
+ })
+ .bind("hidden", function() {
+ ok(false, "hidden was called")
+ })
+ .tooltip('show')
+ })
+
test("should not show tooltip if leave event occurs before delay expires", function () {
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
.appendTo('#qunit-fixture')
@@ -156,4 +233,22 @@ $(function () {
div.find('a').trigger('click')
ok($(".tooltip").is('.fade.in'), 'tooltip is faded in')
})
-}) \ No newline at end of file
+
+ test("should show tooltip when toggle is called", function () {
+ var tooltip = $('<a href="#" rel="tooltip" title="tooltip on toggle"></a>')
+ .appendTo('#qunit-fixture')
+ .tooltip({trigger: 'manual'})
+ .tooltip('toggle')
+ ok($(".tooltip").is('.fade.in'), 'tooltip should be toggled in')
+ })
+
+ test("should place tooltips inside the body", function () {
+ var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
+ .appendTo('#qunit-fixture')
+ .tooltip({container:'body'})
+ .tooltip('show')
+ ok($("body > .tooltip").length, 'inside the body')
+ ok(!$("#qunit-fixture > .tooltip").length, 'not found in parent')
+ tooltip.tooltip('hide')
+ })
+})
diff --git a/js/tests/unit/bootstrap-typeahead.js b/js/tests/unit/bootstrap-typeahead.js
index 4bdbce9709..0aa2d61b17 100644
--- a/js/tests/unit/bootstrap-typeahead.js
+++ b/js/tests/unit/bootstrap-typeahead.js
@@ -192,17 +192,22 @@ $(function () {
}).appendTo('body')
, typeahead = $input.data('typeahead')
, changed = false
+ , focus = false
+ , blur = false
$input.val('a')
typeahead.lookup()
$input.change(function() { changed = true });
+ $input.focus(function() { focus = true; blur = false });
+ $input.blur(function() { blur = true; focus = false });
$(typeahead.$menu.find('li')[2]).mouseover().click()
equals($input.val(), 'ac', 'input value was correctly set')
ok(!typeahead.$menu.is(':visible'), 'the menu was hidden')
ok(changed, 'a change event was fired')
+ ok(focus && !blur, 'focus is still set')
$input.remove()
typeahead.$menu.remove()
diff --git a/less/buttons.less b/less/buttons.less
index f7b99b1e75..4295d2dcf8 100644
--- a/less/buttons.less
+++ b/less/buttons.less
@@ -125,7 +125,6 @@ input[type="button"] {
border-color: darken(@btn-border, 10%);
}
}
-// Primary appears as blue
.btn-primary {
background-color: @btn-background-primary;
border-color: @btn-border-primary;
diff --git a/less/mixins.less b/less/mixins.less
index 1ab0a4eb23..eeab4bbb0b 100644
--- a/less/mixins.less
+++ b/less/mixins.less
@@ -182,6 +182,12 @@
-o-transition-delay: @transition-delay;
transition-delay: @transition-delay;
}
+.transition-duration(@transition-duration) {
+ -webkit-transition-duration: @transition-duration;
+ -moz-transition-duration: @transition-duration;
+ -o-transition-duration: @transition-duration;
+ transition-duration: @transition-duration;
+}
// Transformations
.rotate(@degrees) {
diff --git a/less/navbar.less b/less/navbar.less
index 2894c92bc8..70f501accb 100644
--- a/less/navbar.less
+++ b/less/navbar.less
@@ -299,8 +299,8 @@
// Caret should match text color on hover
.navbar .nav li.dropdown > a:hover .caret {
- border-top-color: @navbar-link-color-active;
- border-bottom-color: @navbar-link-color-active;
+ border-top-color: @navbar-link-color-hover;
+ border-bottom-color: @navbar-link-color-hover;
}
// Remove background color from open dropdown
diff --git a/less/popovers.less b/less/popovers.less
index 89c1721843..feca92ad3d 100644
--- a/less/popovers.less
+++ b/less/popovers.less
@@ -9,7 +9,7 @@
left: 0;
z-index: @zindex-popover;
display: none;
- width: 236px;
+ max-width: 276px;
padding: 1px;
text-align: left; // Reset given new insertion method
background-color: @popover-background;
@@ -40,6 +40,10 @@
background-color: @popover-title-background;
border-bottom: 1px solid darken(@popover-title-background, 5%);
border-radius: 5px 5px 0 0;
+
+ &:empty {
+ display: none;
+ }
}
.popover-content {
diff --git a/less/responsive-767px-max.less b/less/responsive-767px-max.less
index e690f239db..cf4b49249f 100644
--- a/less/responsive-767px-max.less
+++ b/less/responsive-767px-max.less
@@ -49,7 +49,6 @@
margin-left: 0;
}
-
// FORM FIELDS
// -----------
// Make span* classes full width
diff --git a/less/tables.less b/less/tables.less
index 3fe3d6d969..a524b380f2 100644
--- a/less/tables.less
+++ b/less/tables.less
@@ -92,24 +92,32 @@ table {
tbody:first-child tr:first-child td {
border-top: 0;
}
- // For first th or td in the first row in the first thead or tbody
+ // For first th/td in the first row in the first thead or tbody
thead:first-child tr:first-child > th:first-child,
- tbody:first-child tr:first-child > td:first-child {
+ tbody:first-child tr:first-child > td:first-child,
+ tbody:first-child tr:first-child > th:first-child {
border-top-left-radius: @border-radius-base;
}
+ // For last th/td in the first row in the first thead or tbody
thead:first-child tr:first-child > th:last-child,
- tbody:first-child tr:first-child > td:last-child {
+ tbody:first-child tr:first-child > td:last-child,
+ tbody:first-child tr:first-child > th:last-child {
border-top-right-radius: @border-radius-base;
}
- // For first th or td in the last row in the last thead or tbody
+ // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot
thead:last-child tr:last-child > th:first-child,
tbody:last-child tr:last-child > td:first-child,
- tfoot:last-child tr:last-child > td:first-child {
+ tbody:last-child tr:last-child > th:first-child,
+ tfoot:last-child tr:last-child > td:first-child,
+ tfoot:last-child tr:last-child > th:first-child {
border-bottom-left-radius: @border-radius-base;
}
+ // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot
thead:last-child tr:last-child > th:last-child,
tbody:last-child tr:last-child > td:last-child,
- tfoot:last-child tr:last-child > td:last-child {
+ tbody:last-child tr:last-child > th:last-child,
+ tfoot:last-child tr:last-child > td:last-child,
+ tfoot:last-child tr:last-child > th:last-child {
border-bottom-right-radius: @border-radius-base;
}
@@ -159,8 +167,8 @@ table {
// Placed here since it has to come after the potential zebra striping
.table-hover {
tbody {
- tr:hover td,
- tr:hover th {
+ tr:hover > td,
+ tr:hover > th {
background-color: @table-background-hover;
}
}
@@ -184,32 +192,32 @@ table th[class*="span"] {
// Exact selectors below required to override .table-striped
.table tbody tr {
- &.success td {
+ &.success > td {
background-color: @state-success-background;
}
- &.error td {
+ &.error > td {
background-color: @state-error-background;
}
- &.warning td {
+ &.warning > td {
background-color: @state-warning-background;
}
- &.info td {
+ &.info > td {
background-color: @state-info-background;
}
}
// Hover states for .table-hover
.table-hover tbody tr {
- &.success:hover td {
+ &.success:hover > td {
background-color: darken(@state-success-background, 5%);
}
- &.error:hover td {
+ &.error:hover > td {
background-color: darken(@state-error-background, 5%);
}
- &.warning:hover td {
+ &.warning:hover > td {
background-color: darken(@state-warning-background, 5%);
}
- &.info:hover td {
+ &.info:hover > td {
background-color: darken(@state-info-background, 5%);
}
}
diff --git a/less/tooltip.less b/less/tooltip.less
index cc4dbe61db..65f5c7a820 100644
--- a/less/tooltip.less
+++ b/less/tooltip.less
@@ -11,6 +11,7 @@
visibility: visible;
padding: 5px;
font-size: 11px;
+ line-height: 1.4;
.opacity(0);
&.in { .opacity(100); }
&.top { margin-top: -3px; }
diff --git a/less/type.less b/less/type.less
index a1789fd79f..89e65fff85 100644
--- a/less/type.less
+++ b/less/type.less
@@ -181,7 +181,9 @@ blockquote {
border-left: 5px solid @grayLighter;
p {
margin-bottom: 0;
- #font > .shorthand(16px,300,@line-height-base * 1.25);
+ font-size: @font-size-base * 1.25;
+ font-weight: 300;
+ line-height: 1.25;
}
small {
display: block;