diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000000..68e2850bb92b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,350 @@ +## 2.3.0 (February 7, 2013) + +Minor release to add carousel indicators, improve tooltips, improve dev setup, and fix hella bugs. + +- **Repository changes:** + - **Local instead of global dependencies** for our makefile and install process. Now getting started is way easier—just run `npm install`. + - Upgraded to jQuery 1.9. No changes were needed, but we did upgrade the included jQuery file to the latest release. + - Moved changelog to be within the repo instead of as a wiki page. +- **New and improved features:** + - **Added carousel indicators!** Add the HTML and it automagically works. + - **Added `container` option to tooltips.** The default option is still `insertAfter`, but now you may specify where to insert tooltips (and by extension, popovers) with the optional container parameter. + - Improved popovers now utilize `max-width` instead of `width`, have been widened from 240px to 280px, and will automatically hide the title if one has not been set via CSS `:empty` selector. + - Improved tooltip alignment on edges with [#6713](https://github.com/twitter/bootstrap/pull/6713). + - **Improved accessibility for links in all components.** After merging [#6441](https://github.com/twitter/bootstrap/pull/6441), link hover states now apply to the `:focus` state as well. This goes for basic `` tags, as well as buttons, navs, dropdowns, and more. + - Added print utility classes to show and hide content between `screen` and `print` via CSS. + - Updated input groups to make them behave more like default form controls. Added `display: inline-block;`, increased `margin-bottom`, and added `vertical-align: middle;` to match `` styles. + - Added `.horizontal-three-colors()` gradient mixin (with example in the CSS tests file). + - Added `.text-left`, `.text-center`, and `.text-right` utility classes for easy typographic alignment. + - Added `@ms-viewport` so IE10 can use responsive CSS when in split-screen mode. +- **Docs changes:** + - Added [new justified navigation example](https://f.cloud.github.com/assets/98681/25869/5e2f812c-4afa-11e2-9293-501cd689232d.png). + - Added sticky footer with fixed navbar example. + +See more on the [2.3.0 pull request](https://github.com/twitter/bootstrap/pull/6346). + + +## 2.2.2 (December 8, 2012) + +Bugfix release addressing docs, CSS, and some JavaScript issues. Key changes include: + +- **Docs:** + - Assets (illustrations and examples) are now retina-ready. + - Replaced [Placehold.it](http://placehold.it) with [Holder.js](http://imsky.github.com/holder/), a client-side and retina-ready placeholder image tool. +- **Dropdowns:** Temporary fix added for dropdowns on mobile to prevent them from closing early. +- **Popovers:** + - No longer inherits `font-size: 0;` when placed in button groups. + - Arrows refactored to work in IE8, and use less code. + - Plugin no longer inserts popover content into a `

