diff --git a/Makefile b/Makefile index 33d48ae2224f2c8f5ca5d6c5548c4fd74b6845b5..620af5259070df18df5b0c3bda6b77a85f1b0e67 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,8 @@ build: @jshint js/*.js --config js/.jshintrc @jshint js/tests/unit/*.js --config js/.jshintrc @echo "Running JSHint on javascript... ${CHECK} Done" - @recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP} - @recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > ${BOOTSTRAP_RESPONSIVE} + @./node_modules/.bin/recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP} + @./node_modules/.bin/recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > ${BOOTSTRAP_RESPONSIVE} @echo "Compiling LESS with Recess... ${CHECK} Done" @node docs/build @cp img/* docs/assets/img/ @@ -27,8 +27,8 @@ build: @cp js/tests/vendor/jquery.js docs/assets/js/ @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 - @uglifyjs docs/assets/js/bootstrap.js -nc > docs/assets/js/bootstrap.min.tmp.js - @echo "/**\n* Bootstrap.js v2.2.2 by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js + @./node_modules/.bin/uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.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" @@ -43,8 +43,8 @@ build: # test: - jshint js/*.js --config js/.jshintrc - jshint js/tests/unit/*.js --config js/.jshintrc + ./node_modules/.bin/jshint js/*.js --config js/.jshintrc + ./node_modules/.bin/jshint js/tests/unit/*.js --config js/.jshintrc node js/tests/server.js & phantomjs js/tests/phantom.js "http://localhost:3000/js/tests" kill -9 `cat js/tests/pid.txt` @@ -62,21 +62,46 @@ clean: # recess & uglifyjs are required # -bootstrap: - mkdir -p bootstrap/img - mkdir -p bootstrap/css +bootstrap: bootstrap-img bootstrap-css bootstrap-js + + +# +# JS COMPILE +# +bootstrap-js: bootstrap/js/*.js + +bootstrap/js/*.js: js/*.js mkdir -p bootstrap/js - cp img/* bootstrap/img/ - recess --compile ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.css - recess --compress ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css - recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css - recess --compress ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.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 - uglifyjs bootstrap/js/bootstrap.js -nc > bootstrap/js/bootstrap.min.tmp.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 cat bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js > bootstrap/js/bootstrap.min.js 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 + +# +# IMAGES +# + +bootstrap-img: bootstrap/img/* + +bootstrap/img/*: img/* + mkdir -p bootstrap/img + cp img/* bootstrap/img/ + + # # MAKE FOR GH-PAGES 4 FAT & MDO ONLY (O_O ) # @@ -98,4 +123,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 \ No newline at end of file diff --git a/README.md b/README.md index 39ccc6987d94f8d50f4e31a45e40eccf14858923..4f74a15f2b330a80cc0664a24850b216279818aa 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,12 @@ -# [Twitter Bootstrap v2.2.2](http://twitter.github.com/bootstrap) [](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 v2.3.0](http://twitter.github.com/bootstrap) [](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/component.json b/component.json index eda7edeef5f8c7d441ef59c37581e303453ea43b..3f1ca0eb163a549bc1015eb6c30e8b3af8135626 100644 --- a/component.json +++ b/component.json @@ -1,6 +1,6 @@ { "name": "bootstrap", - "version": "2.2.2", + "version": "2.3.0", "main": ["./docs/assets/js/bootstrap.js", "./docs/assets/css/bootstrap.css"], "dependencies": { "jquery": "~1.8.0" diff --git a/composer.json b/composer.json index 5ddf13636061bcce801aa2abe37860891c9b186a..abde63128e6f09103539a591d4a6c4d625e75b3a 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,5 @@ , "homepage": "http://twitter.github.com/bootstrap/" , "author": "Twitter Inc." , "license": "Apache-2.0" - , "target-dir": "twitter/bootstrap" } diff --git a/docs/assets/css/bootstrap-responsive.css b/docs/assets/css/bootstrap-responsive.css index a3352d774ce824edd80ef6cc64a39e017263e21d..dee5dc6083068696e5edede7d6c891141d233595 100644 --- a/docs/assets/css/bootstrap-responsive.css +++ b/docs/assets/css/bootstrap-responsive.css @@ -1,5 +1,5 @@ /*! - * Bootstrap Responsive v2.2.2 + * Bootstrap Responsive v2.3.0 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 @@ -8,10 +8,6 @@ * Designed and built with all the love in the world @twitter by @mdo and @fat. */ -@-ms-viewport { - width: device-width; -} - .clearfix { *zoom: 1; } @@ -44,6 +40,10 @@ box-sizing: border-box; } +@-ms-viewport { + width: device-width; +} + .hidden { display: none; visibility: hidden; diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 8ab3cefcf71da9e4ba7e40edea3eff786a06cc31..71c42f3196c809efd2939613ff4aa82f4bac818d 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -1,5 +1,5 @@ /*! - * Bootstrap v2.2.2 + * Bootstrap v2.3.0 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 @@ -8,6 +8,38 @@ * Designed and built with all the love in the world @twitter by @mdo and @fat. */ +.clearfix { + *zoom: 1; +} + +.clearfix:before, +.clearfix:after { + display: table; + line-height: 0; + content: ""; +} + +.clearfix:after { + clear: both; +} + +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + article, aside, details, @@ -189,38 +221,6 @@ textarea { } } -.clearfix { - *zoom: 1; -} - -.clearfix:before, -.clearfix:after { - display: table; - line-height: 0; - content: ""; -} - -.clearfix:after { - clear: both; -} - -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - body { margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; @@ -714,6 +714,18 @@ a.text-success:hover { color: #356635; } +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.text-center { + text-align: center; +} + h1, h2, h3, @@ -899,9 +911,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 { @@ -1646,9 +1658,11 @@ select:focus:invalid:focus { .input-append, .input-prepend { - margin-bottom: 5px; + display: inline-block; + margin-bottom: 10px; font-size: 0; white-space: nowrap; + vertical-align: middle; } .input-append input, @@ -1658,7 +1672,9 @@ select:focus:invalid:focus { .input-append .uneditable-input, .input-prepend .uneditable-input, .input-append .dropdown-menu, -.input-prepend .dropdown-menu { +.input-prepend .dropdown-menu, +.input-append .popover, +.input-prepend .popover { font-size: 14px; } @@ -2049,14 +2065,16 @@ 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 { -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topleft: 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 { -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-topright: 4px; @@ -2064,7 +2082,9 @@ table { .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 { -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomleft: 4px; @@ -2072,7 +2092,9 @@ table { .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 { -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; -moz-border-radius-bottomright: 4px; @@ -2113,8 +2135,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; } @@ -2211,35 +2233,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; } @@ -2909,7 +2931,7 @@ table th[class*="span"], border-bottom: 1px solid #ffffff; } -.dropdown-menu li > a { +.dropdown-menu > li > a { display: block; padding: 3px 20px; clear: both; @@ -2919,8 +2941,8 @@ table th[class*="span"], white-space: nowrap; } -.dropdown-menu li > a:hover, -.dropdown-menu li > a:focus, +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, .dropdown-submenu:hover > a { color: #ffffff; text-decoration: none; @@ -2934,8 +2956,8 @@ table th[class*="span"], filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); } -.dropdown-menu .active > a, -.dropdown-menu .active > a:hover { +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover { color: #ffffff; text-decoration: none; background-color: #0081c2; @@ -2949,12 +2971,12 @@ table th[class*="span"], filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); } -.dropdown-menu .disabled > a, -.dropdown-menu .disabled > a:hover { +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover { color: #999999; } -.dropdown-menu .disabled > a:hover { +.dropdown-menu > .disabled > a:hover { text-decoration: none; cursor: default; background-color: transparent; @@ -3167,11 +3189,11 @@ button.close { background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); background-repeat: repeat-x; - border: 1px solid #bbbbbb; + border: 1px solid #cccccc; *border: 0; border-color: #e6e6e6 #e6e6e6 #bfbfbf; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - border-bottom-color: #a2a2a2; + border-bottom-color: #b3b3b3; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; @@ -3306,11 +3328,6 @@ input[type="button"].btn-block { color: rgba(255, 255, 255, 0.75); } -.btn { - border-color: #c5c5c5; - border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); -} - .btn-primary { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); @@ -3744,8 +3761,6 @@ input[type="submit"].btn.btn-mini { margin-left: 0; } -.btn-mini .caret, -.btn-small .caret, .btn-large .caret { margin-top: 6px; } @@ -3756,6 +3771,11 @@ input[type="submit"].btn.btn-mini { border-left-width: 5px; } +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} + .dropup .btn-large .caret { border-bottom-width: 5px; } @@ -4379,7 +4399,9 @@ input[type="submit"].btn.btn-mini { .navbar .btn-group .btn, .navbar .input-prepend .btn, -.navbar .input-append .btn { +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { margin-top: 0; } @@ -4657,8 +4679,8 @@ input[type="submit"].btn.btn-mini { } .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, @@ -5211,6 +5233,7 @@ input[type="submit"].btn.btn-mini { display: block; padding: 5px; font-size: 11px; + line-height: 1.4; opacity: 0; filter: alpha(opacity=0); visibility: visible; @@ -5239,7 +5262,7 @@ input[type="submit"].btn.btn-mini { .tooltip-inner { max-width: 200px; - padding: 3px 8px; + padding: 8px; color: #ffffff; text-align: center; text-decoration: none; @@ -5295,7 +5318,7 @@ input[type="submit"].btn.btn-mini { left: 0; z-index: 1010; display: none; - width: 236px; + max-width: 276px; padding: 1px; text-align: left; white-space: normal; @@ -5342,6 +5365,10 @@ input[type="submit"].btn.btn-mini { border-radius: 5px 5px 0 0; } +.popover-title:empty { + display: none; +} + .popover-content { padding: 9px 14px; } @@ -5516,11 +5543,11 @@ a.thumbnail:hover { margin: 0 0 5px; } -.media .pull-left { +.media > .pull-left { margin-right: 10px; } -.media .pull-right { +.media > .pull-right { margin-left: 10px; } @@ -5965,6 +5992,31 @@ a.badge:hover { filter: alpha(opacity=90); } +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; +} + +.carousel-indicators li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255, 255, 255, 0.25); + border-radius: 5px; +} + +.carousel-indicators .active { + background-color: #fff; +} + .carousel-caption { position: absolute; right: 0; diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index c7bddd45af9bfd4616f4666837f3552ec2000242..1142414040c0bac0f22d2e137de045f7ff6b5a11 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -552,6 +552,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 index d62bc3976bc8c0a33aa74cd541113beefb9650cc..36603bd3b44e65f713884bfb74741e554c71e238 100644 Binary files a/docs/assets/img/bootstrap-docs-readme.png and b/docs/assets/img/bootstrap-docs-readme.png differ diff --git a/docs/assets/img/examples/bootstrap-example-carousel.png b/docs/assets/img/examples/bootstrap-example-carousel.png index a2f668abe156b711c229cdc5526a3d2f1ab61c90..725fe07b9e7ba77bc9b648c2f28a218e2815bd13 100644 Binary files a/docs/assets/img/examples/bootstrap-example-carousel.png and b/docs/assets/img/examples/bootstrap-example-carousel.png 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 d616ba001befe567b9c8387276e9cfb4c4343043..0000000000000000000000000000000000000000 Binary files a/docs/assets/img/examples/bootstrap-example-fluid.jpg and /dev/null 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 0000000000000000000000000000000000000000..5f49a332f332252ed8135536ccfe256d397d5fd3 Binary files /dev/null and b/docs/assets/img/examples/bootstrap-example-fluid.png 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 a9662d2b4bf8895d248acfc27c0ce5733ac74108..0000000000000000000000000000000000000000 Binary files a/docs/assets/img/examples/bootstrap-example-hero.jpg and /dev/null 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 0000000000000000000000000000000000000000..3d1e233891ec79b11bd4d0977c96f3cb6de20e0d Binary files /dev/null and b/docs/assets/img/examples/bootstrap-example-justified-nav.png differ diff --git a/docs/assets/img/examples/bootstrap-example-marketing-narrow.png b/docs/assets/img/examples/bootstrap-example-marketing-narrow.png index a7ac9ef98b8a951d041443b13df01806d31dc7bf..4bca8cdafd36545ebbbc0b6264995592f42023fb 100644 Binary files a/docs/assets/img/examples/bootstrap-example-marketing-narrow.png and b/docs/assets/img/examples/bootstrap-example-marketing-narrow.png 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 0000000000000000000000000000000000000000..206e26e342488126aab5bdac12e6c4d01dd2a643 Binary files /dev/null and b/docs/assets/img/examples/bootstrap-example-marketing.png differ diff --git a/docs/assets/img/examples/bootstrap-example-signin.png b/docs/assets/img/examples/bootstrap-example-signin.png index 39210096b4024ce8f453c6cb6831c535840e1e4c..b649a985dcdc95fe1e98de0604e28461eb30067f 100644 Binary files a/docs/assets/img/examples/bootstrap-example-signin.png and b/docs/assets/img/examples/bootstrap-example-signin.png 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 3b1cbf9e78f1015f3a71feabb217fb83f1fa6102..0000000000000000000000000000000000000000 Binary files a/docs/assets/img/examples/bootstrap-example-starter.jpg and /dev/null 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 0000000000000000000000000000000000000000..1bf4b85ecef67d3b7416aea639fd15200a97ce76 Binary files /dev/null and b/docs/assets/img/examples/bootstrap-example-starter.png differ diff --git a/docs/assets/img/examples/bootstrap-example-sticky-footer.png b/docs/assets/img/examples/bootstrap-example-sticky-footer.png index c2255044df48041cfec7c58811aee00e7c355a06..fb80e7b92f9d66eb27d41f9926b632dea4f2ca12 100644 Binary files a/docs/assets/img/examples/bootstrap-example-sticky-footer.png and b/docs/assets/img/examples/bootstrap-example-sticky-footer.png differ diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js index f6c7849c3a8b2afb1c2e9df8e0831241e99f9028..cc442ade4fd88003a60797f6b1471c921c00770d 100644 --- a/docs/assets/js/application.js +++ b/docs/assets/js/application.js @@ -14,12 +14,14 @@ }) // side bar - $('.bs-docs-sidenav').affix({ - offset: { - top: function () { return $window.width() <= 980 ? 290 : 210 } - , bottom: 270 - } - }) + setTimeout(function () { + $('.bs-docs-sidenav').affix({ + offset: { + top: function () { return $window.width() <= 980 ? 290 : 210 } + , bottom: 270 + } + }) + }, 100) // make code pretty window.prettyPrint && prettyPrint() @@ -34,21 +36,21 @@ // add tipsies to grid for scaffolding if ($('#gridSystem').length) { $('#gridSystem').tooltip({ - selector: '.show-grid > div' + selector: '.show-grid > div:not(.tooltip)' , title: function () { return $(this).width() + 'px' } }) } // 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() @@ -151,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-affix.js b/docs/assets/js/bootstrap-affix.js index 6020a19a58ef354f50b374a6732792fa6643c633..7595fdb06771c324e1c3e0a166fdeafa1933e0f5 100644 --- a/docs/assets/js/bootstrap-affix.js +++ b/docs/assets/js/bootstrap-affix.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-affix.js v2.2.2 + * bootstrap-affix.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#affix * ========================================================== * Copyright 2012 Twitter, Inc. diff --git a/docs/assets/js/bootstrap-alert.js b/docs/assets/js/bootstrap-alert.js index 5bc02644910f5ecca11574d4fe270822b77bdd59..b5627984e4ca3b49ae63943aa9f0204c266c65af 100644 --- a/docs/assets/js/bootstrap-alert.js +++ b/docs/assets/js/bootstrap-alert.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-alert.js v2.2.2 + * bootstrap-alert.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#alerts * ========================================================== * Copyright 2012 Twitter, Inc. diff --git a/docs/assets/js/bootstrap-button.js b/docs/assets/js/bootstrap-button.js index 39b83399e9796e6751aa2331b54fd42dfe4a9b30..045927b6ba732ada14dbf5c0ec296623b37a5121 100644 --- a/docs/assets/js/bootstrap-button.js +++ b/docs/assets/js/bootstrap-button.js @@ -1,5 +1,5 @@ /* ============================================================ - * bootstrap-button.js v2.2.2 + * bootstrap-button.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#buttons * ============================================================ * Copyright 2012 Twitter, Inc. diff --git a/docs/assets/js/bootstrap-carousel.js b/docs/assets/js/bootstrap-carousel.js index 238ff42801847d96ba51767e6161094d91f7cab5..5d14e7c7115e5d1ecb6dccb6ac827427ab62ed4d 100644 --- a/docs/assets/js/bootstrap-carousel.js +++ b/docs/assets/js/bootstrap-carousel.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-carousel.js v2.2.2 + * bootstrap-carousel.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#carousel * ========================================================== * Copyright 2012 Twitter, Inc. @@ -28,6 +28,7 @@ var Carousel = function (element, options) { this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') this.options = options this.options.pause == 'hover' && this.$element .on('mouseenter', $.proxy(this.pause, this)) @@ -44,13 +45,17 @@ return this } + , getActiveIndex: function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + return this.$items.index(this.$active) + } + , to: function (pos) { - var $active = this.$element.find('.item.active') - , children = $active.parent().children() - , activePos = children.index($active) + var activeIndex = this.getActiveIndex() , that = this - if (pos > (children.length - 1) || pos < 0) return + if (pos > (this.$items.length - 1) || pos < 0) return if (this.sliding) { return this.$element.one('slid', function () { @@ -58,11 +63,11 @@ }) } - if (activePos == pos) { + if (activeIndex == pos) { return this.pause().cycle() } - return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) } , pause: function (e) { @@ -103,10 +108,19 @@ e = $.Event('slide', { relatedTarget: $next[0] + , direction: direction }) if ($next.hasClass('active')) return + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) + } + if ($.support.transition && this.$element.hasClass('slide')) { this.$element.trigger(e) if (e.isDefaultPrevented()) return @@ -151,7 +165,7 @@ if (!data) $this.data('carousel', (data = new Carousel(this, options))) if (typeof option == 'number') data.to(option) else if (action) data[action]() - else if (options.interval) data.cycle() + else if (options.interval) data.pause().cycle() }) } @@ -174,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 6ac0191a50a6664b54d69188fc0808daaaea1ddf..20b2eb90a82825607de71294a1b763a7b9633e8b 100644 --- a/docs/assets/js/bootstrap-collapse.js +++ b/docs/assets/js/bootstrap-collapse.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-collapse.js v2.2.2 + * bootstrap-collapse.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#collapse * ============================================================= * Copyright 2012 Twitter, Inc. @@ -52,7 +52,7 @@ , actives , hasData - if (this.transitioning) return + if (this.transitioning || this.$element.hasClass('in')) return dimension = this.dimension() scroll = $.camelCase(['scroll', dimension].join('-')) @@ -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 900355d5bd11b9a04cec5871fd6b0fbd59fff047..b8c5852830f33e9bbe23fdf259829faf8035d7a9 100644 --- a/docs/assets/js/bootstrap-dropdown.js +++ b/docs/assets/js/bootstrap-dropdown.js @@ -1,5 +1,5 @@ /* ============================================================ - * bootstrap-dropdown.js v2.2.2 + * bootstrap-dropdown.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#dropdowns * ============================================================ * Copyright 2012 Twitter, Inc. @@ -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) @@ -115,8 +118,9 @@ selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } - $parent = $(selector) - $parent.length || ($parent = $this.parent()) + $parent = selector && $(selector) + + if (!$parent || !$parent.length) $parent = $this.parent() return $parent } @@ -153,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-modal.js b/docs/assets/js/bootstrap-modal.js index 689a414ed6079afa839e8c96c937480c23dddb51..3596c8d4c2b94ece5dd7827b7a7e59fe5d48b377 100644 --- a/docs/assets/js/bootstrap-modal.js +++ b/docs/assets/js/bootstrap-modal.js @@ -1,5 +1,5 @@ /* ========================================================= - * bootstrap-modal.js v2.2.2 + * bootstrap-modal.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#modals * ========================================================= * Copyright 2012 Twitter, Inc. @@ -60,8 +60,7 @@ that.$element.appendTo(document.body) //don't move modals dom position } - that.$element - .show() + that.$element.show() if (transition) { that.$element[0].offsetWidth // force reflow diff --git a/docs/assets/js/bootstrap-popover.js b/docs/assets/js/bootstrap-popover.js index 1a4f532aa8ce69291feb703117fa3cffe7ec5ca9..624eb5e31a97dcf361763a1bd0f0aa465da67735 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 07a5c3a5842a30cc41e05da8e99c835152c03063..dff9a3b37518c2ccf6f0fbe23b327860cb6fee08 100644 --- a/docs/assets/js/bootstrap-scrollspy.js +++ b/docs/assets/js/bootstrap-scrollspy.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-scrollspy.js v2.2.2 + * bootstrap-scrollspy.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#scrollspy * ============================================================= * Copyright 2012 Twitter, Inc. @@ -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-tab.js b/docs/assets/js/bootstrap-tab.js index 84d4834a23b6412e303c6d60d2ed8e81e37b9a79..bd77eb5c358074801f20de0f46b1e2e9d1b1247b 100644 --- a/docs/assets/js/bootstrap-tab.js +++ b/docs/assets/js/bootstrap-tab.js @@ -1,5 +1,5 @@ /* ======================================================== - * bootstrap-tab.js v2.2.2 + * bootstrap-tab.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#tabs * ======================================================== * Copyright 2012 Twitter, Inc. diff --git a/docs/assets/js/bootstrap-tooltip.js b/docs/assets/js/bootstrap-tooltip.js index a08952a4cfdc03a5907f2a4b5b7f77ddccb13581..c23d8267a8e7962bf0f4e0808646e6c2e3b3eaf7 100644 --- a/docs/assets/js/bootstrap-tooltip.js +++ b/docs/assets/js/bootstrap-tooltip.js @@ -1,5 +1,5 @@ /* =========================================================== - * bootstrap-tooltip.js v2.2.2 + * bootstrap-tooltip.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#tooltips * Inspired by the original jQuery.tipsy by Jason Frame * =========================================================== @@ -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 ? @@ -97,14 +105,16 @@ , show: function () { var $tip - , inside , pos , actualWidth , actualHeight , placement , tp + , e = $.Event('show') if (this.hasContent() && this.enabled) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return $tip = this.tip() this.setContent() @@ -116,19 +126,18 @@ this.options.placement.call(this, $tip[0], this.$element[0]) : this.options.placement - inside = /in/.test(placement) - $tip .detach() .css({ top: 0, left: 0, display: 'block' }) - .insertAfter(this.$element) - pos = this.getPosition(inside) + this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) + + pos = this.getPosition() actualWidth = $tip[0].offsetWidth actualHeight = $tip[0].offsetHeight - switch (inside ? placement.split(' ')[1] : placement) { + switch (placement) { case 'bottom': tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} break @@ -147,6 +156,8 @@ .offset(tp) .addClass(placement) .addClass('in') + + this.$element.trigger('shown') } } @@ -161,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') @@ -179,6 +194,8 @@ removeWithAnimation() : $tip.detach() + this.$element.trigger('hidden') + return this } @@ -193,11 +210,12 @@ return this.getTitle() } - , getPosition: function (inside) { - return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { - width: this.$element[0].offsetWidth - , height: this.$element[0].offsetHeight - }) + , getPosition: function () { + var el = this.$element[0] + return $.extend({}, el.getBoundingClientRect ? el.getBoundingClientRect() : { + width: el.offsetWidth + , height: el.offsetHeight + }, this.$element.offset()) } , getTitle: function () { @@ -236,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 () { @@ -269,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 } @@ -284,4 +303,4 @@ return this } -}(window.jQuery); \ No newline at end of file +}(window.jQuery); diff --git a/docs/assets/js/bootstrap-transition.js b/docs/assets/js/bootstrap-transition.js index b0f12c26d328df0f38780ef197c6e8d337624e34..64f275778094043dc871f94ceacadbe7f74f9734 100644 --- a/docs/assets/js/bootstrap-transition.js +++ b/docs/assets/js/bootstrap-transition.js @@ -1,5 +1,5 @@ /* =================================================== - * bootstrap-transition.js v2.2.2 + * bootstrap-transition.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#transitions * =================================================== * Copyright 2012 Twitter, Inc. diff --git a/docs/assets/js/bootstrap-typeahead.js b/docs/assets/js/bootstrap-typeahead.js index 088e7ce9b90fb5ebf824acbf65e095e6c65f4bc6..5d95fd625657a53108710f171dae71aad18c28ba 100644 --- a/docs/assets/js/bootstrap-typeahead.js +++ b/docs/assets/js/bootstrap-typeahead.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-typeahead.js v2.2.2 + * bootstrap-typeahead.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#typeahead * ============================================================= * Copyright 2012 Twitter, Inc. @@ -172,6 +172,7 @@ , listen: function () { this.$element + .on('focus', $.proxy(this.focus, this)) .on('blur', $.proxy(this.blur, this)) .on('keypress', $.proxy(this.keypress, this)) .on('keyup', $.proxy(this.keyup, this)) @@ -183,6 +184,7 @@ this.$menu .on('click', $.proxy(this.click, this)) .on('mouseenter', 'li', $.proxy(this.mouseenter, this)) + .on('mouseleave', 'li', $.proxy(this.mouseleave, this)) } , eventSupported: function(eventName) { @@ -256,22 +258,33 @@ e.preventDefault() } + , focus: function (e) { + this.focused = true + } + , blur: function (e) { - var that = this - setTimeout(function () { that.hide() }, 150) + this.focused = false + if (!this.mousedover && this.shown) this.hide() } , click: function (e) { e.stopPropagation() e.preventDefault() this.select() + this.$element.focus() } , mouseenter: function (e) { + this.mousedover = true this.$menu.find('.active').removeClass('active') $(e.currentTarget).addClass('active') } + , mouseleave: function (e) { + this.mousedover = false + if (!this.focused && this.shown) this.hide() + } + } diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index 6c15a58329649be983d91790dd969df882d90708..bd123341de71efc8da295e7a5c6adb3fbad65b2e 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -1,5 +1,5 @@ /* =================================================== - * bootstrap-transition.js v2.2.2 + * bootstrap-transition.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#transitions * =================================================== * Copyright 2012 Twitter, Inc. @@ -58,7 +58,7 @@ }) }(window.jQuery);/* ========================================================== - * bootstrap-alert.js v2.2.2 + * bootstrap-alert.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#alerts * ========================================================== * Copyright 2012 Twitter, Inc. @@ -156,7 +156,7 @@ $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) }(window.jQuery);/* ============================================================ - * bootstrap-button.js v2.2.2 + * bootstrap-button.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#buttons * ============================================================ * Copyright 2012 Twitter, Inc. @@ -260,7 +260,7 @@ }) }(window.jQuery);/* ========================================================== - * bootstrap-carousel.js v2.2.2 + * bootstrap-carousel.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#carousel * ========================================================== * Copyright 2012 Twitter, Inc. @@ -289,6 +289,7 @@ var Carousel = function (element, options) { this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') this.options = options this.options.pause == 'hover' && this.$element .on('mouseenter', $.proxy(this.pause, this)) @@ -305,13 +306,17 @@ return this } + , getActiveIndex: function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + return this.$items.index(this.$active) + } + , to: function (pos) { - var $active = this.$element.find('.item.active') - , children = $active.parent().children() - , activePos = children.index($active) + var activeIndex = this.getActiveIndex() , that = this - if (pos > (children.length - 1) || pos < 0) return + if (pos > (this.$items.length - 1) || pos < 0) return if (this.sliding) { return this.$element.one('slid', function () { @@ -319,11 +324,11 @@ }) } - if (activePos == pos) { + if (activeIndex == pos) { return this.pause().cycle() } - return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) } , pause: function (e) { @@ -364,10 +369,19 @@ e = $.Event('slide', { relatedTarget: $next[0] + , direction: direction }) if ($next.hasClass('active')) return + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) + } + if ($.support.transition && this.$element.hasClass('slide')) { this.$element.trigger(e) if (e.isDefaultPrevented()) return @@ -412,7 +426,7 @@ if (!data) $this.data('carousel', (data = new Carousel(this, options))) if (typeof option == 'number') data.to(option) else if (action) data[action]() - else if (options.interval) data.cycle() + else if (options.interval) data.pause().cycle() }) } @@ -435,16 +449,23 @@ /* 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() }) }(window.jQuery);/* ============================================================= - * bootstrap-collapse.js v2.2.2 + * bootstrap-collapse.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#collapse * ============================================================= * Copyright 2012 Twitter, Inc. @@ -497,7 +518,7 @@ , actives , hasData - if (this.transitioning) return + if (this.transitioning || this.$element.hasClass('in')) return dimension = this.dimension() scroll = $.camelCase(['scroll', dimension].join('-')) @@ -574,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]() }) @@ -610,7 +631,7 @@ }) }(window.jQuery);/* ============================================================ - * bootstrap-dropdown.js v2.2.2 + * bootstrap-dropdown.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#dropdowns * ============================================================ * Copyright 2012 Twitter, Inc. @@ -692,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) @@ -726,8 +750,9 @@ selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } - $parent = $(selector) - $parent.length || ($parent = $this.parent()) + $parent = selector && $(selector) + + if (!$parent || !$parent.length) $parent = $this.parent() return $parent } @@ -764,13 +789,13 @@ $(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) }(window.jQuery);/* ========================================================= - * bootstrap-modal.js v2.2.2 + * bootstrap-modal.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#modals * ========================================================= * Copyright 2012 Twitter, Inc. @@ -831,8 +856,7 @@ that.$element.appendTo(document.body) //don't move modals dom position } - that.$element - .show() + that.$element.show() if (transition) { that.$element[0].offsetWidth // force reflow @@ -1015,7 +1039,7 @@ }(window.jQuery); /* =========================================================== - * bootstrap-tooltip.js v2.2.2 + * bootstrap-tooltip.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#tooltips * Inspired by the original jQuery.tipsy by Jason Frame * =========================================================== @@ -1054,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 ? @@ -1113,14 +1145,16 @@ , show: function () { var $tip - , inside , pos , actualWidth , actualHeight , placement , tp + , e = $.Event('show') if (this.hasContent() && this.enabled) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return $tip = this.tip() this.setContent() @@ -1132,19 +1166,18 @@ this.options.placement.call(this, $tip[0], this.$element[0]) : this.options.placement - inside = /in/.test(placement) - $tip .detach() .css({ top: 0, left: 0, display: 'block' }) - .insertAfter(this.$element) - pos = this.getPosition(inside) + this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) + + pos = this.getPosition() actualWidth = $tip[0].offsetWidth actualHeight = $tip[0].offsetHeight - switch (inside ? placement.split(' ')[1] : placement) { + switch (placement) { case 'bottom': tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} break @@ -1163,6 +1196,8 @@ .offset(tp) .addClass(placement) .addClass('in') + + this.$element.trigger('shown') } } @@ -1177,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') @@ -1195,6 +1234,8 @@ removeWithAnimation() : $tip.detach() + this.$element.trigger('hidden') + return this } @@ -1209,11 +1250,12 @@ return this.getTitle() } - , getPosition: function (inside) { - return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { - width: this.$element[0].offsetWidth - , height: this.$element[0].offsetHeight - }) + , getPosition: function () { + var el = this.$element[0] + return $.extend({}, el.getBoundingClientRect ? el.getBoundingClientRect() : { + width: el.offsetWidth + , height: el.offsetHeight + }, this.$element.offset()) } , getTitle: function () { @@ -1252,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 () { @@ -1285,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 } @@ -1300,7 +1343,8 @@ return this } -}(window.jQuery);/* =========================================================== +}(window.jQuery); +/* =========================================================== * bootstrap-popover.js v2.2.2 * http://twitter.github.com/bootstrap/javascript.html#popovers * =========================================================== @@ -1401,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>' }) @@ -1414,7 +1458,7 @@ } }(window.jQuery);/* ============================================================= - * bootstrap-scrollspy.js v2.2.2 + * bootstrap-scrollspy.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#scrollspy * ============================================================= * Copyright 2012 Twitter, Inc. @@ -1474,7 +1518,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 () { @@ -1575,7 +1619,7 @@ }) }(window.jQuery);/* ======================================================== - * bootstrap-tab.js v2.2.2 + * bootstrap-tab.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#tabs * ======================================================== * Copyright 2012 Twitter, Inc. @@ -1718,7 +1762,7 @@ }) }(window.jQuery);/* ============================================================= - * bootstrap-typeahead.js v2.2.2 + * bootstrap-typeahead.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#typeahead * ============================================================= * Copyright 2012 Twitter, Inc. @@ -1891,6 +1935,7 @@ , listen: function () { this.$element + .on('focus', $.proxy(this.focus, this)) .on('blur', $.proxy(this.blur, this)) .on('keypress', $.proxy(this.keypress, this)) .on('keyup', $.proxy(this.keyup, this)) @@ -1902,6 +1947,7 @@ this.$menu .on('click', $.proxy(this.click, this)) .on('mouseenter', 'li', $.proxy(this.mouseenter, this)) + .on('mouseleave', 'li', $.proxy(this.mouseleave, this)) } , eventSupported: function(eventName) { @@ -1975,22 +2021,33 @@ e.preventDefault() } + , focus: function (e) { + this.focused = true + } + , blur: function (e) { - var that = this - setTimeout(function () { that.hide() }, 150) + this.focused = false + if (!this.mousedover && this.shown) this.hide() } , click: function (e) { e.stopPropagation() e.preventDefault() this.select() + this.$element.focus() } , mouseenter: function (e) { + this.mousedover = true this.$menu.find('.active').removeClass('active') $(e.currentTarget).addClass('active') } + , mouseleave: function (e) { + this.mousedover = false + if (!this.focused && this.shown) this.hide() + } + } @@ -2041,7 +2098,7 @@ }(window.jQuery); /* ========================================================== - * bootstrap-affix.js v2.2.2 + * bootstrap-affix.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#affix * ========================================================== * Copyright 2012 Twitter, Inc. diff --git a/docs/assets/js/bootstrap.min.js b/docs/assets/js/bootstrap.min.js index 4abe532c86cbb0581fce92786e98ea21c36901c0..6ae2fbe4de2b074fc3c5341daf6410e3b4868137 100644 --- a/docs/assets/js/bootstrap.min.js +++ b/docs/assets/js/bootstrap.min.js @@ -1,6 +1,6 @@ /** -* Bootstrap.js v2.2.2 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($){"use strict";$(function(){$.support.transition=function(){var transitionEnd=function(){var name,el=document.createElement("bootstrap"),transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(name in transEndEventNames)if(void 0!==el.style[name])return transEndEventNames[name]}();return transitionEnd&&{end:transitionEnd}}()})}(window.jQuery),!function($){"use strict";var dismiss='[data-dismiss="alert"]',Alert=function(el){$(el).on("click",dismiss,this.close)};Alert.prototype.close=function(e){function removeElement(){$parent.trigger("closed").remove()}var $parent,$this=$(this),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),$parent=$(selector),e&&e.preventDefault(),$parent.length||($parent=$this.hasClass("alert")?$this:$this.parent()),$parent.trigger(e=$.Event("close")),e.isDefaultPrevented()||($parent.removeClass("in"),$.support.transition&&$parent.hasClass("fade")?$parent.on($.support.transition.end,removeElement):removeElement())};var old=$.fn.alert;$.fn.alert=function(option){return this.each(function(){var $this=$(this),data=$this.data("alert");data||$this.data("alert",data=new Alert(this)),"string"==typeof option&&data[option].call($this)})},$.fn.alert.Constructor=Alert,$.fn.alert.noConflict=function(){return $.fn.alert=old,this},$(document).on("click.alert.data-api",dismiss,Alert.prototype.close)}(window.jQuery),!function($){"use strict";var Button=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.button.defaults,options)};Button.prototype.setState=function(state){var d="disabled",$el=this.$element,data=$el.data(),val=$el.is("input")?"val":"html";state+="Text",data.resetText||$el.data("resetText",$el[val]()),$el[val](data[state]||this.options[state]),setTimeout(function(){"loadingText"==state?$el.addClass(d).attr(d,d):$el.removeClass(d).removeAttr(d)},0)},Button.prototype.toggle=function(){var $parent=this.$element.closest('[data-toggle="buttons-radio"]');$parent&&$parent.find(".active").removeClass("active"),this.$element.toggleClass("active")};var old=$.fn.button;$.fn.button=function(option){return this.each(function(){var $this=$(this),data=$this.data("button"),options="object"==typeof option&&option;data||$this.data("button",data=new Button(this,options)),"toggle"==option?data.toggle():option&&data.setState(option)})},$.fn.button.defaults={loadingText:"loading..."},$.fn.button.Constructor=Button,$.fn.button.noConflict=function(){return $.fn.button=old,this},$(document).on("click.button.data-api","[data-toggle^=button]",function(e){var $btn=$(e.target);$btn.hasClass("btn")||($btn=$btn.closest(".btn")),$btn.button("toggle")})}(window.jQuery),!function($){"use strict";var Carousel=function(element,options){this.$element=$(element),this.options=options,"hover"==this.options.pause&&this.$element.on("mouseenter",$.proxy(this.pause,this)).on("mouseleave",$.proxy(this.cycle,this))};Carousel.prototype={cycle:function(e){return e||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)),this},to:function(pos){var $active=this.$element.find(".item.active"),children=$active.parent().children(),activePos=children.index($active),that=this;if(!(pos>children.length-1||0>pos))return this.sliding?this.$element.one("slid",function(){that.to(pos)}):activePos==pos?this.pause().cycle():this.slide(pos>activePos?"next":"prev",$(children[pos]))},pause:function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&$.support.transition.end&&(this.$element.trigger($.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(type,next){var e,$active=this.$element.find(".item.active"),$next=next||$active[type](),isCycling=this.interval,direction="next"==type?"left":"right",fallback="next"==type?"first":"last",that=this;if(this.sliding=!0,isCycling&&this.pause(),$next=$next.length?$next:this.$element.find(".item")[fallback](),e=$.Event("slide",{relatedTarget:$next[0]}),!$next.hasClass("active")){if($.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(e),e.isDefaultPrevented())return;$next.addClass(type),$next[0].offsetWidth,$active.addClass(direction),$next.addClass(direction),this.$element.one($.support.transition.end,function(){$next.removeClass([type,direction].join(" ")).addClass("active"),$active.removeClass(["active",direction].join(" ")),that.sliding=!1,setTimeout(function(){that.$element.trigger("slid")},0)})}else{if(this.$element.trigger(e),e.isDefaultPrevented())return;$active.removeClass("active"),$next.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return isCycling&&this.cycle(),this}}};var old=$.fn.carousel;$.fn.carousel=function(option){return this.each(function(){var $this=$(this),data=$this.data("carousel"),options=$.extend({},$.fn.carousel.defaults,"object"==typeof option&&option),action="string"==typeof option?option:options.slide;data||$this.data("carousel",data=new Carousel(this,options)),"number"==typeof option?data.to(option):action?data[action]():options.interval&&data.cycle()})},$.fn.carousel.defaults={interval:5e3,pause:"hover"},$.fn.carousel.Constructor=Carousel,$.fn.carousel.noConflict=function(){return $.fn.carousel=old,this},$(document).on("click.carousel.data-api","[data-slide]",function(e){var href,$this=$(this),$target=$($this.attr("data-target")||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,"")),options=$.extend({},$target.data(),$this.data());$target.carousel(options),e.preventDefault()})}(window.jQuery),!function($){"use strict";var Collapse=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.collapse.defaults,options),this.options.parent&&(this.$parent=$(this.options.parent)),this.options.toggle&&this.toggle()};Collapse.prototype={constructor:Collapse,dimension:function(){var hasWidth=this.$element.hasClass("width");return hasWidth?"width":"height"},show:function(){var dimension,scroll,actives,hasData;if(!this.transitioning){if(dimension=this.dimension(),scroll=$.camelCase(["scroll",dimension].join("-")),actives=this.$parent&&this.$parent.find("> .accordion-group > .in"),actives&&actives.length){if(hasData=actives.data("collapse"),hasData&&hasData.transitioning)return;actives.collapse("hide"),hasData||actives.data("collapse",null)}this.$element[dimension](0),this.transition("addClass",$.Event("show"),"shown"),$.support.transition&&this.$element[dimension](this.$element[0][scroll])}},hide:function(){var dimension;this.transitioning||(dimension=this.dimension(),this.reset(this.$element[dimension]()),this.transition("removeClass",$.Event("hide"),"hidden"),this.$element[dimension](0))},reset:function(size){var dimension=this.dimension();return this.$element.removeClass("collapse")[dimension](size||"auto")[0].offsetWidth,this.$element[null!==size?"addClass":"removeClass"]("collapse"),this},transition:function(method,startEvent,completeEvent){var that=this,complete=function(){"show"==startEvent.type&&that.reset(),that.transitioning=0,that.$element.trigger(completeEvent)};this.$element.trigger(startEvent),startEvent.isDefaultPrevented()||(this.transitioning=1,this.$element[method]("in"),$.support.transition&&this.$element.hasClass("collapse")?this.$element.one($.support.transition.end,complete):complete())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var old=$.fn.collapse;$.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data("collapse"),options="object"==typeof option&&option;data||$this.data("collapse",data=new Collapse(this,options)),"string"==typeof option&&data[option]()})},$.fn.collapse.defaults={toggle:!0},$.fn.collapse.Constructor=Collapse,$.fn.collapse.noConflict=function(){return $.fn.collapse=old,this},$(document).on("click.collapse.data-api","[data-toggle=collapse]",function(e){var href,$this=$(this),target=$this.attr("data-target")||e.preventDefault()||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,""),option=$(target).data("collapse")?"toggle":$this.data();$this[$(target).hasClass("in")?"addClass":"removeClass"]("collapsed"),$(target).collapse(option)})}(window.jQuery),!function($){"use strict";function clearMenus(){$(toggle).each(function(){getParent($(this)).removeClass("open")})}function getParent($this){var $parent,selector=$this.attr("data-target");return selector||(selector=$this.attr("href"),selector=selector&&/#/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,"")),$parent=$(selector),$parent.length||($parent=$this.parent()),$parent}var toggle="[data-toggle=dropdown]",Dropdown=function(element){var $el=$(element).on("click.dropdown.data-api",this.toggle);$("html").on("click.dropdown.data-api",function(){$el.parent().removeClass("open")})};Dropdown.prototype={constructor:Dropdown,toggle:function(){var $parent,isActive,$this=$(this);if(!$this.is(".disabled, :disabled"))return $parent=getParent($this),isActive=$parent.hasClass("open"),clearMenus(),isActive||$parent.toggleClass("open"),$this.focus(),!1},keydown:function(e){var $this,$items,$parent,isActive,index;if(/(38|40|27)/.test(e.keyCode)&&($this=$(this),e.preventDefault(),e.stopPropagation(),!$this.is(".disabled, :disabled"))){if($parent=getParent($this),isActive=$parent.hasClass("open"),!isActive||isActive&&27==e.keyCode)return $this.click();$items=$("[role=menu] li:not(.divider):visible a",$parent),$items.length&&(index=$items.index($items.filter(":focus")),38==e.keyCode&&index>0&&index--,40==e.keyCode&&$items.length-1>index&&index++,~index||(index=0),$items.eq(index).focus())}}};var old=$.fn.dropdown;$.fn.dropdown=function(option){return this.each(function(){var $this=$(this),data=$this.data("dropdown");data||$this.data("dropdown",data=new Dropdown(this)),"string"==typeof option&&data[option].call($this)})},$.fn.dropdown.Constructor=Dropdown,$.fn.dropdown.noConflict=function(){return $.fn.dropdown=old,this},$(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("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)}(window.jQuery),!function($){"use strict";var Modal=function(element,options){this.options=options,this.$element=$(element).delegate('[data-dismiss="modal"]',"click.dismiss.modal",$.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};Modal.prototype={constructor:Modal,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var that=this,e=$.Event("show");this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass("fade");that.$element.parent().length||that.$element.appendTo(document.body),that.$element.show(),transition&&that.$element[0].offsetWidth,that.$element.addClass("in").attr("aria-hidden",!1),that.enforceFocus(),transition?that.$element.one($.support.transition.end,function(){that.$element.focus().trigger("shown")}):that.$element.focus().trigger("shown")}))},hide:function(e){e&&e.preventDefault(),e=$.Event("hide"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),$(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),$.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var that=this;$(document).on("focusin.modal",function(e){that.$element[0]===e.target||that.$element.has(e.target).length||that.$element.focus()})},escape:function(){var that=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(e){27==e.which&&that.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var that=this,timeout=setTimeout(function(){that.$element.off($.support.transition.end),that.hideModal()},500);this.$element.one($.support.transition.end,function(){clearTimeout(timeout),that.hideModal()})},hideModal:function(){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(callback){var animate=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate;this.$backdrop=$('<div class="modal-backdrop '+animate+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?$.proxy(this.$element[0].focus,this.$element[0]):$.proxy(this.hide,this)),doAnimate&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),doAnimate?this.$backdrop.one($.support.transition.end,callback):callback()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),$.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one($.support.transition.end,$.proxy(this.removeBackdrop,this)):this.removeBackdrop()):callback&&callback()}};var old=$.fn.modal;$.fn.modal=function(option){return this.each(function(){var $this=$(this),data=$this.data("modal"),options=$.extend({},$.fn.modal.defaults,$this.data(),"object"==typeof option&&option);data||$this.data("modal",data=new Modal(this,options)),"string"==typeof option?data[option]():options.show&&data.show()})},$.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},$.fn.modal.Constructor=Modal,$.fn.modal.noConflict=function(){return $.fn.modal=old,this},$(document).on("click.modal.data-api",'[data-toggle="modal"]',function(e){var $this=$(this),href=$this.attr("href"),$target=$($this.attr("data-target")||href&&href.replace(/.*(?=#[^\s]+$)/,"")),option=$target.data("modal")?"toggle":$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data());e.preventDefault(),$target.modal(option).one("hide",function(){$this.focus()})})}(window.jQuery),!function($){"use strict";var Tooltip=function(element,options){this.init("tooltip",element,options)};Tooltip.prototype={constructor:Tooltip,init:function(type,element,options){var eventIn,eventOut;this.type=type,this.$element=$(element),this.options=this.getOptions(options),this.enabled=!0,"click"==this.options.trigger?this.$element.on("click."+this.type,this.options.selector,$.proxy(this.toggle,this)):"manual"!=this.options.trigger&&(eventIn="hover"==this.options.trigger?"mouseenter":"focus",eventOut="hover"==this.options.trigger?"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?this._options=$.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(options){return options=$.extend({},$.fn[this.type].defaults,options,this.$element.data()),options.delay&&"number"==typeof options.delay&&(options.delay={show:options.delay,hide:options.delay}),options},enter:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);return self.options.delay&&self.options.delay.show?(clearTimeout(this.timeout),self.hoverState="in",this.timeout=setTimeout(function(){"in"==self.hoverState&&self.show()},self.options.delay.show),void 0):self.show()},leave:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),self.options.delay&&self.options.delay.hide?(self.hoverState="out",this.timeout=setTimeout(function(){"out"==self.hoverState&&self.hide()},self.options.delay.hide),void 0):self.hide()},show:function(){var $tip,inside,pos,actualWidth,actualHeight,placement,tp;if(this.hasContent()&&this.enabled){switch($tip=this.tip(),this.setContent(),this.options.animation&&$tip.addClass("fade"),placement="function"==typeof this.options.placement?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement,inside=/in/.test(placement),$tip.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),pos=this.getPosition(inside),actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight,inside?placement.split(" ")[1]:placement){case"bottom":tp={top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2};break;case"top":tp={top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2};break;case"left":tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth};break;case"right":tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}}$tip.offset(tp).addClass(placement).addClass("in")}},setContent:function(){var $tip=this.tip(),title=this.getTitle();$tip.find(".tooltip-inner")[this.options.html?"html":"text"](title),$tip.removeClass("fade in top bottom left right")},hide:function(){function removeWithAnimation(){var timeout=setTimeout(function(){$tip.off($.support.transition.end).detach()},500);$tip.one($.support.transition.end,function(){clearTimeout(timeout),$tip.detach()})}var $tip=this.tip();return $tip.removeClass("in"),$.support.transition&&this.$tip.hasClass("fade")?removeWithAnimation():$tip.detach(),this},fixTitle:function(){var $e=this.$element;($e.attr("title")||"string"!=typeof $e.attr("data-original-title"))&&$e.attr("data-original-title",$e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(inside){return $.extend({},inside?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var title,$e=this.$element,o=this.options;return title=$e.attr("data-original-title")||("function"==typeof o.title?o.title.call($e[0]):o.title)},tip:function(){return this.$tip=this.$tip||$(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(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);self[self.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var old=$.fn.tooltip;$.fn.tooltip=function(option){return this.each(function(){var $this=$(this),data=$this.data("tooltip"),options="object"==typeof option&&option;data||$this.data("tooltip",data=new Tooltip(this,options)),"string"==typeof option&&data[option]()})},$.fn.tooltip.Constructor=Tooltip,$.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},$.fn.tooltip.noConflict=function(){return $.fn.tooltip=old,this}}(window.jQuery),!function($){"use strict";var Popover=function(element,options){this.init("popover",element,options)};Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype,{constructor:Popover,setContent:function(){var $tip=this.tip(),title=this.getTitle(),content=this.getContent();$tip.find(".popover-title")[this.options.html?"html":"text"](title),$tip.find(".popover-content")[this.options.html?"html":"text"](content),$tip.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var content,$e=this.$element,o=this.options;return content=$e.attr("data-content")||("function"==typeof o.content?o.content.call($e[0]):o.content)},tip:function(){return this.$tip||(this.$tip=$(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var old=$.fn.popover;$.fn.popover=function(option){return this.each(function(){var $this=$(this),data=$this.data("popover"),options="object"==typeof option&&option;data||$this.data("popover",data=new Popover(this,options)),"string"==typeof option&&data[option]()})},$.fn.popover.Constructor=Popover,$.fn.popover.defaults=$.extend({},$.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>'}),$.fn.popover.noConflict=function(){return $.fn.popover=old,this}}(window.jQuery),!function($){"use strict";function ScrollSpy(element,options){var href,process=$.proxy(this.process,this),$element=$(element).is("body")?$(window):$(element);this.options=$.extend({},$.fn.scrollspy.defaults,options),this.$scrollElement=$element.on("scroll.scroll-spy.data-api",process),this.selector=(this.options.target||(href=$(element).attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=$("body"),this.refresh(),this.process()}ScrollSpy.prototype={constructor:ScrollSpy,refresh:function(){var $targets,self=this;this.offsets=$([]),this.targets=$([]),$targets=this.$body.find(this.selector).map(function(){var $el=$(this),href=$el.data("target")||$el.attr("href"),$href=/^#\w/.test(href)&&$(href);return $href&&$href.length&&[[$href.position().top+self.$scrollElement.scrollTop(),href]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){self.offsets.push(this[0]),self.targets.push(this[1])})},process:function(){var i,scrollTop=this.$scrollElement.scrollTop()+this.options.offset,scrollHeight=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,maxScroll=scrollHeight-this.$scrollElement.height(),offsets=this.offsets,targets=this.targets,activeTarget=this.activeTarget;if(scrollTop>=maxScroll)return activeTarget!=(i=targets.last()[0])&&this.activate(i);for(i=offsets.length;i--;)activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(!offsets[i+1]||offsets[i+1]>=scrollTop)&&this.activate(targets[i])},activate:function(target){var active,selector;this.activeTarget=target,$(this.selector).parent(".active").removeClass("active"),selector=this.selector+'[data-target="'+target+'"],'+this.selector+'[href="'+target+'"]',active=$(selector).parent("li").addClass("active"),active.parent(".dropdown-menu").length&&(active=active.closest("li.dropdown").addClass("active")),active.trigger("activate")}};var old=$.fn.scrollspy;$.fn.scrollspy=function(option){return this.each(function(){var $this=$(this),data=$this.data("scrollspy"),options="object"==typeof option&&option;data||$this.data("scrollspy",data=new ScrollSpy(this,options)),"string"==typeof option&&data[option]()})},$.fn.scrollspy.Constructor=ScrollSpy,$.fn.scrollspy.defaults={offset:10},$.fn.scrollspy.noConflict=function(){return $.fn.scrollspy=old,this},$(window).on("load",function(){$('[data-spy="scroll"]').each(function(){var $spy=$(this);$spy.scrollspy($spy.data())})})}(window.jQuery),!function($){"use strict";var Tab=function(element){this.element=$(element)};Tab.prototype={constructor:Tab,show:function(){var previous,$target,e,$this=this.element,$ul=$this.closest("ul:not(.dropdown-menu)"),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),$this.parent("li").hasClass("active")||(previous=$ul.find(".active:last a")[0],e=$.Event("show",{relatedTarget:previous}),$this.trigger(e),e.isDefaultPrevented()||($target=$(selector),this.activate($this.parent("li"),$ul),this.activate($target,$target.parent(),function(){$this.trigger({type:"shown",relatedTarget:previous})})))},activate:function(element,container,callback){function next(){$active.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),element.addClass("active"),transition?(element[0].offsetWidth,element.addClass("in")):element.removeClass("fade"),element.parent(".dropdown-menu")&&element.closest("li.dropdown").addClass("active"),callback&&callback()}var $active=container.find("> .active"),transition=callback&&$.support.transition&&$active.hasClass("fade");transition?$active.one($.support.transition.end,next):next(),$active.removeClass("in")}};var old=$.fn.tab;$.fn.tab=function(option){return this.each(function(){var $this=$(this),data=$this.data("tab");data||$this.data("tab",data=new Tab(this)),"string"==typeof option&&data[option]()})},$.fn.tab.Constructor=Tab,$.fn.tab.noConflict=function(){return $.fn.tab=old,this},$(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),$(this).tab("show")})}(window.jQuery),!function($){"use strict";var Typeahead=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.typeahead.defaults,options),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=$(this.options.menu),this.shown=!1,this.listen()};Typeahead.prototype={constructor:Typeahead,select:function(){var val=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(val)).change(),this.hide()},updater:function(item){return item},show:function(){var pos=$.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:pos.top+pos.height,left:pos.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var items;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(items=$.isFunction(this.source)?this.source(this.query,$.proxy(this.process,this)):this.source,items?this.process(items):this)},process:function(items){var that=this;return items=$.grep(items,function(item){return that.matcher(item)}),items=this.sorter(items),items.length?this.render(items.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(item){return~item.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(items){for(var item,beginswith=[],caseSensitive=[],caseInsensitive=[];item=items.shift();)item.toLowerCase().indexOf(this.query.toLowerCase())?~item.indexOf(this.query)?caseSensitive.push(item):caseInsensitive.push(item):beginswith.push(item);return beginswith.concat(caseSensitive,caseInsensitive)},highlighter:function(item){var query=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return item.replace(RegExp("("+query+")","ig"),function($1,match){return"<strong>"+match+"</strong>"})},render:function(items){var that=this;return items=$(items).map(function(i,item){return i=$(that.options.item).attr("data-value",item),i.find("a").html(that.highlighter(item)),i[0]}),items.first().addClass("active"),this.$menu.html(items),this},next:function(){var active=this.$menu.find(".active").removeClass("active"),next=active.next();next.length||(next=$(this.$menu.find("li")[0])),next.addClass("active")},prev:function(){var active=this.$menu.find(".active").removeClass("active"),prev=active.prev();prev.length||(prev=this.$menu.find("li").last()),prev.addClass("active")},listen:function(){this.$element.on("blur",$.proxy(this.blur,this)).on("keypress",$.proxy(this.keypress,this)).on("keyup",$.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",$.proxy(this.keydown,this)),this.$menu.on("click",$.proxy(this.click,this)).on("mouseenter","li",$.proxy(this.mouseenter,this))},eventSupported:function(eventName){var isSupported=eventName in this.$element;return isSupported||(this.$element.setAttribute(eventName,"return;"),isSupported="function"==typeof this.$element[eventName]),isSupported},move:function(e){if(this.shown){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(e){this.suppressKeyPressRepeat=~$.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(e){this.suppressKeyPressRepeat||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()},blur:function(){var that=this;setTimeout(function(){that.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(e){this.$menu.find(".active").removeClass("active"),$(e.currentTarget).addClass("active")}};var old=$.fn.typeahead;$.fn.typeahead=function(option){return this.each(function(){var $this=$(this),data=$this.data("typeahead"),options="object"==typeof option&&option;data||$this.data("typeahead",data=new Typeahead(this,options)),"string"==typeof option&&data[option]()})},$.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},$.fn.typeahead.Constructor=Typeahead,$.fn.typeahead.noConflict=function(){return $.fn.typeahead=old,this},$(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(e){var $this=$(this);$this.data("typeahead")||(e.preventDefault(),$this.typeahead($this.data()))})}(window.jQuery),!function($){"use strict";var Affix=function(element,options){this.options=$.extend({},$.fn.affix.defaults,options),this.$window=$(window).on("scroll.affix.data-api",$.proxy(this.checkPosition,this)).on("click.affix.data-api",$.proxy(function(){setTimeout($.proxy(this.checkPosition,this),1)},this)),this.$element=$(element),this.checkPosition()};Affix.prototype.checkPosition=function(){if(this.$element.is(":visible")){var affix,scrollHeight=$(document).height(),scrollTop=this.$window.scrollTop(),position=this.$element.offset(),offset=this.options.offset,offsetBottom=offset.bottom,offsetTop=offset.top,reset="affix affix-top affix-bottom";"object"!=typeof offset&&(offsetBottom=offsetTop=offset),"function"==typeof offsetTop&&(offsetTop=offset.top()),"function"==typeof offsetBottom&&(offsetBottom=offset.bottom()),affix=null!=this.unpin&&scrollTop+this.unpin<=position.top?!1:null!=offsetBottom&&position.top+this.$element.height()>=scrollHeight-offsetBottom?"bottom":null!=offsetTop&&offsetTop>=scrollTop?"top":!1,this.affixed!==affix&&(this.affixed=affix,this.unpin="bottom"==affix?position.top-scrollTop:null,this.$element.removeClass(reset).addClass("affix"+(affix?"-"+affix:"")))}};var old=$.fn.affix;$.fn.affix=function(option){return this.each(function(){var $this=$(this),data=$this.data("affix"),options="object"==typeof option&&option;data||$this.data("affix",data=new Affix(this,options)),"string"==typeof option&&data[option]()})},$.fn.affix.Constructor=Affix,$.fn.affix.defaults={offset:0},$.fn.affix.noConflict=function(){return $.fn.affix=old,this},$(window).on("load",function(){$('[data-spy="affix"]').each(function(){var $spy=$(this),data=$spy.data();data.offset=data.offset||{},data.offsetBottom&&(data.offset.bottom=data.offsetBottom),data.offsetTop&&(data.offset.top=data.offsetTop),$spy.affix(data)})})}(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 2377badf0e8a12541a386f4cda79deed10e457e1..9c36d4281d2fcec5527c7f2bf3a61aeb6512a1b5 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/assets/js/html5shiv.js b/docs/assets/js/html5shiv.js new file mode 100644 index 0000000000000000000000000000000000000000..784f221caf83c7b22d5af716ffb2af11d7b14d57 --- /dev/null +++ b/docs/assets/js/html5shiv.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}</style>"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); +for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document); diff --git a/docs/base-css.html b/docs/base-css.html index 08de2aea07d483e7bff0e16957dacceaa77dbeb6..3294336b6e03437786897732e1a34625f58fe2ca 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -15,7 +15,7 @@ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="assets/js/html5shiv.js"></script> <![endif]--> <!-- Le fav and touch icons --> @@ -170,6 +170,19 @@ <p><span class="label label-info">Heads up!</span> Feel free to use <code><b></code> and <code><i></code> in HTML5. <code><b></code> is meant to highlight words or phrases without conveying additional importance while <code><i></code> is mostly for voice, technical terms, etc.</p> + <h3>Alignment classes</h3> + <p>Easily realign text to components with text alignment classes.</p> + <div class="bs-docs-example"> + <p class="text-left">Left aligned text.</p> + <p class="text-center">Center aligned text.</p> + <p class="text-right">Right aligned text.</p> + </div> +<pre class="prettyprint linenums"> +<p class="text-left">Left aligned text.</p> +<p class="text-center">Center aligned text.</p> +<p class="text-right">Right aligned text.</p> +</pre> + <h3>Emphasis classes</h3> <p>Convey meaning through color with a handful of emphasis utility classes.</p> <div class="bs-docs-example"> @@ -453,7 +466,7 @@ For example, <code><section></code> should be wrapped as inline. </div> <pre class="prettyprint linenums"> -For example, <code><section></code> should be wrapped as inline. +For example, <code>&lt;section&gt;</code> should be wrapped as inline. </pre> <h2>Basic block</h2> @@ -527,7 +540,7 @@ For example, <code><section></code> should be wrapped as inlin <p>Add any of the following classes to the <code>.table</code> base class.</p> <h3><code>.table-striped</code></h3> - <p>Adds zebra-striping to any table row within the <code><tbody></code> via the <code>:nth-child</code> CSS selector (not available in IE7-IE8).</p> + <p>Adds zebra-striping to any table row within the <code><tbody></code> via the <code>:nth-child</code> CSS selector (not available in IE7-8).</p> <div class="bs-docs-example"> <table class="table table-striped"> <thead> @@ -1572,7 +1585,7 @@ For example, <code><section></code> should be wrapped as inlin </pre> <h3>Invalid inputs</h3> - <p>Style inputs via default browser functionality with <code>:invalid</code>. Specify a <code>type</code> and add the <code>required</code> attribute.</p> + <p>Style inputs via default browser functionality with <code>:invalid</code>. Specify a <code>type</code>, add the <code>required</code> attribute if the field is not optional, and (if applicable) specify a <code>pattern</code>.</p> <form class="bs-docs-example form-inline"> <input class="span3" type="email" placeholder="test@example.com" required> </form> @@ -1630,6 +1643,7 @@ For example, <code><section></code> should be wrapped as inlin <span class="help-inline">Something may have gone wrong</span> </div> </div> + <div class="control-group error"> <label class="control-label" for="inputError">Input with error</label> <div class="controls"> @@ -1637,6 +1651,15 @@ For example, <code><section></code> should be wrapped as inlin <span class="help-inline">Please correct the error</span> </div> </div> + +<div class="control-group info"> + <label class="control-label" for="inputInfo">Input with info</label> + <div class="controls"> + <input type="text" id="inputInfo"> + <span class="help-inline">Username is already taken</span> + </div> +</div> + <div class="control-group success"> <label class="control-label" for="inputSuccess">Input with success</label> <div class="controls"> @@ -2041,7 +2064,6 @@ For example, <code><section></code> should be wrapped as inlin <pre class="prettyprint linenums"> <div class="btn-toolbar"> <div class="btn-group"> - <a class="btn" href="#"><i class="icon-align-left"></i></a> <a class="btn" href="#"><i class="icon-align-center"></i></a> <a class="btn" href="#"><i class="icon-align-right"></i></a> diff --git a/docs/components.html b/docs/components.html index bd528866cad136c735e5f57ec0483af8a16fd51e..e8b74cf8257e1be6c224f06a325bfc8b7bd55fee 100644 --- a/docs/components.html +++ b/docs/components.html @@ -15,7 +15,7 @@ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="assets/js/html5shiv.js"></script> <![endif]--> <!-- Le fav and touch icons --> @@ -161,6 +161,25 @@ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dLabel"> ... </ul> +</pre> + + <h3>Disabled menu options</h3> + <p>Add <code>.disabled</code> to a <code><li></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"> +<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> + <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> </pre> <h3>Sub menus on dropdowns</h3> @@ -272,9 +291,9 @@ </div> <pre class="prettyprint linenums"> <div class="btn-group"> - <button class="btn">1</button> - <button class="btn">2</button> - <button class="btn">3</button> + <button class="btn">Left</button> + <button class="btn">Middle</button> + <button class="btn">Right</button> </div> </pre> @@ -2488,7 +2507,7 @@ <p><button class="close" style="float: none;">×</button></p> </div> <pre class="prettyprint linenums"><button class="close">&times;</button></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"><a class="close" href="#">&times;</a></pre> <h2>Helper classes</h2> diff --git a/docs/customize.html b/docs/customize.html index d7432465733b64d98bb85b6abcd4bdddd2e4ccef..c714f569432c4435b3d4f2e63ab2bcbb00901927 100644 --- a/docs/customize.html +++ b/docs/customize.html @@ -15,7 +15,7 @@ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="assets/js/html5shiv.js"></script> <![endif]--> <!-- Le fav and touch icons --> diff --git a/docs/examples/carousel.html b/docs/examples/carousel.html index 0958103fc61a67d143b374f3c69441579cc6552e..50f34e648dc985dea9fa0931174ea838a8c8e970 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 { @@ -254,7 +255,7 @@ <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="../assets/js/html5shiv.js"></script> <![endif]--> <!-- Fav and touch icons --> @@ -417,7 +418,7 @@ <!-- FOOTER --> <footer> <p class="pull-right"><a href="#">Back to top</a></p> - <p>© 2012 Company, Inc. · <a href="#">Privacy</a> · <a href="#">Terms</a></p> + <p>© 2013 Company, Inc. · <a href="#">Privacy</a> · <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/fluid.html b/docs/examples/fluid.html index 4ca2920efd0b508a4dc4dc3810e4ffd5ba5f1c72..b004ffad698f52c2cd78178d897b527e0dda3342 100644 --- a/docs/examples/fluid.html +++ b/docs/examples/fluid.html @@ -17,12 +17,21 @@ .sidebar-nav { padding: 9px 0; } + + @media (max-width: 980px) { + /* Enable use of floated navbar text */ + .navbar-text.pull-right { + float: none; + padding-left: 5px; + padding-right: 5px; + } + } </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> + <script src="../assets/js/html5shiv.js"></script> <![endif]--> <!-- Fav and touch icons --> @@ -128,7 +137,7 @@ <hr> <footer> - <p>© Company 2012</p> + <p>© Company 2013</p> </footer> </div><!--/.fluid-container--> diff --git a/docs/examples/hero.html b/docs/examples/hero.html index f0a5e17093b5760e28f74924ddfb6a8f32c8498a..c28b757b96e845feecebdb8d3dee0e0abbbfff40 100644 --- a/docs/examples/hero.html +++ b/docs/examples/hero.html @@ -19,7 +19,7 @@ <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="../assets/js/html5shiv.js"></script> <![endif]--> <!-- Fav and touch icons --> @@ -100,7 +100,7 @@ <hr> <footer> - <p>© Company 2012</p> + <p>© Company 2013</p> </footer> </div> <!-- /container --> diff --git a/docs/examples/marketing-alternate.html b/docs/examples/justified-nav.html similarity index 97% rename from docs/examples/marketing-alternate.html rename to docs/examples/justified-nav.html index 8cbeb02a25c1b052956f3680270392aeab06f607..ef8f8d428671c4e115bcf389bf98ae2a3d4a0cd1 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; @@ -82,7 +84,7 @@ <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="../assets/js/html5shiv.js"></script> <![endif]--> <!-- Fav and touch icons --> @@ -146,7 +148,7 @@ <hr> <div class="footer"> - <p>© Company 2012</p> + <p>© Company 2013</p> </div> </div> <!-- /container --> diff --git a/docs/examples/marketing-narrow.html b/docs/examples/marketing-narrow.html index 9ce1cd5bc6e8e75113a609b7df0152816090dcd6..f6f5d1685122713724c7c65f1a89b5a4dc67cccd 100644 --- a/docs/examples/marketing-narrow.html +++ b/docs/examples/marketing-narrow.html @@ -50,7 +50,7 @@ <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="../assets/js/html5shiv.js"></script> <![endif]--> <!-- Fav and touch icons --> @@ -111,7 +111,7 @@ <hr> <div class="footer"> - <p>© Company 2012</p> + <p>© Company 2013</p> </div> </div> <!-- /container --> diff --git a/docs/examples/signin.html b/docs/examples/signin.html index 17578483a3146afc0d3b05d414c6d199b786da4a..031052789da081fa99fd829e8d7aca1c8aeff396 100644 --- a/docs/examples/signin.html +++ b/docs/examples/signin.html @@ -46,7 +46,7 @@ <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="../assets/js/html5shiv.js"></script> <![endif]--> <!-- Fav and touch icons --> diff --git a/docs/examples/starter-template.html b/docs/examples/starter-template.html index 93ba809e380b3f9dd574286c82b13fa6e8e5afa9..b81f21d1748cdbc71f2f03683461804a33e2b710 100644 --- a/docs/examples/starter-template.html +++ b/docs/examples/starter-template.html @@ -18,7 +18,7 @@ <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="../assets/js/html5shiv.js"></script> <![endif]--> <!-- Fav and touch icons --> diff --git a/docs/examples/sticky-footer-navbar.html b/docs/examples/sticky-footer-navbar.html new file mode 100644 index 0000000000000000000000000000000000000000..cb5de6de2ad39f83b9835903876e4d6128ba0350 --- /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 · 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="../assets/js/html5shiv.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 1c9c36149e5b0f1bf3031bcedab4f958e76e618a..d307d79387f2871cf764918a420cf1c2d7e9a8a7 100644 --- a/docs/examples/sticky-footer.html +++ b/docs/examples/sticky-footer.html @@ -67,7 +67,7 @@ <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="../assets/js/html5shiv.js"></script> <![endif]--> <!-- Fav and touch icons --> @@ -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/extend.html b/docs/extend.html index dfbe436fab6a095d71811351723416679709ad72..4de7b9c4b32c8c3d2cb6932793e4d4accce778fe 100644 --- a/docs/extend.html +++ b/docs/extend.html @@ -15,7 +15,7 @@ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="assets/js/html5shiv.js"></script> <![endif]--> <!-- Le fav and touch icons --> @@ -136,16 +136,8 @@ <h2>Tools for compiling</h2> - <h3>Node with makefile</h3> - <p>Install the LESS command line compiler, JSHint, Recess, and uglify-js globally with npm by running the following command:</p> - <pre>$ npm install -g less jshint recess uglify-js</pre> - <p>Once installed just run <code>make</code> from the root of your bootstrap directory and you're all set.</p> - <p>Additionally, if you have <a href="https://github.com/mynyml/watchr">watchr</a> installed, you may run <code>make watch</code> to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).</p> - <h3>Command line</h3> - <p>Install the LESS command line tool via Node and run the following command:</p> - <pre>$ lessc ./less/bootstrap.less > bootstrap.css</pre> - <p>Be sure to include <code>--compress</code> in that command if you're trying to save some bytes!</p> + <p>Follow <a href="https://github.com/twitter/bootstrap#developers">the instructions in the project readme</a> on GitHub for compiling via command line.</p> <h3>JavaScript</h3> <p><a href="http://lesscss.org/">Download the latest Less.js</a> and include the path to it (and Bootstrap) in the <code><head></code>.</p> diff --git a/docs/getting-started.html b/docs/getting-started.html index cc6e0b71ceb522cb4ecb5635ac051e2ebb4eddd6..ad83385906a893d72cb5c06f8c2d18f89749f5fc 100644 --- a/docs/getting-started.html +++ b/docs/getting-started.html @@ -15,7 +15,7 @@ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="assets/js/html5shiv.js"></script> <![endif]--> <!-- Le fav and touch icons --> @@ -198,7 +198,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"> <!DOCTYPE html> @@ -243,21 +243,21 @@ <ul class="thumbnails bootstrap-examples"> <li class="span3"> <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> </li> <li class="span3"> <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> </li> <li class="span3"> <a class="thumbnail" href="examples/fluid.html"> - <img src="assets/img/examples/bootstrap-example-fluid.jpg" alt=""> + <img src="assets/img/examples/bootstrap-example-fluid.png" alt=""> </a> <h4>Fluid layout</h4> <p>Uses our new responsive, fluid grid system to create a seamless liquid layout.</p> @@ -270,6 +270,13 @@ <h4>Narrow marketing</h4> <p>Slim, lightweight marketing template for small projects or teams.</p> </li> + <li class="span3"> + <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> + </li> <li class="span3"> <a class="thumbnail" href="examples/signin.html"> <img src="assets/img/examples/bootstrap-example-signin.png" alt=""> @@ -277,6 +284,7 @@ <h4>Sign in</h4> <p>Barebones sign in form with custom, larger form controls and a flexible layout.</p> </li> + <li class="span3"> <a class="thumbnail" href="examples/sticky-footer.html"> <img src="assets/img/examples/bootstrap-example-sticky-footer.png" alt=""> @@ -284,7 +292,6 @@ <h4>Sticky footer</h4> <p>Pin a fixed-height footer to the bottom of the user's viewport.</p> </li> - <li class="span3"> <a class="thumbnail" href="examples/carousel.html"> <img src="assets/img/examples/bootstrap-example-carousel.png" alt=""> diff --git a/docs/index.html b/docs/index.html index 05786b152966195baeb16190fa6d1e5b9bc9443f..cd96ed0cda7c10a29a94e21f72cd8753fb3363b0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -15,7 +15,7 @@ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="assets/js/html5shiv.js"></script> <![endif]--> <!-- Le fav and touch icons --> @@ -87,7 +87,7 @@ <a href="./extend.html" >Extend</a> </li> <li> - Version 2.2.2 + Version 2.3.0 </li> </ul> </div> diff --git a/docs/javascript.html b/docs/javascript.html index d956ffaf3526325f874e250ca4df1ee6c70d2fbe..896a9e8bf25eccd83c61e9bceeab915a94137376 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -15,7 +15,7 @@ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="assets/js/html5shiv.js"></script> <![endif]--> <!-- Le fav and touch icons --> @@ -161,7 +161,7 @@ $('#myModal').on('show', function (e) { <h1>Transitions <small>bootstrap-transition.js</small></h1> </div> <h3>About transitions</h3> - <p>For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.</p> + <p>For simple transition effects, include <strong>bootstrap-transition.js</strong> once alongside the other JS files. If you're using the compiled (or minified) <strong>bootstrap.js</strong>, there is no need to include this—it's already there.</p> <h3>Use cases</h3> <p>A few examples of the transition plugin:</p> <ul> @@ -405,21 +405,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> @@ -427,11 +427,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> @@ -447,31 +447,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,19 +767,20 @@ $('a[data-toggle="tab"]').on('shown', function (e) { <h2>Examples</h2> <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>For performance reasons, the tooltip and popover data-apis are opt in, meaning <strong>you must initialize them yourself</strong>.</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="A much longer tooltip belongs right here to demonstrate the max-width we apply.">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> @@ -817,7 +818,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> @@ -836,8 +837,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> @@ -849,6 +850,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"> @@ -857,8 +866,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"><a href="#" rel="tooltip" title="first tooltip">hover over me</a></pre> + <pre class="prettyprint linenums"><a href="#" data-toggle="tooltip" title="first tooltip">hover over me</a></pre> <h3>Methods</h3> <h4>$().tooltip(options)</h4> @@ -930,16 +938,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> @@ -977,7 +985,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> @@ -1015,6 +1023,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 popover to a specific element <code>container: 'body'</code></p> + </td> + </tr> </tbody> </table> <div class="alert alert-info"> @@ -1422,6 +1438,11 @@ $('#myCollapsible').on('hidden', function () { <p>The slideshow below shows a generic plugin and component for cycling through elements like a carousel.</p> <div class="bs-docs-example"> <div id="myCarousel" class="carousel slide"> + <ol class="carousel-indicators"> + <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"> <img src="assets/img/bootstrap-mdo-sfmoma-01.jpg" alt=""> @@ -1451,6 +1472,11 @@ $('#myCollapsible').on('hidden', function () { </div> <pre class="prettyprint linenums"> <div id="myCarousel" class="carousel slide"> + <ol class="carousel-indicators"> + <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> <!-- Carousel items --> <div class="carousel-inner"> <div class="active item">…</div> @@ -1475,14 +1501,14 @@ $('#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> <pre class="prettyprint linenums">$('.carousel').carousel()</pre> <h3>Options</h3> - <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-interval=""</code>.</p> + <p>Options can be passed via data attributes or JavaScriptz. For data attributes, append the option name to <code>data-</code>, as in <code>data-interval=""</code>.</p> <table class="table table-bordered table-striped"> <thead> <tr> @@ -1565,7 +1591,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"><input type="text" data-provide="typeahead"></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"> @@ -1671,14 +1697,6 @@ $('.carousel').carousel({ <p>Call the affix plugin via JavaScript:</p> <pre class="prettyprint linenums">$('#navbar').affix()</pre> - <h3>Methods</h3> - <h4>.affix('refresh')</h4> - <p>When using affix in conjunction with adding or removing of elements from the DOM, you'll want to call the refresh method:</p> -<pre class="prettyprint linenums"> -$('[data-spy="affix"]').each(function () { - $(this).affix('refresh') -}); -</pre> <h3>Options</h3> <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-offset-top="200"</code>.</p> <table class="table table-bordered table-striped"> diff --git a/docs/scaffolding.html b/docs/scaffolding.html index c934165fc69e9c6cab196a5ca87bf8613fe87c40..6adc11711c792e554212a092847218d4c3b1072a 100644 --- a/docs/scaffolding.html +++ b/docs/scaffolding.html @@ -15,7 +15,7 @@ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="assets/js/html5shiv.js"></script> <![endif]--> <!-- Le fav and touch icons --> diff --git a/docs/templates/layout.mustache b/docs/templates/layout.mustache index b3f36e99d5b81cb4dc4570e19cc4732a07f51388..01cf319c253f5187c31e77aa79992054f47e511b 100644 --- a/docs/templates/layout.mustache +++ b/docs/templates/layout.mustache @@ -15,7 +15,7 @@ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <script src="assets/js/html5shiv.js"></script> <![endif]--> <!-- Le fav and touch icons --> diff --git a/docs/templates/pages/base-css.mustache b/docs/templates/pages/base-css.mustache index 6136d00952bc3faa350ebf0e1efe35255a8c3558..4ec1eee29668c35857e10db16cd92621aeb4fe57 100644 --- a/docs/templates/pages/base-css.mustache +++ b/docs/templates/pages/base-css.mustache @@ -104,6 +104,19 @@ <p><span class="label label-info">{{_i}}Heads up!{{/i}}</span> {{_i}}Feel free to use <code><b></code> and <code><i></code> in HTML5. <code><b></code> is meant to highlight words or phrases without conveying additional importance while <code><i></code> is mostly for voice, technical terms, etc.{{/i}}</p> + <h3>{{_i}}Alignment classes{{/i}}</h3> + <p>{{_i}}Easily realign text to components with text alignment classes.{{/i}}</p> + <div class="bs-docs-example"> + <p class="text-left">Left aligned text.</p> + <p class="text-center">Center aligned text.</p> + <p class="text-right">Right aligned text.</p> + </div> +<pre class="prettyprint linenums"> +<p class="text-left">Left aligned text.</p> +<p class="text-center">Center aligned text.</p> +<p class="text-right">Right aligned text.</p> +</pre> + <h3>{{_i}}Emphasis classes{{/i}}</h3> <p>{{_i}}Convey meaning through color with a handful of emphasis utility classes.{{/i}}</p> <div class="bs-docs-example"> @@ -390,7 +403,7 @@ For example, <code><section></code> should be wrapped as inline. </div> <pre class="prettyprint linenums"> -{{_i}}For example, <code><section></code> should be wrapped as inline.{{/i}} +{{_i}}For example, <code>&lt;section&gt;</code> should be wrapped as inline.{{/i}} </pre> <h2>Basic block</h2> @@ -464,7 +477,7 @@ <p>{{_i}}Add any of the following classes to the <code>.table</code> base class.{{/i}}</p> <h3><code>{{_i}}.table-striped{{/i}}</code></h3> - <p>{{_i}}Adds zebra-striping to any table row within the <code><tbody></code> via the <code>:nth-child</code> CSS selector (not available in IE7-IE8).{{/i}}</p> + <p>{{_i}}Adds zebra-striping to any table row within the <code><tbody></code> via the <code>:nth-child</code> CSS selector (not available in IE7-8).{{/i}}</p> <div class="bs-docs-example"> <table class="table table-striped"> <thead> @@ -1509,7 +1522,7 @@ </pre> <h3>{{_i}}Invalid inputs{{/i}}</h3> - <p>{{_i}}Style inputs via default browser functionality with <code>:invalid</code>. Specify a <code>type</code> and add the <code>required</code> attribute.{{/i}}</p> + <p>{{_i}}Style inputs via default browser functionality with <code>:invalid</code>. Specify a <code>type</code>, add the <code>required</code> attribute if the field is not optional, and (if applicable) specify a <code>pattern</code>.{{/i}}</p> <form class="bs-docs-example form-inline"> <input class="span3" type="email" placeholder="test@example.com" required> </form> @@ -1567,6 +1580,7 @@ <span class="help-inline">{{_i}}Something may have gone wrong{{/i}}</span> </div> </div> + <div class="control-group error"> <label class="control-label" for="inputError">{{_i}}Input with error{{/i}}</label> <div class="controls"> @@ -1574,6 +1588,15 @@ <span class="help-inline">{{_i}}Please correct the error{{/i}}</span> </div> </div> + +<div class="control-group info"> + <label class="control-label" for="inputInfo">{{_i}}Input with info{{/i}}</label> + <div class="controls"> + <input type="text" id="inputInfo"> + <span class="help-inline">{{_i}}Username is already taken{{/i}}</span> + </div> +</div> + <div class="control-group success"> <label class="control-label" for="inputSuccess">{{_i}}Input with success{{/i}}</label> <div class="controls"> @@ -1978,7 +2001,6 @@ <pre class="prettyprint linenums"> <div class="btn-toolbar"> <div class="btn-group"> - <a class="btn" href="#"><i class="icon-align-left"></i></a> <a class="btn" href="#"><i class="icon-align-center"></i></a> <a class="btn" href="#"><i class="icon-align-right"></i></a> diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache index 96896b5b3e07a4173ad4823e69652fbd63d1c4b7..53ab3d2a62b2fd79f5b7fb57a13cb2c69f1606ba 100644 --- a/docs/templates/pages/components.mustache +++ b/docs/templates/pages/components.mustache @@ -90,6 +90,25 @@ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dLabel"> ... </ul> +</pre> + + <h3>{{_i}}Disabled menu options{{/i}}</h3> + <p>{{_i}}Add <code>.disabled</code> to a <code><li></code> in the dropdown to disable the link.{{/i}}</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="#">{{_i}}Regular link{{/i}}</a></li> + <li class="disabled"><a tabindex="-1" href="#">{{_i}}Disabled link{{/i}}</a></li> + <li><a tabindex="-1" href="#">{{_i}}Another link{{/i}}</a></li> + </ul> + </div> + </div>{{! /example }} +<pre class="prettyprint linenums"> +<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> + <li><a tabindex="-1" href="#">{{_i}}Regular link{{/i}}</a></li> + <li class="disabled"><a tabindex="-1" href="#">{{_i}}Disabled link{{/i}}</a></li> + <li><a tabindex="-1" href="#">{{_i}}Another link{{/i}}</a></li> +</ul> </pre> <h3>{{_i}}Sub menus on dropdowns{{/i}}</h3> @@ -201,9 +220,9 @@ </div> <pre class="prettyprint linenums"> <div class="btn-group"> - <button class="btn">1</button> - <button class="btn">2</button> - <button class="btn">3</button> + <button class="btn">Left</button> + <button class="btn">Middle</button> + <button class="btn">Right</button> </div> </pre> @@ -2417,7 +2436,7 @@ <p><button class="close" style="float: none;">×</button></p> </div> <pre class="prettyprint linenums"><button class="close">&times;</button></pre> - <p>{{_i}}iOS devices require an href="#" for click events if you would rather use an anchor.{{/i}}</p> + <p>{{_i}}iOS devices require an <code>href="#"</code> for click events if you would rather use an anchor.{{/i}}</p> <pre class="prettyprint linenums"><a class="close" href="#">&times;</a></pre> <h2>{{_i}}Helper classes{{/i}}</h2> diff --git a/docs/templates/pages/extend.mustache b/docs/templates/pages/extend.mustache index c1976427cf0d2a966362ed5b30c6cb328fa07d83..b5c8d5747402ba6bd0e3557b3d83117648536ffb 100644 --- a/docs/templates/pages/extend.mustache +++ b/docs/templates/pages/extend.mustache @@ -65,16 +65,8 @@ <h2>{{_i}}Tools for compiling{{/i}}</h2> - <h3>{{_i}}Node with makefile{{/i}}</h3> - <p>{{_i}}Install the LESS command line compiler, JSHint, Recess, and uglify-js globally with npm by running the following command:{{/i}}</p> - <pre>$ npm install -g less jshint recess uglify-js</pre> - <p>{{_i}}Once installed just run <code>make</code> from the root of your bootstrap directory and you're all set.{{/i}}</p> - <p>{{_i}}Additionally, if you have <a href="https://github.com/mynyml/watchr">watchr</a> installed, you may run <code>make watch</code> to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).{{/i}}</p> - <h3>{{_i}}Command line{{/i}}</h3> - <p>{{_i}}Install the LESS command line tool via Node and run the following command:{{/i}}</p> - <pre>$ lessc ./less/bootstrap.less > bootstrap.css</pre> - <p>{{_i}}Be sure to include <code>--compress</code> in that command if you're trying to save some bytes!{{/i}}</p> + <p>{{_i}}Follow <a href="https://github.com/twitter/bootstrap#developers">the instructions in the project readme</a> on GitHub for compiling via command line.{{/i}}</p> <h3>{{_i}}JavaScript{{/i}}</h3> <p>{{_i}}<a href="http://lesscss.org/">Download the latest Less.js</a> and include the path to it (and Bootstrap) in the <code><head></code>.{{/i}}</p> diff --git a/docs/templates/pages/getting-started.mustache b/docs/templates/pages/getting-started.mustache index 2eec7ff7699a5fda90984051fdbf483d945d6dba..713d1d05ff493696e43838027164ce2406ab001f 100644 --- a/docs/templates/pages/getting-started.mustache +++ b/docs/templates/pages/getting-started.mustache @@ -127,7 +127,7 @@ <div class="page-header"> <h1>{{_i}}4. Basic HTML template{{/i}}</h1> </div> - <p class="lead">{{_i}}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>.{{/i}}</p> + <p class="lead">{{_i}}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>.{{/i}}</p> <p>{{_i}}Now, here's a look at a <strong>typical HTML file</strong>:{{/i}}</p> <pre class="prettyprint linenums"> <!DOCTYPE html> @@ -172,21 +172,21 @@ <ul class="thumbnails bootstrap-examples"> <li class="span3"> <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>{{_i}}Starter template{{/i}}</h4> <p>{{_i}}A barebones HTML document with all the Bootstrap CSS and JavaScript included.{{/i}}</p> </li> <li class="span3"> <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>{{_i}}Basic marketing site{{/i}}</h4> <p>{{_i}}Featuring a hero unit for a primary message and three supporting elements.{{/i}}</p> </li> <li class="span3"> <a class="thumbnail" href="examples/fluid.html"> - <img src="assets/img/examples/bootstrap-example-fluid.jpg" alt=""> + <img src="assets/img/examples/bootstrap-example-fluid.png" alt=""> </a> <h4>{{_i}}Fluid layout{{/i}}</h4> <p>{{_i}}Uses our new responsive, fluid grid system to create a seamless liquid layout.{{/i}}</p> @@ -199,6 +199,13 @@ <h4>{{_i}}Narrow marketing{{/i}}</h4> <p>{{_i}}Slim, lightweight marketing template for small projects or teams.{{/i}}</p> </li> + <li class="span3"> + <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> + </li> <li class="span3"> <a class="thumbnail" href="examples/signin.html"> <img src="assets/img/examples/bootstrap-example-signin.png" alt=""> @@ -206,6 +213,7 @@ <h4>{{_i}}Sign in{{/i}}</h4> <p>{{_i}}Barebones sign in form with custom, larger form controls and a flexible layout.{{/i}}</p> </li> + <li class="span3"> <a class="thumbnail" href="examples/sticky-footer.html"> <img src="assets/img/examples/bootstrap-example-sticky-footer.png" alt=""> @@ -213,7 +221,6 @@ <h4>{{_i}}Sticky footer{{/i}}</h4> <p>{{_i}}Pin a fixed-height footer to the bottom of the user's viewport.{{/i}}</p> </li> - <li class="span3"> <a class="thumbnail" href="examples/carousel.html"> <img src="assets/img/examples/bootstrap-example-carousel.png" alt=""> diff --git a/docs/templates/pages/index.mustache b/docs/templates/pages/index.mustache index c46784494bb574a60676ed69132e2bde240891ab..b38ddec2549adeb7f7606fd05de6748a88e27443 100644 --- a/docs/templates/pages/index.mustache +++ b/docs/templates/pages/index.mustache @@ -3,7 +3,7 @@ <h1>{{_i}}Bootstrap{{/i}}</h1> <p>{{_i}}Sleek, intuitive, and powerful front-end framework for faster and easier web development.{{/i}}</p> <p> - <a href="assets/bootstrap.zip" class="btn btn-primary btn-large" {{#production}}onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Download', 'Download 2.2.2']);"{{/production}}>{{_i}}Download Bootstrap{{/i}}</a> + <a href="assets/bootstrap.zip" class="btn btn-primary btn-large" {{#production}}onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Download', 'Download 2.3.0']);"{{/production}}>{{_i}}Download Bootstrap{{/i}}</a> </p> <ul class="masthead-links"> <li> @@ -16,7 +16,7 @@ <a href="./extend.html" {{#production}}onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Extend']);"{{/production}}>{{_i}}Extend{{/i}}</a> </li> <li> - {{_i}}Version 2.2.2{{/i}} + {{_i}}Version 2.3.0{{/i}} </li> </ul> </div> diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index e6b3f812a76ad4b433a6335918985685b560e57f..9a08a50b3adf8eff9a043f4c1691c06f2843b850 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -90,7 +90,7 @@ $('#myModal').on('show', function (e) { <h1>{{_i}}Transitions{{/i}} <small>bootstrap-transition.js</small></h1> </div> <h3>{{_i}}About transitions{{/i}}</h3> - <p>{{_i}}For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.{{/i}}</p> + <p>{{_i}}For simple transition effects, include <strong>bootstrap-transition.js</strong> once alongside the other JS files. If you're using the compiled (or minified) <strong>bootstrap.js</strong>, there is no need to include this—it's already there.{{/i}}</p> <h3>{{_i}}Use cases{{/i}}</h3> <p>{{_i}}A few examples of the transition plugin:{{/i}}</p> <ul> @@ -335,21 +335,21 @@ $('#myModal').on('hidden', function () { <li class="dropdown"> <a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">{{_i}}Dropdown{{/i}} <b class="caret"></b></a> <ul class="dropdown-menu" role="menu" aria-labelledby="drop1"> - <li><a tabindex="-1" href="http://google.com">{{_i}}Action{{/i}}</a></li> - <li><a tabindex="-1" href="#anotherAction">{{_i}}Another action{{/i}}</a></li> - <li><a tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a tabindex="-1" href="#">{{_i}}Separated link{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="http://google.com">{{_i}}Action{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#anotherAction">{{_i}}Another action{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> + <li role="presentation" class="divider"></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Separated link{{/i}}</a></li> </ul> </li> <li class="dropdown"> <a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">{{_i}}Dropdown 2 {{/i}}<b class="caret"></b></a> <ul class="dropdown-menu" role="menu" aria-labelledby="drop2"> - <li><a tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li> - <li><a tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li> - <li><a tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a tabindex="-1" href="#">{{_i}}Separated link{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> + <li role="presentation" class="divider"></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Separated link{{/i}}</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">{{_i}}Dropdown 3{{/i}} <b class="caret"></b></a> <ul class="dropdown-menu" role="menu" aria-labelledby="drop3"> - <li><a tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li> - <li><a tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li> - <li><a tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a tabindex="-1" href="#">{{_i}}Separated link{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> + <li role="presentation" class="divider"></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Separated link{{/i}}</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="#">{{_i}}Dropdown{{/i}} <b class="caret"></b></a> <ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4"> - <li><a tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li> - <li><a tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li> - <li><a tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a tabindex="-1" href="#">{{_i}}Separated link{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> + <li role="presentation" class="divider"></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Separated link{{/i}}</a></li> </ul> </li> <li class="dropdown"> <a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">{{_i}}Dropdown 2{{/i}} <b class="caret"></b></a> <ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5"> - <li><a tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li> - <li><a tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li> - <li><a tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a tabindex="-1" href="#">{{_i}}Separated link{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> + <li role="presentation" class="divider"></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Separated link{{/i}}</a></li> </ul> </li> <li class="dropdown"> <a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">{{_i}}Dropdown 3{{/i}} <b class="caret"></b></a> <ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop5"> - <li><a tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li> - <li><a tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li> - <li><a tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> - <li class="divider"></li> - <li><a tabindex="-1" href="#">{{_i}}Separated link{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> + <li role="presentation" class="divider"></li> + <li role="presentation"><a role="menuitem" tabindex="-1" href="#">{{_i}}Separated link{{/i}}</a></li> </ul> </li> </ul> <!-- /tabs --> @@ -697,19 +697,20 @@ $('a[data-toggle="tab"]').on('shown', function (e) { <h2>{{_i}}Examples{{/i}}</h2> <p>{{_i}}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.{{/i}}</p> + <p>{{_i}}For performance reasons, the tooltip and popover data-apis are opt in, meaning <strong>you must initialize them yourself</strong>.{{/i}}</p> <p>{{_i}}Hover over the links below to see tooltips:{{/i}}</p> <div class="bs-docs-example tooltip-demo"> - <p class="muted" style="margin-bottom: 0;">{{_i}}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.{{/i}} + <p class="muted" style="margin-bottom: 0;">{{_i}}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="A much longer tooltip belongs right here to demonstrate the max-width we apply.">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.{{/i}} </p> </div>{{! /example }} <h3>{{_i}}Four directions{{/i}}</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 }} @@ -747,7 +748,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) { </tr> <tr> <td>{{_i}}placement{{/i}}</td> - <td>{{_i}}string|function{{/i}}</td> + <td>{{_i}}string | function{{/i}}</td> <td>'top'</td> <td>{{_i}}how to position the tooltip{{/i}} - top | bottom | left | right</td> </tr> @@ -766,8 +767,8 @@ $('a[data-toggle="tab"]').on('shown', function (e) { <tr> <td>{{_i}}trigger{{/i}}</td> <td>{{_i}}string{{/i}}</td> - <td>'hover'</td> - <td>{{_i}}how tooltip is triggered{{/i}} - click | hover | focus | manual</td> + <td>'hover focus'</td> + <td>{{_i}}how tooltip is triggered{{/i}} - click | hover | focus | manual. {{_i}}Note you case pass trigger mutliple, space seperated, trigger types.{{/i}}</td> </tr> <tr> <td>{{_i}}delay{{/i}}</td> @@ -779,6 +780,14 @@ $('a[data-toggle="tab"]').on('shown', function (e) { <p>{{_i}}Object structure is: <code>delay: { show: 500, hide: 100 }</code>{{/i}}</p> </td> </tr> + <tr> + <td>{{_i}}container{{/i}}</td> + <td>{{_i}}string | false{{/i}}</td> + <td>{{_i}}false{{/i}}</td> + <td> + <p>{{_i}}Appends the tooltip to a specific element <code>container: 'body'</code>{{/i}}</p> + </td> + </tr> </tbody> </table> <div class="alert alert-info"> @@ -787,8 +796,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) { </div> <h3>{{_i}}Markup{{/i}}</h3> - <p>{{_i}}For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.{{/i}}</p> - <pre class="prettyprint linenums"><a href="#" rel="tooltip" title="{{_i}}first tooltip{{/i}}">{{_i}}hover over me{{/i}}</a></pre> + <pre class="prettyprint linenums"><a href="#" data-toggle="tooltip" title="{{_i}}first tooltip{{/i}}">{{_i}}hover over me{{/i}}</a></pre> <h3>{{_i}}Methods{{/i}}</h3> <h4>$().tooltip({{_i}}options{{/i}})</h4> @@ -860,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?">{{_i}}Click to toggle popover{{/i}}</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?">{{_i}}Click to toggle popover{{/i}}</a> </div> <h4>{{_i}}Four directions{{/i}}</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 }} @@ -907,7 +915,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) { </tr> <tr> <td>{{_i}}placement{{/i}}</td> - <td>{{_i}}string|function{{/i}}</td> + <td>{{_i}}string | function{{/i}}</td> <td>'right'</td> <td>{{_i}}how to position the popover{{/i}} - top | bottom | left | right</td> </tr> @@ -945,6 +953,14 @@ $('a[data-toggle="tab"]').on('shown', function (e) { <p>{{_i}}Object structure is: <code>delay: { show: 500, hide: 100 }</code>{{/i}}</p> </td> </tr> + <tr> + <td>{{_i}}container{{/i}}</td> + <td>{{_i}}string | false{{/i}}</td> + <td>{{_i}}false{{/i}}</td> + <td> + <p>{{_i}}Appends the popover to a specific element <code>container: 'body'</code>{{/i}}</p> + </td> + </tr> </tbody> </table> <div class="alert alert-info"> @@ -1352,6 +1368,11 @@ $('#myCollapsible').on('hidden', function () { <p>{{_i}}The slideshow below shows a generic plugin and component for cycling through elements like a carousel.{{/i}}</p> <div class="bs-docs-example"> <div id="myCarousel" class="carousel slide"> + <ol class="carousel-indicators"> + <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"> <img src="assets/img/bootstrap-mdo-sfmoma-01.jpg" alt=""> @@ -1381,6 +1402,11 @@ $('#myCollapsible').on('hidden', function () { </div>{{! /example }} <pre class="prettyprint linenums"> <div id="myCarousel" class="carousel slide"> + <ol class="carousel-indicators"> + <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> <!-- {{_i}}Carousel items{{/i}} --> <div class="carousel-inner"> <div class="active item">…</div> @@ -1405,14 +1431,14 @@ $('#myCollapsible').on('hidden', function () { <h2>{{_i}}Usage{{/i}}</h2> <h3>{{_i}}Via data attributes{{/i}}</h3> - <p>{{_i}}...{{/i}}</p> + <p>{{_i}}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>.{{/i}}</p> <h3>{{_i}}Via JavaScript{{/i}}</h3> <p>{{_i}}Call carousel manually with:{{/i}}</p> <pre class="prettyprint linenums">$('.carousel').carousel()</pre> <h3>{{_i}}Options{{/i}}</h3> - <p>{{_i}}Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-interval=""</code>.{{/i}}</p> + <p>{{_i}}Options can be passed via data attributes or JavaScriptz. For data attributes, append the option name to <code>data-</code>, as in <code>data-interval=""</code>.{{/i}}</p> <table class="table table-bordered table-striped"> <thead> <tr> @@ -1495,7 +1521,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"><input type="text" data-provide="typeahead"></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"> @@ -1601,14 +1627,6 @@ $('.carousel').carousel({ <p>{{_i}}Call the affix plugin via JavaScript:{{/i}}</p> <pre class="prettyprint linenums">$('#navbar').affix()</pre> - <h3>{{_i}}Methods{{/i}}</h3> - <h4>.affix('refresh')</h4> - <p>{{_i}}When using affix in conjunction with adding or removing of elements from the DOM, you'll want to call the refresh method:{{/i}}</p> -<pre class="prettyprint linenums"> -$('[data-spy="affix"]').each(function () { - $(this).affix('refresh') -}); -</pre> <h3>{{_i}}Options{{/i}}</h3> <p>{{_i}}Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-offset-top="200"</code>.{{/i}}</p> <table class="table table-bordered table-striped"> diff --git a/js/bootstrap-affix.js b/js/bootstrap-affix.js index 6020a19a58ef354f50b374a6732792fa6643c633..7595fdb06771c324e1c3e0a166fdeafa1933e0f5 100644 --- a/js/bootstrap-affix.js +++ b/js/bootstrap-affix.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-affix.js v2.2.2 + * bootstrap-affix.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#affix * ========================================================== * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-alert.js b/js/bootstrap-alert.js index 5bc02644910f5ecca11574d4fe270822b77bdd59..b5627984e4ca3b49ae63943aa9f0204c266c65af 100644 --- a/js/bootstrap-alert.js +++ b/js/bootstrap-alert.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-alert.js v2.2.2 + * bootstrap-alert.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#alerts * ========================================================== * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-button.js b/js/bootstrap-button.js index 39b83399e9796e6751aa2331b54fd42dfe4a9b30..045927b6ba732ada14dbf5c0ec296623b37a5121 100644 --- a/js/bootstrap-button.js +++ b/js/bootstrap-button.js @@ -1,5 +1,5 @@ /* ============================================================ - * bootstrap-button.js v2.2.2 + * bootstrap-button.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#buttons * ============================================================ * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 238ff42801847d96ba51767e6161094d91f7cab5..5d14e7c7115e5d1ecb6dccb6ac827427ab62ed4d 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-carousel.js v2.2.2 + * bootstrap-carousel.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#carousel * ========================================================== * Copyright 2012 Twitter, Inc. @@ -28,6 +28,7 @@ var Carousel = function (element, options) { this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') this.options = options this.options.pause == 'hover' && this.$element .on('mouseenter', $.proxy(this.pause, this)) @@ -44,13 +45,17 @@ return this } + , getActiveIndex: function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + return this.$items.index(this.$active) + } + , to: function (pos) { - var $active = this.$element.find('.item.active') - , children = $active.parent().children() - , activePos = children.index($active) + var activeIndex = this.getActiveIndex() , that = this - if (pos > (children.length - 1) || pos < 0) return + if (pos > (this.$items.length - 1) || pos < 0) return if (this.sliding) { return this.$element.one('slid', function () { @@ -58,11 +63,11 @@ }) } - if (activePos == pos) { + if (activeIndex == pos) { return this.pause().cycle() } - return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) } , pause: function (e) { @@ -103,10 +108,19 @@ e = $.Event('slide', { relatedTarget: $next[0] + , direction: direction }) if ($next.hasClass('active')) return + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) + } + if ($.support.transition && this.$element.hasClass('slide')) { this.$element.trigger(e) if (e.isDefaultPrevented()) return @@ -151,7 +165,7 @@ if (!data) $this.data('carousel', (data = new Carousel(this, options))) if (typeof option == 'number') data.to(option) else if (action) data[action]() - else if (options.interval) data.cycle() + else if (options.interval) data.pause().cycle() }) } @@ -174,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 6ac0191a50a6664b54d69188fc0808daaaea1ddf..20b2eb90a82825607de71294a1b763a7b9633e8b 100644 --- a/js/bootstrap-collapse.js +++ b/js/bootstrap-collapse.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-collapse.js v2.2.2 + * bootstrap-collapse.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#collapse * ============================================================= * Copyright 2012 Twitter, Inc. @@ -52,7 +52,7 @@ , actives , hasData - if (this.transitioning) return + if (this.transitioning || this.$element.hasClass('in')) return dimension = this.dimension() scroll = $.camelCase(['scroll', dimension].join('-')) @@ -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 900355d5bd11b9a04cec5871fd6b0fbd59fff047..b8c5852830f33e9bbe23fdf259829faf8035d7a9 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -1,5 +1,5 @@ /* ============================================================ - * bootstrap-dropdown.js v2.2.2 + * bootstrap-dropdown.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#dropdowns * ============================================================ * Copyright 2012 Twitter, Inc. @@ -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) @@ -115,8 +118,9 @@ selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } - $parent = $(selector) - $parent.length || ($parent = $this.parent()) + $parent = selector && $(selector) + + if (!$parent || !$parent.length) $parent = $this.parent() return $parent } @@ -153,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-modal.js b/js/bootstrap-modal.js index 689a414ed6079afa839e8c96c937480c23dddb51..3596c8d4c2b94ece5dd7827b7a7e59fe5d48b377 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -1,5 +1,5 @@ /* ========================================================= - * bootstrap-modal.js v2.2.2 + * bootstrap-modal.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#modals * ========================================================= * Copyright 2012 Twitter, Inc. @@ -60,8 +60,7 @@ that.$element.appendTo(document.body) //don't move modals dom position } - that.$element - .show() + that.$element.show() if (transition) { that.$element[0].offsetWidth // force reflow diff --git a/js/bootstrap-popover.js b/js/bootstrap-popover.js index 1a4f532aa8ce69291feb703117fa3cffe7ec5ca9..624eb5e31a97dcf361763a1bd0f0aa465da67735 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 07a5c3a5842a30cc41e05da8e99c835152c03063..dff9a3b37518c2ccf6f0fbe23b327860cb6fee08 100644 --- a/js/bootstrap-scrollspy.js +++ b/js/bootstrap-scrollspy.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-scrollspy.js v2.2.2 + * bootstrap-scrollspy.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#scrollspy * ============================================================= * Copyright 2012 Twitter, Inc. @@ -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-tab.js b/js/bootstrap-tab.js index 84d4834a23b6412e303c6d60d2ed8e81e37b9a79..bd77eb5c358074801f20de0f46b1e2e9d1b1247b 100644 --- a/js/bootstrap-tab.js +++ b/js/bootstrap-tab.js @@ -1,5 +1,5 @@ /* ======================================================== - * bootstrap-tab.js v2.2.2 + * bootstrap-tab.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#tabs * ======================================================== * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index a08952a4cfdc03a5907f2a4b5b7f77ddccb13581..c23d8267a8e7962bf0f4e0808646e6c2e3b3eaf7 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -1,5 +1,5 @@ /* =========================================================== - * bootstrap-tooltip.js v2.2.2 + * bootstrap-tooltip.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#tooltips * Inspired by the original jQuery.tipsy by Jason Frame * =========================================================== @@ -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 ? @@ -97,14 +105,16 @@ , show: function () { var $tip - , inside , pos , actualWidth , actualHeight , placement , tp + , e = $.Event('show') if (this.hasContent() && this.enabled) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return $tip = this.tip() this.setContent() @@ -116,19 +126,18 @@ this.options.placement.call(this, $tip[0], this.$element[0]) : this.options.placement - inside = /in/.test(placement) - $tip .detach() .css({ top: 0, left: 0, display: 'block' }) - .insertAfter(this.$element) - pos = this.getPosition(inside) + this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) + + pos = this.getPosition() actualWidth = $tip[0].offsetWidth actualHeight = $tip[0].offsetHeight - switch (inside ? placement.split(' ')[1] : placement) { + switch (placement) { case 'bottom': tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} break @@ -147,6 +156,8 @@ .offset(tp) .addClass(placement) .addClass('in') + + this.$element.trigger('shown') } } @@ -161,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') @@ -179,6 +194,8 @@ removeWithAnimation() : $tip.detach() + this.$element.trigger('hidden') + return this } @@ -193,11 +210,12 @@ return this.getTitle() } - , getPosition: function (inside) { - return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { - width: this.$element[0].offsetWidth - , height: this.$element[0].offsetHeight - }) + , getPosition: function () { + var el = this.$element[0] + return $.extend({}, el.getBoundingClientRect ? el.getBoundingClientRect() : { + width: el.offsetWidth + , height: el.offsetHeight + }, this.$element.offset()) } , getTitle: function () { @@ -236,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 () { @@ -269,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 } @@ -284,4 +303,4 @@ return this } -}(window.jQuery); \ No newline at end of file +}(window.jQuery); diff --git a/js/bootstrap-transition.js b/js/bootstrap-transition.js index b0f12c26d328df0f38780ef197c6e8d337624e34..64f275778094043dc871f94ceacadbe7f74f9734 100644 --- a/js/bootstrap-transition.js +++ b/js/bootstrap-transition.js @@ -1,5 +1,5 @@ /* =================================================== - * bootstrap-transition.js v2.2.2 + * bootstrap-transition.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#transitions * =================================================== * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js index 088e7ce9b90fb5ebf824acbf65e095e6c65f4bc6..5d95fd625657a53108710f171dae71aad18c28ba 100644 --- a/js/bootstrap-typeahead.js +++ b/js/bootstrap-typeahead.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-typeahead.js v2.2.2 + * bootstrap-typeahead.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#typeahead * ============================================================= * Copyright 2012 Twitter, Inc. @@ -172,6 +172,7 @@ , listen: function () { this.$element + .on('focus', $.proxy(this.focus, this)) .on('blur', $.proxy(this.blur, this)) .on('keypress', $.proxy(this.keypress, this)) .on('keyup', $.proxy(this.keyup, this)) @@ -183,6 +184,7 @@ this.$menu .on('click', $.proxy(this.click, this)) .on('mouseenter', 'li', $.proxy(this.mouseenter, this)) + .on('mouseleave', 'li', $.proxy(this.mouseleave, this)) } , eventSupported: function(eventName) { @@ -256,22 +258,33 @@ e.preventDefault() } + , focus: function (e) { + this.focused = true + } + , blur: function (e) { - var that = this - setTimeout(function () { that.hide() }, 150) + this.focused = false + if (!this.mousedover && this.shown) this.hide() } , click: function (e) { e.stopPropagation() e.preventDefault() this.select() + this.$element.focus() } , mouseenter: function (e) { + this.mousedover = true this.$menu.find('.active').removeClass('active') $(e.currentTarget).addClass('active') } + , mouseleave: function (e) { + this.mousedover = false + if (!this.focused && this.shown) this.hide() + } + } diff --git a/js/tests/unit/bootstrap-carousel.js b/js/tests/unit/bootstrap-carousel.js index 13b8f721fcf5d8be5381a98052b336628fec6592..80b6e139b6ef6e367c8be154cc77412cb34b1eaf 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">‹</a><a class="right carousel-control" href="#myCarousel" data-slide="next">›</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">‹</a><a class="right carousel-control" href="#myCarousel" data-slide="next">›</a></div>' $.support.transition = false diff --git a/js/tests/unit/bootstrap-tooltip.js b/js/tests/unit/bootstrap-tooltip.js index ba51347433ffaa12bfbaad5023fd71865089e390..ef21bd96b47764ed333c04358346eaabd47c1184 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 4bdbce97091d43404d6fcaed0c349bdb7d134b54..0aa2d61b17ecef4b8ede26c6d45d2a34b8d1f80b 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/bootstrap.less b/less/bootstrap.less index bc6ea19316fd56e6d4ee4df12f9bc13d6687b58a..47af2c4e4499680d963c987b46b5975df39743a4 100644 --- a/less/bootstrap.less +++ b/less/bootstrap.less @@ -1,5 +1,5 @@ /*! - * Bootstrap v2.2.2 + * Bootstrap v2.3.0 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 @@ -8,13 +8,13 @@ * Designed and built with all the love in the world @twitter by @mdo and @fat. */ -// CSS Reset -@import "reset.less"; - // Core variables and mixins @import "variables.less"; // Modify this for custom colors, font-sizes, etc @import "mixins.less"; +// CSS Reset +@import "reset.less"; + // Grid system and page structure @import "scaffolding.less"; @import "grid.less"; diff --git a/less/button-groups.less b/less/button-groups.less index d6054c8085d96b4c6c8b2924e3fef680d7fe9b8f..55cdc6033873f2eb3d8de17fcac6ae45a0880e30 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -164,8 +164,6 @@ margin-left: 0; } // Carets in other button sizes -.btn-mini .caret, -.btn-small .caret, .btn-large .caret { margin-top: 6px; } @@ -174,6 +172,10 @@ border-right-width: 5px; border-top-width: 5px; } +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} // Upside down carets for .dropup .dropup .btn-large .caret { border-bottom-width: 5px; diff --git a/less/buttons.less b/less/buttons.less index 6f565b73c211ed699e16dc66ae5c1dfdf483f94d..71865a7480d6c0e589f6770ef06779daa088ed39 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -141,11 +141,6 @@ input[type="button"] { // Set the backgrounds // ------------------------- -.btn { - // reset here as of 2.0.3 due to Recess property order - border-color: #c5c5c5; - border-color: rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25); -} .btn-primary { .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight); } diff --git a/less/carousel.less b/less/carousel.less index 2dc0506032e13bc30acc3bd6fffcf8d9efdd4ff0..b321e5bb5a0f9e72ccd7489266d5bdd9a3865c67 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -105,6 +105,31 @@ } } +// Carousel indicator pips +// ----------------------------- +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; + + li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255,255,255,.25); + border-radius: 5px; + } + .active { + background-color: #fff; + } +} // Caption for text below images // ----------------------------- diff --git a/less/dropdowns.less b/less/dropdowns.less index 484bd3dda33c05d6d5b96ba9f38e01d1f8a2b3a9..a0d4b1fd0c14a4bad2740c01bf0f302af9dbc58f 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -72,7 +72,7 @@ } // Links within the dropdown menu - li > a { + > li > a { display: block; padding: 3px 20px; clear: both; @@ -85,8 +85,8 @@ // Hover state // ----------- -.dropdown-menu li > a:hover, -.dropdown-menu li > a:focus, +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, .dropdown-submenu:hover > a { text-decoration: none; color: @dropdownLinkColorHover; @@ -95,8 +95,8 @@ // Active state // ------------ -.dropdown-menu .active > a, -.dropdown-menu .active > a:hover { +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover { color: @dropdownLinkColorActive; text-decoration: none; outline: 0; @@ -106,12 +106,12 @@ // Disabled state // -------------- // Gray out text and ensure the hover state remains gray -.dropdown-menu .disabled > a, -.dropdown-menu .disabled > a:hover { +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover { color: @grayLight; } // Nuke hover effects -.dropdown-menu .disabled > a:hover { +.dropdown-menu > .disabled > a:hover { text-decoration: none; background-color: transparent; background-image: none; // Remove CSS gradient diff --git a/less/forms.less b/less/forms.less index 2dff2291914d62d80057fdfa161793b580fedfcc..8083dec97be8c9a7c9db18849d0398b069f458bb 100644 --- a/less/forms.less +++ b/less/forms.less @@ -172,9 +172,10 @@ select[size] { height: auto; } -// Focus for select, file, radio, and checkbox +// Focus for select, file, image, radio, and checkbox select:focus, input[type="file"]:focus, +input[type="image"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { .tab-focus(); @@ -422,7 +423,9 @@ select:focus:invalid { // Allow us to put symbols and text within the input field for a cleaner look .input-append, .input-prepend { - margin-bottom: 5px; + display: inline-block; + margin-bottom: @baseLineHeight / 2; + vertical-align: middle; font-size: 0; // white space collapse hack white-space: nowrap; // Prevent span and input from separating @@ -430,7 +433,8 @@ select:focus:invalid { input, select, .uneditable-input, - .dropdown-menu { + .dropdown-menu, + .popover { font-size: @baseFontSize; } diff --git a/less/media.less b/less/media.less index 1decab71dec968d5105e541b35b94b9f3887ec0e..e461e446d2319ca1c81af5253136b7b21a142f46 100644 --- a/less/media.less +++ b/less/media.less @@ -37,10 +37,10 @@ // Media image alignment // ------------------------- -.media .pull-left { +.media > .pull-left { margin-right: 10px; } -.media .pull-right { +.media > .pull-right { margin-left: 10px; } diff --git a/less/mixins.less b/less/mixins.less index b734bab2dc4c589dad2492b73107b960c2fdd3f6..4b09bea4cd2d7c6145b550199d02942793aa9721 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -268,6 +268,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 b292b72bb0117b88f309b393b5a1857573441d8c..cfbc30a6e69af94b0242e794381da5f620d4e70c 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -95,7 +95,9 @@ } .navbar .btn-group .btn, .navbar .input-prepend .btn, -.navbar .input-append .btn { +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { margin-top: 0; // then undo the margin here so we don't accidentally double it } @@ -245,7 +247,6 @@ } .navbar .nav .dropdown-toggle .caret { margin-top: 8px; - } // Hover @@ -337,8 +338,8 @@ // Caret should match text color on hover .navbar .nav li.dropdown > a:hover .caret { - border-top-color: @navbarLinkColorActive; - border-bottom-color: @navbarLinkColorActive; + border-top-color: @navbarLinkColorHover; + border-bottom-color: @navbarLinkColorHover; } // Remove background color from open dropdown diff --git a/less/popovers.less b/less/popovers.less index b5b2a7eb59a6563eb85641c39243670424a3a170..aae35c8cd56d92111f74456019abf10a749b6dc2 100644 --- a/less/popovers.less +++ b/less/popovers.less @@ -9,7 +9,7 @@ left: 0; z-index: @zindexPopover; display: none; - width: 236px; + max-width: 276px; padding: 1px; text-align: left; // Reset given new insertion method background-color: @popoverBackground; @@ -40,6 +40,10 @@ background-color: @popoverTitleBackground; border-bottom: 1px solid darken(@popoverTitleBackground, 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 1d5c1239c99f889bb0b38d95fcd14ee9694d4e38..128f4ce30dae7f63a417a4e5e8ced310943c0dce 100644 --- a/less/responsive-767px-max.less +++ b/less/responsive-767px-max.less @@ -72,8 +72,8 @@ .box-sizing(border-box); } .row-fluid [class*="offset"]:first-child { - margin-left: 0; - } + margin-left: 0; + } // FORM FIELDS // ----------- diff --git a/less/responsive-utilities.less b/less/responsive-utilities.less index 2c3f6c15fe2e55e2d0ec43f3a4c81667601f96b4..1ed1a13696d63470e1e551593e3b7d0f92f2022e 100644 --- a/less/responsive-utilities.less +++ b/less/responsive-utilities.less @@ -3,6 +3,13 @@ // -------------------------------------------------- +// IE10 Metro responsive +// Required for Windows 8 Metro split-screen snapping with IE10 +// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/ +@-ms-viewport{ + width: device-width; +} + // Hide from screenreaders and browsers // Credit: HTML5 Boilerplate .hidden { diff --git a/less/responsive.less b/less/responsive.less index 7cfaf80b9e26f7ee7a6884c18c6c6f90919924ed..df63340688d66793178837e468656f9040b48089 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -1,5 +1,5 @@ /*! - * Bootstrap Responsive v2.2.2 + * Bootstrap Responsive v2.3.0 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 @@ -14,15 +14,6 @@ // ------------------------------------------------------------- -// IE10 Metro responsive -// Required for Windows 8 Metro split-screen snapping with IE10 -// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/ - -@-ms-viewport{ - width: device-width; -} - - // REPEAT VARIABLES & MIXINS // ------------------------- // Required since we compile the responsive stuff separately diff --git a/less/tables.less b/less/tables.less index f3b9967f07b61d9f72605c55464de586968562b7..0e35271e11fe5e0ad3d9e547d5cb56454e616719 100644 --- a/less/tables.less +++ b/less/tables.less @@ -93,24 +93,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(@baseBorderRadius); } + // 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(@baseBorderRadius); } - // 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(@baseBorderRadius); } + // 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(@baseBorderRadius); } @@ -122,7 +130,6 @@ table { .border-bottom-right-radius(0); } - // Special fixes to round the left border on the first td/th caption + thead tr:first-child th:first-child, caption + tbody tr:first-child td:first-child, @@ -161,8 +168,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: @tableBackgroundHover; } } @@ -206,32 +213,32 @@ table th[class*="span"], // Exact selectors below required to override .table-striped .table tbody tr { - &.success td { + &.success > td { background-color: @successBackground; } - &.error td { + &.error > td { background-color: @errorBackground; } - &.warning td { + &.warning > td { background-color: @warningBackground; } - &.info td { + &.info > td { background-color: @infoBackground; } } // Hover states for .table-hover .table-hover tbody tr { - &.success:hover td { + &.success:hover > td { background-color: darken(@successBackground, 5%); } - &.error:hover td { + &.error:hover > td { background-color: darken(@errorBackground, 5%); } - &.warning:hover td { + &.warning:hover > td { background-color: darken(@warningBackground, 5%); } - &.info:hover td { + &.info:hover > td { background-color: darken(@infoBackground, 5%); } } diff --git a/less/tooltip.less b/less/tooltip.less index 93fac8d6b2ebe7d62279d93a416ace9d00a565ef..59b02cd4314c82b75225a105bf23741b9470de84 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(80); } &.top { margin-top: -3px; } @@ -22,7 +23,7 @@ // Wrapper for the tooltip content .tooltip-inner { max-width: 200px; - padding: 3px 8px; + padding: 8px; color: @tooltipColor; text-align: center; text-decoration: none; diff --git a/less/type.less b/less/type.less index 683a30772614fba24b221439ea45dc959bfd346d..9afff93ac50dabb4f5725d55a0d9f61641f2cd76 100644 --- a/less/type.less +++ b/less/type.less @@ -43,6 +43,10 @@ a.text-info:hover { color: darken(@infoText, 10%); } .text-success { color: @successText; } a.text-success:hover { color: darken(@successText, 10%); } +.text-left { text-align: left; } +.text-right { text-align: right; } +.text-center { text-align: center; } + // Headings // ------------------------- @@ -119,7 +123,7 @@ ul.inline, ol.inline { margin-left: 0; list-style: none; - & > li { + > li { display: inline-block; padding-left: 5px; padding-right: 5px; @@ -185,7 +189,9 @@ blockquote { border-left: 5px solid @grayLighter; p { margin-bottom: 0; - #font > .shorthand(16px,300,@baseLineHeight * 1.25); + font-size: @baseFontSize * 1.25; + font-weight: 300; + line-height: 1.25; } small { display: block; diff --git a/less/variables.less b/less/variables.less index de36074fd9f41190da24130c0ce3f9f4a3321205..31c131b1e237771b333012f6ee36b1a475b78cea 100644 --- a/less/variables.less +++ b/less/variables.less @@ -86,7 +86,7 @@ // ------------------------- @btnBackground: @white; @btnBackgroundHighlight: darken(@white, 10%); -@btnBorder: #bbb; +@btnBorder: #ccc; @btnPrimaryBackground: @linkColor; @btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 20%); diff --git a/package.json b/package.json index c81e3f127ad190e736954c60084ab8702d09b682..26e51cbcef02ed55b3c69fce5b56143780ac8828 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bootstrap" , "description": "Sleek, intuitive, and powerful front-end framework for faster and easier web development." - , "version": "2.2.2" + , "version": "2.3.0" , "keywords": ["bootstrap", "css"] , "homepage": "http://twitter.github.com/bootstrap/" , "author": "Twitter Inc." @@ -17,10 +17,10 @@ } ] , "devDependencies": { - "uglify-js": "1.2.6" - , "jshint": "0.6.1" + "uglify-js": "1.3.4" + , "jshint": "0.9.1" , "recess": "1.0.3" , "connect": "2.1.3" , "hogan.js": "2.0.0" } -} \ No newline at end of file +}