`, but rather directly into `.popover-content`. +- **Labels and badges:** Now [automatically collapse](https://github.com/twitter/bootstrap/commit/ead5dbeba5cd7acfa560bfb353f5e7c4f4a19256) if they have no content. +- **Tables:** Nesting support with `.table-bordered` and `.table-striped` greatly improved. +- **Typeahead:** + - Now [inserts dropdown menu after the input](https://github.com/twitter/bootstrap/commit/1747caf19d59cad7fdc90ae56a00e0e2849f95f4) instead of at the close of the document. + - Hitting escape will place focus back on the ``. +- Print styles, from HTML5 Boilerplate, have been added. + +See more on the [2.2.2 milestone](https://github.com/twitter/bootstrap/issues?milestone=17&state=closed). + + +## 2.2.1 (October 30, 2012) + +Hotfix release to address the carousel bug reports. + + +## 2.2.0 (October 29, 2012) + +### tl;dr + +2.1.2 is now 2.2.0: four new example templates, added media component, new typographic scale, fixed that box-shadow mixin bug, fixed z-index issues, and [more](https://github.com/twitter/bootstrap/issues?milestone=15&page=1&state=closed). + +### Highlights + +- **Added four new example templates** to the docs, including a narrow marketing page, sign in form, sticky footer, and a fancy carousel (created for an upcoming .net magazine article). +- **Added the media component**, to create larger common components like comments, Tweets, etc. +- **New variable-driven typographic scale** based on `@baseFontSize` and `@baseLineHeight`. +- Revamped mini, small, and large padding via new variables for inputs and buttons so everything is the same size. +- Reverted 2.1.1's `.box-shadow();` mixin change that caused compiler errors. +- Improved dropdown submenus to support dropups and left-aligned submenus. +- Fixed z-index issues with tooltips and popovers in modals. +- Hero unit now sets basic type styles for the entire component, rather than on `.hero-unit p { ... }`. +- Updated JavaScript plugins and docs to jQuery 1.8.1. +- Added Contributing.md file. +- Added support for installing Bootstrap via [Bower](http://twitter.github.com/bower). +- Miscellaneous variable improvements across the board. +- Miscellaneous documentation typos fixed. + +For the full list of issues included in this release, visit the [2.2.0 milestone on GitHub](https://github.com/twitter/bootstrap/issues?milestone=15&page=1&state=closed) + + + +## 2.1.1 (September 4, 2012) + +* New feature: alert text. We documented these new classes, like `.text-success`, at the bottom of the [Typography section](http://twitter.github.com/bootstrap/base-css.html#typography) along with the long undocumented `.muted`. +* Fixed a lot of typos in the docs. Spelling is hard. +* Made the `.box-shadow()` mixin more durable. It no longer requires escaping for multiple shadows, meaning you can easily use variables and functions in them once again. +* Widened `.dl-horizontal dt` and `.horizontal-form .control-group` to better handle the increased font-size. +* Dropdown submenus improved: now you only see the next level, not all levels, on hover of the submenu toggle. +* Clarified jQuery and Bootstrap template requirements in Getting Started section. +* `select` now utilizes `@inputBorder`. +* `.lead` now scales up from `@baseFontSize` instead of being a fixed font-size and line-height. +* Fixed the vertical three color gradient in latest Firefox. +* Reordered some variables that caused errors in certain Less compilers. + +View all closed issues on the [2.1.1 milestone](https://github.com/twitter/bootstrap/issues?milestone=14&state=closed). + + +## 2.1.0 (August 20, 2012) + +### Key changes + +* Submenu support on dropdowns +* Affix JavaScript plugin +* Block level buttons +* State classes on table rows +* Improved disabled states on navs and dropdowns +* The navbar component is now white by default, with an optional class to darken it +* Improved prepended and appended inputs +* New base font-size and line-height +* Added variable for navbar collapse trigger point +* Fluid grid offsets +* Fluid grid system variables are no longer fixed percentages +* Removed LESS docs page + +For full set of changes, see the completed milestone: https://github.com/twitter/bootstrap/issues?milestone=7&page=1&state=closed + +## 2.0.4 (June 1, 2012) + + +### Docs + +- Added `type="button"` to all dismiss buttons in alerts and modals to avoid a bug in which they prevent their parent's `form` from properly submitting. +- Added simple documentation to Base CSS for `.lead`. +- Added new CSS test to illustrate how the navbar, static and fixed, behaves. +- Clarified grid sizing copy to include mention of responsive variations. +- Reformatted the LESS docs page to prevent terrible table displays at smaller grid sizes. +- Miscellaneous typos and tweaks. + +### CSS + +- Refactored forms.less to make our selectors more specific for fewer overrides and less code. Instead of a generic `input` selector and various resets, we target each type of input like `input[type="text"]`, `input[type="password"]`, etc. +- Form field state (e.g., success or error) now applies to checkbox and radio labels. +- Removed redundant CSS on `

` for `font-family`, `font-size`, and `line-height`. +- Removed redundant `color` declaration from the ` + + + +# [Bootstrap v2.3.0](http://twitter.github.com/bootstrap) [![Build Status](https://secure.travis-ci.org/twitter/bootstrap.png)](http://travis-ci.org/twitter/bootstrap) Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created and maintained by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat). -To get started, checkout http://getbootstrap.com! +To get started, checkout [http://getbootstrap.com](http://getbootstrap.com)! @@ -30,7 +34,7 @@ And constructed with the following guidelines: * New additions without breaking backward compatibility bumps the minor (and resets the patch) * Bug fixes and misc changes bumps the patch -For more information on SemVer, please visit http://semver.org/. +For more information on SemVer, please visit [http://semver.org/](http://semver.org/). @@ -85,13 +89,13 @@ Thanks! **Mark Otto** -+ http://twitter.com/mdo -+ http://github.com/mdo ++ [http://twitter.com/mdo](http://twitter.com/mdo) ++ [http://github.com/mdo](http://github.com/mdo) **Jacob Thornton** -+ http://twitter.com/fat -+ http://github.com/fat ++ [http://twitter.com/fat](http://twitter.com/fat) ++ [http://github.com/fat](http://github.com/fat) @@ -103,7 +107,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at: - http://www.apache.org/licenses/LICENSE-2.0 + [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/component.json b/component.json index eda7edeef5f8..3f1ca0eb163a 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 5ddf13636061..abde63128e6f 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 a3352d774ce8..5215a5d040f3 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; @@ -95,6 +95,19 @@ } } +.visible-print { + display: none !important; +} + +@media print { + .visible-print { + display: inherit !important; + } + .hidden-print { + display: none !important; + } +} + @media (min-width: 1200px) { .row { margin-left: -30px; @@ -1003,7 +1016,9 @@ margin-bottom: 2px; } .nav-collapse .nav > li > a:hover, - .nav-collapse .dropdown-menu a:hover { + .nav-collapse .nav > li > a:focus, + .nav-collapse .dropdown-menu a:hover, + .nav-collapse .dropdown-menu a:focus { background-color: #f2f2f2; } .navbar-inverse .nav-collapse .nav > li > a, @@ -1011,7 +1026,9 @@ color: #999999; } .navbar-inverse .nav-collapse .nav > li > a:hover, - .navbar-inverse .nav-collapse .dropdown-menu a:hover { + .navbar-inverse .nav-collapse .nav > li > a:focus, + .navbar-inverse .nav-collapse .dropdown-menu a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:focus { background-color: #111111; } .nav-collapse.in .btn-group { diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 8ab3cefcf71d..b2550569275a 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; @@ -235,7 +235,8 @@ a { text-decoration: none; } -a:hover { +a:hover, +a:focus { color: #005580; text-decoration: underline; } @@ -678,7 +679,8 @@ cite { color: #999999; } -a.muted:hover { +a.muted:hover, +a.muted:focus { color: #808080; } @@ -686,7 +688,8 @@ a.muted:hover { color: #c09853; } -a.text-warning:hover { +a.text-warning:hover, +a.text-warning:focus { color: #a47e3c; } @@ -694,7 +697,8 @@ a.text-warning:hover { color: #b94a48; } -a.text-error:hover { +a.text-error:hover, +a.text-error:focus { color: #953b39; } @@ -702,7 +706,8 @@ a.text-error:hover { color: #3a87ad; } -a.text-info:hover { +a.text-info:hover, +a.text-info:focus { color: #2d6987; } @@ -710,10 +715,23 @@ a.text-info:hover { color: #468847; } -a.text-success:hover { +a.text-success:hover, +a.text-success:focus { color: #356635; } +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.text-center { + text-align: center; +} + h1, h2, h3, @@ -823,8 +841,10 @@ ol.inline { ul.inline > li, ol.inline > li { display: inline-block; + *display: inline; padding-right: 5px; padding-left: 5px; + *zoom: 1; } dl { @@ -899,9 +919,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 +1666,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 +1680,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 +2073,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 +2090,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 +2100,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 +2143,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 +2241,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; } @@ -2257,7 +2287,7 @@ table th[class*="span"], background-repeat: no-repeat; } -/* White icons with optional class, or on hover/active states of certain elements */ +/* White icons with optional class, or on hover/focus/active states of certain elements */ .icon-white, .nav-pills > .active > a > [class^="icon-"], @@ -2267,11 +2297,15 @@ table th[class*="span"], .navbar-inverse .nav > .active > a > [class^="icon-"], .navbar-inverse .nav > .active > a > [class*=" icon-"], .dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:focus > [class^="icon-"], .dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > li > a:focus > [class*=" icon-"], .dropdown-menu > .active > a > [class^="icon-"], .dropdown-menu > .active > a > [class*=" icon-"], .dropdown-submenu:hover > a > [class^="icon-"], -.dropdown-submenu:hover > a > [class*=" icon-"] { +.dropdown-submenu:focus > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"], +.dropdown-submenu:focus > a > [class*=" icon-"] { background-image: url("../img/glyphicons-halflings-white.png"); } @@ -2741,6 +2775,7 @@ table th[class*="span"], } .icon-folder-close { + width: 16px; background-position: -384px -120px; } @@ -2909,7 +2944,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,9 +2954,10 @@ table th[class*="span"], white-space: nowrap; } -.dropdown-menu li > a:hover, -.dropdown-menu li > a:focus, -.dropdown-submenu:hover > a { +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { color: #ffffff; text-decoration: none; background-color: #0081c2; @@ -2934,8 +2970,9 @@ 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, +.dropdown-menu > .active > a:focus { color: #ffffff; text-decoration: none; background-color: #0081c2; @@ -2949,12 +2986,14 @@ 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, +.dropdown-menu > .disabled > a:focus { color: #999999; } -.dropdown-menu .disabled > a:hover { +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { text-decoration: none; cursor: default; background-color: transparent; @@ -3130,7 +3169,8 @@ table th[class*="span"], filter: alpha(opacity=20); } -.close:hover { +.close:hover, +.close:focus { color: #000000; text-decoration: none; cursor: pointer; @@ -3167,11 +3207,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; @@ -3184,6 +3224,7 @@ button.close { } .btn:hover, +.btn:focus, .btn:active, .btn.active, .btn.disabled, @@ -3202,7 +3243,8 @@ button.close { *margin-left: 0; } -.btn:hover { +.btn:hover, +.btn:focus { color: #333333; text-decoration: none; background-position: 0 -15px; @@ -3306,11 +3348,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); @@ -3329,6 +3366,7 @@ input[type="button"].btn-block { } .btn-primary:hover, +.btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, @@ -3361,6 +3399,7 @@ input[type="button"].btn-block { } .btn-warning:hover, +.btn-warning:focus, .btn-warning:active, .btn-warning.active, .btn-warning.disabled, @@ -3393,6 +3432,7 @@ input[type="button"].btn-block { } .btn-danger:hover, +.btn-danger:focus, .btn-danger:active, .btn-danger.active, .btn-danger.disabled, @@ -3425,6 +3465,7 @@ input[type="button"].btn-block { } .btn-success:hover, +.btn-success:focus, .btn-success:active, .btn-success.active, .btn-success.disabled, @@ -3457,6 +3498,7 @@ input[type="button"].btn-block { } .btn-info:hover, +.btn-info:focus, .btn-info:active, .btn-info.active, .btn-info.disabled, @@ -3489,6 +3531,7 @@ input[type="button"].btn-block { } .btn-inverse:hover, +.btn-inverse:focus, .btn-inverse:active, .btn-inverse.active, .btn-inverse.disabled, @@ -3552,13 +3595,15 @@ input[type="submit"].btn.btn-mini { border-radius: 0; } -.btn-link:hover { +.btn-link:hover, +.btn-link:focus { color: #005580; text-decoration: underline; background-color: transparent; } -.btn-link[disabled]:hover { +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { color: #333333; text-decoration: none; } @@ -3744,8 +3789,6 @@ input[type="submit"].btn.btn-mini { margin-left: 0; } -.btn-mini .caret, -.btn-small .caret, .btn-large .caret { margin-top: 6px; } @@ -3756,6 +3799,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; } @@ -3899,7 +3947,8 @@ input[type="submit"].btn.btn-mini { display: block; } -.nav > li > a:hover { +.nav > li > a:hover, +.nav > li > a:focus { text-decoration: none; background-color: #eeeeee; } @@ -3945,7 +3994,8 @@ input[type="submit"].btn.btn-mini { } .nav-list > .active > a, -.nav-list > .active > a:hover { +.nav-list > .active > a:hover, +.nav-list > .active > a:focus { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); background-color: #0088cc; @@ -4016,12 +4066,14 @@ input[type="submit"].btn.btn-mini { border-radius: 4px 4px 0 0; } -.nav-tabs > li > a:hover { +.nav-tabs > li > a:hover, +.nav-tabs > li > a:focus { border-color: #eeeeee #eeeeee #dddddd; } .nav-tabs > .active > a, -.nav-tabs > .active > a:hover { +.nav-tabs > .active > a:hover, +.nav-tabs > .active > a:focus { color: #555555; cursor: default; background-color: #ffffff; @@ -4040,7 +4092,8 @@ input[type="submit"].btn.btn-mini { } .nav-pills > .active > a, -.nav-pills > .active > a:hover { +.nav-pills > .active > a:hover, +.nav-pills > .active > a:focus { color: #ffffff; background-color: #0088cc; } @@ -4082,7 +4135,8 @@ input[type="submit"].btn.btn-mini { -moz-border-radius-bottomleft: 4px; } -.nav-tabs.nav-stacked > li > a:hover { +.nav-tabs.nav-stacked > li > a:hover, +.nav-tabs.nav-stacked > li > a:focus { z-index: 2; border-color: #ddd; } @@ -4113,7 +4167,8 @@ input[type="submit"].btn.btn-mini { border-bottom-color: #0088cc; } -.nav .dropdown-toggle:hover .caret { +.nav .dropdown-toggle:hover .caret, +.nav .dropdown-toggle:focus .caret { border-top-color: #005580; border-bottom-color: #005580; } @@ -4134,13 +4189,15 @@ input[type="submit"].btn.btn-mini { border-bottom-color: #555555; } -.nav > .dropdown.active > a:hover { +.nav > .dropdown.active > a:hover, +.nav > .dropdown.active > a:focus { cursor: pointer; } .nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, -.nav > li.dropdown.open.active > a:hover { +.nav > li.dropdown.open.active > a:hover, +.nav > li.dropdown.open.active > a:focus { color: #ffffff; background-color: #999999; border-color: #999999; @@ -4148,14 +4205,16 @@ input[type="submit"].btn.btn-mini { .nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, -.nav li.dropdown.open a:hover .caret { +.nav li.dropdown.open a:hover .caret, +.nav li.dropdown.open a:focus .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; opacity: 1; filter: alpha(opacity=100); } -.tabs-stacked .open > a:hover { +.tabs-stacked .open > a:hover, +.tabs-stacked .open > a:focus { border-color: #999999; } @@ -4209,13 +4268,15 @@ input[type="submit"].btn.btn-mini { border-radius: 0 0 4px 4px; } -.tabs-below > .nav-tabs > li > a:hover { +.tabs-below > .nav-tabs > li > a:hover, +.tabs-below > .nav-tabs > li > a:focus { border-top-color: #ddd; border-bottom-color: transparent; } .tabs-below > .nav-tabs > .active > a, -.tabs-below > .nav-tabs > .active > a:hover { +.tabs-below > .nav-tabs > .active > a:hover, +.tabs-below > .nav-tabs > .active > a:focus { border-color: transparent #ddd #ddd #ddd; } @@ -4244,12 +4305,14 @@ input[type="submit"].btn.btn-mini { border-radius: 4px 0 0 4px; } -.tabs-left > .nav-tabs > li > a:hover { +.tabs-left > .nav-tabs > li > a:hover, +.tabs-left > .nav-tabs > li > a:focus { border-color: #eeeeee #dddddd #eeeeee #eeeeee; } .tabs-left > .nav-tabs .active > a, -.tabs-left > .nav-tabs .active > a:hover { +.tabs-left > .nav-tabs .active > a:hover, +.tabs-left > .nav-tabs .active > a:focus { border-color: #ddd transparent #ddd #ddd; *border-right-color: #ffffff; } @@ -4267,12 +4330,14 @@ input[type="submit"].btn.btn-mini { border-radius: 0 4px 4px 0; } -.tabs-right > .nav-tabs > li > a:hover { +.tabs-right > .nav-tabs > li > a:hover, +.tabs-right > .nav-tabs > li > a:focus { border-color: #eeeeee #eeeeee #eeeeee #dddddd; } .tabs-right > .nav-tabs .active > a, -.tabs-right > .nav-tabs .active > a:hover { +.tabs-right > .nav-tabs .active > a:hover, +.tabs-right > .nav-tabs .active > a:focus { border-color: #ddd #ddd #ddd transparent; *border-left-color: #ffffff; } @@ -4281,7 +4346,8 @@ input[type="submit"].btn.btn-mini { color: #999999; } -.nav > .disabled > a:hover { +.nav > .disabled > a:hover, +.nav > .disabled > a:focus { text-decoration: none; cursor: default; background-color: transparent; @@ -4347,7 +4413,8 @@ input[type="submit"].btn.btn-mini { text-shadow: 0 1px 0 #ffffff; } -.navbar .brand:hover { +.navbar .brand:hover, +.navbar .brand:focus { text-decoration: none; } @@ -4361,7 +4428,8 @@ input[type="submit"].btn.btn-mini { color: #777777; } -.navbar-link:hover { +.navbar-link:hover, +.navbar-link:focus { color: #333333; } @@ -4379,7 +4447,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; } @@ -4587,6 +4657,7 @@ input[type="submit"].btn.btn-mini { } .navbar .btn-navbar:hover, +.navbar .btn-navbar:focus, .navbar .btn-navbar:active, .navbar .btn-navbar.active, .navbar .btn-navbar.disabled, @@ -4656,9 +4727,10 @@ input[type="submit"].btn.btn-mini { border-bottom: 0; } -.navbar .nav li.dropdown > a:hover .caret { - border-top-color: #555555; - border-bottom-color: #555555; +.navbar .nav li.dropdown > a:hover .caret, +.navbar .nav li.dropdown > a:focus .caret { + border-top-color: #333333; + border-bottom-color: #333333; } .navbar .nav li.dropdown.open > .dropdown-toggle, @@ -4728,7 +4800,9 @@ input[type="submit"].btn.btn-mini { } .navbar-inverse .brand:hover, -.navbar-inverse .nav > li > a:hover { +.navbar-inverse .nav > li > a:hover, +.navbar-inverse .brand:focus, +.navbar-inverse .nav > li > a:focus { color: #ffffff; } @@ -4757,7 +4831,8 @@ input[type="submit"].btn.btn-mini { color: #999999; } -.navbar-inverse .navbar-link:hover { +.navbar-inverse .navbar-link:hover, +.navbar-inverse .navbar-link:focus { color: #ffffff; } @@ -4773,7 +4848,8 @@ input[type="submit"].btn.btn-mini { background-color: #111111; } -.navbar-inverse .nav li.dropdown > a:hover .caret { +.navbar-inverse .nav li.dropdown > a:hover .caret, +.navbar-inverse .nav li.dropdown > a:focus .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } @@ -4846,6 +4922,7 @@ input[type="submit"].btn.btn-mini { } .navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:focus, .navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active, .navbar-inverse .btn-navbar.disabled, @@ -4920,6 +4997,7 @@ input[type="submit"].btn.btn-mini { } .pagination ul > li > a:hover, +.pagination ul > li > a:focus, .pagination ul > .active > a, .pagination ul > .active > span { background-color: #f5f5f5; @@ -4933,7 +5011,8 @@ input[type="submit"].btn.btn-mini { .pagination ul > .disabled > span, .pagination ul > .disabled > a, -.pagination ul > .disabled > a:hover { +.pagination ul > .disabled > a:hover, +.pagination ul > .disabled > a:focus { color: #999999; cursor: default; background-color: transparent; @@ -5063,7 +5142,8 @@ input[type="submit"].btn.btn-mini { border-radius: 15px; } -.pager li > a:hover { +.pager li > a:hover, +.pager li > a:focus { text-decoration: none; background-color: #f5f5f5; } @@ -5080,6 +5160,7 @@ input[type="submit"].btn.btn-mini { .pager .disabled > a, .pager .disabled > a:hover, +.pager .disabled > a:focus, .pager .disabled > span { color: #999999; cursor: default; @@ -5209,8 +5290,8 @@ input[type="submit"].btn.btn-mini { position: absolute; z-index: 1030; display: block; - padding: 5px; font-size: 11px; + line-height: 1.4; opacity: 0; filter: alpha(opacity=0); visibility: visible; @@ -5222,24 +5303,28 @@ input[type="submit"].btn.btn-mini { } .tooltip.top { + padding: 5px 0; margin-top: -3px; } .tooltip.right { + padding: 0 5px; margin-left: 3px; } .tooltip.bottom { + padding: 5px 0; margin-top: 3px; } .tooltip.left { + padding: 0 5px; margin-left: -3px; } .tooltip-inner { max-width: 200px; - padding: 3px 8px; + padding: 8px; color: #ffffff; text-align: center; text-decoration: none; @@ -5295,7 +5380,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 +5427,10 @@ input[type="submit"].btn.btn-mini { border-radius: 5px 5px 0 0; } +.popover-title:empty { + display: none; +} + .popover-content { padding: 9px 14px; } @@ -5473,7 +5562,8 @@ input[type="submit"].btn.btn-mini { transition: all 0.2s ease-in-out; } -a.thumbnail:hover { +a.thumbnail:hover, +a.thumbnail:focus { border-color: #0088cc; -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); @@ -5516,11 +5606,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; } @@ -5563,7 +5653,9 @@ a.thumbnail:hover { } a.label:hover, -a.badge:hover { +a.label:focus, +a.badge:hover, +a.badge:focus { color: #ffffff; text-decoration: none; cursor: pointer; @@ -5889,7 +5981,8 @@ a.badge:hover { transition: 0.6s ease-in-out left; } -.carousel-inner > .item > img { +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { display: block; line-height: 1; } @@ -5958,13 +6051,39 @@ a.badge:hover { left: auto; } -.carousel-control:hover { +.carousel-control:hover, +.carousel-control:focus { color: #ffffff; text-decoration: none; opacity: 0.9; 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 c7bddd45af9b..af655409285a 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -339,8 +339,8 @@ only screen and ( -o-min-device-pixel-ratio: 2/1) { min-height: 40px; line-height: 40px; } -.show-grid:hover [class*="span"] { - background: #ddd; +.show-grid [class*="span"]:hover { + background-color: #ddd; } .show-grid .show-grid { margin-top: 0; @@ -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 d62bc3976bc8..36603bd3b44e 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 a2f668abe156..725fe07b9e7b 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 d616ba001bef..000000000000 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 000000000000..5f49a332f332 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 a9662d2b4bf8..000000000000 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 000000000000..3d1e233891ec 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 a7ac9ef98b8a..4bca8cdafd36 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 000000000000..206e26e34248 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 39210096b402..b649a985dcdc 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 3b1cbf9e78f1..000000000000 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 000000000000..1bf4b85ecef6 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 c2255044df48..fb80e7b92f9d 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 f6c7849c3a8b..f880bc05d53f 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 > [class*="span"]' , 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 6020a19a58ef..7595fdb06771 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 5bc02644910f..b5627984e4ca 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 39b83399e979..045927b6ba73 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 238ff4280184..604552012b17 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)) @@ -38,19 +39,24 @@ cycle: function (e) { if (!e) this.paused = false + if (this.interval) clearInterval(this.interval); this.options.interval && !this.paused && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) 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 +64,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 +109,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 +166,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 +189,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 6ac0191a50a6..7bbad8e43aba 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('-')) @@ -72,7 +72,7 @@ , hide: function () { var dimension - if (this.transitioning) return + if (this.transitioning || !this.$element.hasClass('in')) return dimension = this.dimension() this.reset(this.$element[dimension]()) this.transition('removeClass', $.Event('hide'), 'hidden') @@ -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 900355d5bd11..ec86cf0d7095 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 } @@ -152,10 +156,10 @@ * =================================== */ $(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) + .on('click.dropdown.data-api', clearMenus) + .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('.dropdown-menu', function (e) { e.stopPropagation() }) + .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle) + .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) -}(window.jQuery); \ No newline at end of file +}(window.jQuery); diff --git a/docs/assets/js/bootstrap-modal.js b/docs/assets/js/bootstrap-modal.js index 689a414ed607..b5ffa95b3b76 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 @@ -139,12 +138,13 @@ }) } - , hideModal: function (that) { - this.$element - .hide() - .trigger('hidden') - - this.backdrop() + , hideModal: function () { + var that = this + this.$element.hide() + this.backdrop(function () { + that.removeBackdrop() + that.$element.trigger('hidden') + }) } , removeBackdrop: function () { @@ -172,6 +172,8 @@ this.$backdrop.addClass('in') + if (!callback) return + doAnimate ? this.$backdrop.one($.support.transition.end, callback) : callback() @@ -180,8 +182,8 @@ this.$backdrop.removeClass('in') $.support.transition && this.$element.hasClass('fade')? - this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) : - this.removeBackdrop() + this.$backdrop.one($.support.transition.end, callback) : + callback() } else if (callback) { callback() diff --git a/docs/assets/js/bootstrap-popover.js b/docs/assets/js/bootstrap-popover.js index 1a4f532aa8ce..0e7774bf668c 100644 --- a/docs/assets/js/bootstrap-popover.js +++ b/docs/assets/js/bootstrap-popover.js @@ -1,5 +1,5 @@ /* =========================================================== - * bootstrap-popover.js v2.2.2 + * bootstrap-popover.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#popovers * =========================================================== * Copyright 2012 Twitter, Inc. @@ -58,8 +58,8 @@ , $e = this.$element , o = this.options - content = $e.attr('data-content') - || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) + content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) + || $e.attr('data-content') return content } @@ -99,7 +99,7 @@ placement: 'right' , trigger: 'click' , content: '' - , template: '

' + , template: '

' }) @@ -111,4 +111,4 @@ return this } -}(window.jQuery); \ No newline at end of file +}(window.jQuery); diff --git a/docs/assets/js/bootstrap-scrollspy.js b/docs/assets/js/bootstrap-scrollspy.js index 07a5c3a5842a..dff9a3b37518 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 84d4834a23b6..bd77eb5c3580 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 a08952a4cfdc..981319077e9b 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 ? @@ -59,7 +67,7 @@ } , getOptions: function (options) { - options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) + options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options) if (options.delay && typeof options.delay == 'number') { options.delay = { @@ -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 @@ -143,11 +152,56 @@ break } - $tip - .offset(tp) - .addClass(placement) - .addClass('in') + this.applyPlacement(tp, placement) + this.$element.trigger('shown') + } + } + + , applyPlacement: function(offset, placement){ + var $tip = this.tip() + , width = $tip[0].offsetWidth + , height = $tip[0].offsetHeight + , actualWidth + , actualHeight + , delta + , replace + + $tip + .offset(offset) + .addClass(placement) + .addClass('in') + + actualWidth = $tip[0].offsetWidth + actualHeight = $tip[0].offsetHeight + + if (placement == 'top' && actualHeight != height) { + offset.top = offset.top + height - actualHeight + replace = true } + + if (placement == 'bottom' || placement == 'top') { + delta = 0 + + if (offset.left < 0){ + delta = offset.left * -2 + offset.left = 0 + $tip.offset(offset) + actualWidth = $tip[0].offsetWidth + actualHeight = $tip[0].offsetHeight + } + + this.replaceArrow(delta - width + actualWidth, actualWidth, 'left') + } else { + this.replaceArrow(actualHeight - height, actualHeight, 'top') + } + + if (replace) $tip.offset(offset) + } + + , replaceArrow: function(delta, dimension, position){ + this + .arrow() + .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '') } , setContent: function () { @@ -161,6 +215,10 @@ , hide: function () { var that = this , $tip = this.tip() + , e = $.Event('hide') + + this.$element.trigger(e) + if (e.isDefaultPrevented()) return $tip.removeClass('in') @@ -179,13 +237,15 @@ removeWithAnimation() : $tip.detach() + this.$element.trigger('hidden') + return this } , fixTitle: function () { var $e = this.$element if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') + $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') } } @@ -193,11 +253,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({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : { + width: el.offsetWidth + , height: el.offsetHeight + }, this.$element.offset()) } , getTitle: function () { @@ -215,6 +276,10 @@ return this.$tip = this.$tip || $(this.options.template) } + , arrow: function(){ + return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow") + } + , validate: function () { if (!this.$element[0].parentNode) { this.hide() @@ -236,8 +301,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 +334,11 @@ , placement: 'top' , selector: false , template: '
' - , trigger: 'hover' + , trigger: 'hover focus' , title: '' , delay: 0 , html: false + , container: false } @@ -284,4 +350,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 b0f12c26d328..64f275778094 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 088e7ce9b90f..960f2af85a7c 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() + } + } @@ -316,7 +329,6 @@ $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { var $this = $(this) if ($this.data('typeahead')) return - e.preventDefault() $this.typeahead($this.data()) }) diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index 6c15a5832964..a81171b42f22 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)) @@ -299,19 +300,24 @@ cycle: function (e) { if (!e) this.paused = false + if (this.interval) clearInterval(this.interval); this.options.interval && !this.paused && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) 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 +325,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 +370,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 +427,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 +450,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 +519,7 @@ , actives , hasData - if (this.transitioning) return + if (this.transitioning || this.$element.hasClass('in')) return dimension = this.dimension() scroll = $.camelCase(['scroll', dimension].join('-')) @@ -517,7 +539,7 @@ , hide: function () { var dimension - if (this.transitioning) return + if (this.transitioning || !this.$element.hasClass('in')) return dimension = this.dimension() this.reset(this.$element[dimension]()) this.transition('removeClass', $.Event('hide'), 'hidden') @@ -574,7 +596,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 +632,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 +714,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 +751,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 } @@ -763,14 +789,15 @@ * =================================== */ $(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);/* ========================================================= - * bootstrap-modal.js v2.2.2 + .on('click.dropdown.data-api', clearMenus) + .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('.dropdown-menu', function (e) { e.stopPropagation() }) + .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle) + .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) + +}(window.jQuery); +/* ========================================================= + * bootstrap-modal.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#modals * ========================================================= * Copyright 2012 Twitter, Inc. @@ -831,8 +858,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 @@ -910,12 +936,13 @@ }) } - , hideModal: function (that) { - this.$element - .hide() - .trigger('hidden') - - this.backdrop() + , hideModal: function () { + var that = this + this.$element.hide() + this.backdrop(function () { + that.removeBackdrop() + that.$element.trigger('hidden') + }) } , removeBackdrop: function () { @@ -943,6 +970,8 @@ this.$backdrop.addClass('in') + if (!callback) return + doAnimate ? this.$backdrop.one($.support.transition.end, callback) : callback() @@ -951,8 +980,8 @@ this.$backdrop.removeClass('in') $.support.transition && this.$element.hasClass('fade')? - this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) : - this.removeBackdrop() + this.$backdrop.one($.support.transition.end, callback) : + callback() } else if (callback) { callback() @@ -1015,7 +1044,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 +1083,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 ? @@ -1075,7 +1112,7 @@ } , getOptions: function (options) { - options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) + options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options) if (options.delay && typeof options.delay == 'number') { options.delay = { @@ -1113,14 +1150,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 +1171,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 @@ -1159,11 +1197,56 @@ break } - $tip - .offset(tp) - .addClass(placement) - .addClass('in') + this.applyPlacement(tp, placement) + this.$element.trigger('shown') + } + } + + , applyPlacement: function(offset, placement){ + var $tip = this.tip() + , width = $tip[0].offsetWidth + , height = $tip[0].offsetHeight + , actualWidth + , actualHeight + , delta + , replace + + $tip + .offset(offset) + .addClass(placement) + .addClass('in') + + actualWidth = $tip[0].offsetWidth + actualHeight = $tip[0].offsetHeight + + if (placement == 'top' && actualHeight != height) { + offset.top = offset.top + height - actualHeight + replace = true } + + if (placement == 'bottom' || placement == 'top') { + delta = 0 + + if (offset.left < 0){ + delta = offset.left * -2 + offset.left = 0 + $tip.offset(offset) + actualWidth = $tip[0].offsetWidth + actualHeight = $tip[0].offsetHeight + } + + this.replaceArrow(delta - width + actualWidth, actualWidth, 'left') + } else { + this.replaceArrow(actualHeight - height, actualHeight, 'top') + } + + if (replace) $tip.offset(offset) + } + + , replaceArrow: function(delta, dimension, position){ + this + .arrow() + .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '') } , setContent: function () { @@ -1177,6 +1260,10 @@ , hide: function () { var that = this , $tip = this.tip() + , e = $.Event('hide') + + this.$element.trigger(e) + if (e.isDefaultPrevented()) return $tip.removeClass('in') @@ -1195,13 +1282,15 @@ removeWithAnimation() : $tip.detach() + this.$element.trigger('hidden') + return this } , fixTitle: function () { var $e = this.$element if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') + $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') } } @@ -1209,11 +1298,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({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : { + width: el.offsetWidth + , height: el.offsetHeight + }, this.$element.offset()) } , getTitle: function () { @@ -1231,6 +1321,10 @@ return this.$tip = this.$tip || $(this.options.template) } + , arrow: function(){ + return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow") + } + , validate: function () { if (!this.$element[0].parentNode) { this.hide() @@ -1252,8 +1346,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 +1379,11 @@ , placement: 'top' , selector: false , template: '
' - , trigger: 'hover' + , trigger: 'hover focus' , title: '' , delay: 0 , html: false + , container: false } @@ -1300,8 +1395,9 @@ return this } -}(window.jQuery);/* =========================================================== - * bootstrap-popover.js v2.2.2 +}(window.jQuery); +/* =========================================================== + * bootstrap-popover.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#popovers * =========================================================== * Copyright 2012 Twitter, Inc. @@ -1360,8 +1456,8 @@ , $e = this.$element , o = this.options - content = $e.attr('data-content') - || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) + content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) + || $e.attr('data-content') return content } @@ -1401,7 +1497,7 @@ placement: 'right' , trigger: 'click' , content: '' - , template: '

' + , template: '

' }) @@ -1413,8 +1509,9 @@ return this } -}(window.jQuery);/* ============================================================= - * bootstrap-scrollspy.js v2.2.2 +}(window.jQuery); +/* ============================================================= + * bootstrap-scrollspy.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#scrollspy * ============================================================= * Copyright 2012 Twitter, Inc. @@ -1474,7 +1571,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 +1672,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 +1815,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 +1988,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 +2000,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 +2074,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() + } + } @@ -2035,13 +2145,12 @@ $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { var $this = $(this) if ($this.data('typeahead')) return - e.preventDefault() $this.typeahead($this.data()) }) }(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 4abe532c86cb..42501777adf6 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=$('