From d19ca23f8fd8910eefbc344539fef0a8deed1992 Mon Sep 17 00:00:00 2001 From: James Fuller Date: Thu, 11 Oct 2012 21:30:04 -0300 Subject: [PATCH 01/26] Update package.json when building using Makefile, dependency for hogan.js needs to be installed --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index f0be5d5f42..9296c19dac 100644 --- a/package.json +++ b/package.json @@ -21,5 +21,6 @@ , "jshint": "0.6.1" , "recess": "1.0.3" , "connect": "2.1.3" + , "hogan.js": "2.0.0" } } \ No newline at end of file From 46d38b10b8823d2a13329edb939e4811636c9aba Mon Sep 17 00:00:00 2001 From: David Date: Fri, 2 Nov 2012 15:04:34 +0100 Subject: [PATCH 02/26] Prevent IE8 from misplacing imgs Fixed imgs in a nav that were misplaced on IE8. --- less/navs.less | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/less/navs.less b/less/navs.less index 1944f84415..4cffa8a68d 100644 --- a/less/navs.less +++ b/less/navs.less @@ -21,6 +21,11 @@ background-color: @grayLighter; } +// Prevent IE8 from misplacing imgs +.nav > li > a > img { + max-width: none; +} + // Redeclare pull classes because of specifity .nav > .pull-right { float: right; From 4d593618e00b6052a1588fd4fb7312da6b3af194 Mon Sep 17 00:00:00 2001 From: Trent Steel Date: Fri, 16 Nov 2012 17:01:21 +1000 Subject: [PATCH 03/26] add composer.json --- composer.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 0000000000..5ddf136360 --- /dev/null +++ b/composer.json @@ -0,0 +1,10 @@ +{ + "name": "twitter/bootstrap" + , "description": "Sleek, intuitive, and powerful front-end framework for faster and easier web development." + , "keywords": ["bootstrap", "css"] + , "homepage": "http://twitter.github.com/bootstrap/" + , "author": "Twitter Inc." + , "license": "Apache-2.0" + , "target-dir": "twitter/bootstrap" + +} From 701f871e7db41a8c427b84fb045f89d1656f758d Mon Sep 17 00:00:00 2001 From: Zulfiqar Ali Date: Tue, 27 Nov 2012 07:30:54 +0800 Subject: [PATCH 04/26] help-block margin-top should also apply after a span.input --- less/forms.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/less/forms.less b/less/forms.less index 172ed027dc..6a8edfb676 100644 --- a/less/forms.less +++ b/less/forms.less @@ -672,7 +672,8 @@ legend + .control-group { // And apply it only to .help-block instances that follow a form control input, select, - textarea { + textarea, + span.input { + .help-block { margin-top: @baseLineHeight / 2; } From dc10e6bbf8d051d763ec0c14dd8f5307ac356654 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Nov 2012 00:19:35 -0800 Subject: [PATCH 05/26] Fixes #5935: Updated vertical gradient mixin --- docs/assets/css/bootstrap.css | 38 +++++++++++++++++------------------ less/mixins.less | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 2da34b4add..87602639de 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -2920,7 +2920,7 @@ table th[class*="span"], background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); background-image: -o-linear-gradient(top, #0088cc, #0077b3); - background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-image: linear-gradient(top, #0088cc, #0077b3); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); } @@ -2934,7 +2934,7 @@ table th[class*="span"], background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); background-image: -o-linear-gradient(top, #0088cc, #0077b3); - background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-image: linear-gradient(top, #0088cc, #0077b3); background-repeat: repeat-x; outline: 0; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); @@ -3155,7 +3155,7 @@ button.close { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); - background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-image: linear-gradient(top, #ffffff, #e6e6e6); background-repeat: repeat-x; border: 1px solid #bbbbbb; *border: 0; @@ -3305,7 +3305,7 @@ input[type="button"].btn-block { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); - background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-image: linear-gradient(top, #0088cc, #0044cc); background-repeat: repeat-x; border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); @@ -3337,7 +3337,7 @@ input[type="button"].btn-block { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); background-image: -webkit-linear-gradient(top, #fbb450, #f89406); background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-image: linear-gradient(top, #fbb450, #f89406); background-repeat: repeat-x; border-color: #f89406 #f89406 #ad6704; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); @@ -3369,7 +3369,7 @@ input[type="button"].btn-block { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); - background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); + background-image: linear-gradient(top, #ee5f5b, #bd362f); background-repeat: repeat-x; border-color: #bd362f #bd362f #802420; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); @@ -3401,7 +3401,7 @@ input[type="button"].btn-block { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); background-image: -webkit-linear-gradient(top, #62c462, #51a351); background-image: -o-linear-gradient(top, #62c462, #51a351); - background-image: linear-gradient(to bottom, #62c462, #51a351); + background-image: linear-gradient(top, #62c462, #51a351); background-repeat: repeat-x; border-color: #51a351 #51a351 #387038; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); @@ -3433,7 +3433,7 @@ input[type="button"].btn-block { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); - background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); + background-image: linear-gradient(top, #5bc0de, #2f96b4); background-repeat: repeat-x; border-color: #2f96b4 #2f96b4 #1f6377; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); @@ -3465,7 +3465,7 @@ input[type="button"].btn-block { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); background-image: -webkit-linear-gradient(top, #444444, #222222); background-image: -o-linear-gradient(top, #444444, #222222); - background-image: linear-gradient(to bottom, #444444, #222222); + background-image: linear-gradient(top, #444444, #222222); background-repeat: repeat-x; border-color: #222222 #222222 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); @@ -4266,7 +4266,7 @@ input[type="submit"].btn.btn-mini { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); - background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-image: linear-gradient(top, #ffffff, #f2f2f2); background-repeat: repeat-x; border: 1px solid #d4d4d4; -webkit-border-radius: 4px; @@ -4538,7 +4538,7 @@ input[type="submit"].btn.btn-mini { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); + background-image: linear-gradient(top, #f2f2f2, #e5e5e5); background-repeat: repeat-x; border-color: #e5e5e5 #e5e5e5 #bfbfbf; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); @@ -4673,7 +4673,7 @@ input[type="submit"].btn.btn-mini { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); background-image: -webkit-linear-gradient(top, #222222, #111111); background-image: -o-linear-gradient(top, #222222, #111111); - background-image: linear-gradient(to bottom, #222222, #111111); + background-image: linear-gradient(top, #222222, #111111); background-repeat: repeat-x; border-color: #252525; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); @@ -4790,7 +4790,7 @@ input[type="submit"].btn.btn-mini { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); background-image: -webkit-linear-gradient(top, #151515, #040404); background-image: -o-linear-gradient(top, #151515, #040404); - background-image: linear-gradient(to bottom, #151515, #040404); + background-image: linear-gradient(top, #151515, #040404); background-repeat: repeat-x; border-color: #040404 #040404 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); @@ -5633,7 +5633,7 @@ a.badge:hover { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-image: linear-gradient(top, #f5f5f5, #f9f9f9); background-repeat: repeat-x; -webkit-border-radius: 4px; -moz-border-radius: 4px; @@ -5657,7 +5657,7 @@ a.badge:hover { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); background-image: -webkit-linear-gradient(top, #149bdf, #0480be); background-image: -o-linear-gradient(top, #149bdf, #0480be); - background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-image: linear-gradient(top, #149bdf, #0480be); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); @@ -5706,7 +5706,7 @@ a.badge:hover { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); - background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-image: linear-gradient(top, #ee5f5b, #c43c35); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); } @@ -5728,7 +5728,7 @@ a.badge:hover { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); background-image: -webkit-linear-gradient(top, #62c462, #57a957); background-image: -o-linear-gradient(top, #62c462, #57a957); - background-image: linear-gradient(to bottom, #62c462, #57a957); + background-image: linear-gradient(top, #62c462, #57a957); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); } @@ -5750,7 +5750,7 @@ a.badge:hover { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); background-image: -o-linear-gradient(top, #5bc0de, #339bb9); - background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-image: linear-gradient(top, #5bc0de, #339bb9); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); } @@ -5772,7 +5772,7 @@ a.badge:hover { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); background-image: -webkit-linear-gradient(top, #fbb450, #f89406); background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-image: linear-gradient(top, #fbb450, #f89406); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); } diff --git a/less/mixins.less b/less/mixins.less index b734bab2dc..109aa61e60 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -425,7 +425,7 @@ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 - background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10 + background-image: linear-gradient(top, @startColor, @endColor); // Standard, IE10 background-repeat: repeat-x; filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down } From 02097700e8ab24506dda5332778398119dc8b728 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Nov 2012 00:31:52 -0800 Subject: [PATCH 06/26] Fixes #6035: use font-size vars in button groups --- docs/assets/css/bootstrap.css | 6 +++--- less/button-groups.less | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 87602639de..6d0e3dc072 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3596,15 +3596,15 @@ input[type="submit"].btn.btn-mini { } .btn-group > .btn-mini { - font-size: 11px; + font-size: 10.5px; } .btn-group > .btn-small { - font-size: 12px; + font-size: 11.9px; } .btn-group > .btn-large { - font-size: 16px; + font-size: 17.5px; } .btn-group > .btn:first-child { diff --git a/less/button-groups.less b/less/button-groups.less index 8c3b9ff045..002a3ff075 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -46,13 +46,13 @@ // Reset fonts for other sizes .btn-group > .btn-mini { - font-size: 11px; + font-size: @fontSizeMini; } .btn-group > .btn-small { - font-size: 12px; + font-size: @fontSizeSmall; } .btn-group > .btn-large { - font-size: 16px; + font-size: @fontSizeLarge; } // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match From 942f9c5df4f731720cb28d126e9202ab21c28996 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Nov 2012 00:37:55 -0800 Subject: [PATCH 07/26] Fixes #6012: Updated docs sidenav media queries and reset width for exactly 980px --- docs/assets/css/docs.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index ff0ea557b3..6e9bbb9be7 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -867,6 +867,7 @@ form.bs-docs-example { /* When affixed, space properly */ .bs-docs-sidenav { top: 0; + width: 218px; margin-top: 30px; margin-right: 0; } @@ -874,7 +875,7 @@ form.bs-docs-example { /* Tablet to desktop ------------------------- */ -@media (min-width: 768px) and (max-width: 980px) { +@media (min-width: 768px) and (max-width: 979px) { /* Remove any padding from the body */ body { padding-top: 0; From 74f51105e980176caddda430959ffc536b3610ec Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Nov 2012 00:42:17 -0800 Subject: [PATCH 08/26] Fixes #6010: Navbar dropdown caret should match link hover color --- docs/assets/css/bootstrap.css | 10 ++++++++++ less/navbar.less | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 6d0e3dc072..f2cd3d3e98 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -4619,6 +4619,11 @@ 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.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, .navbar .nav li.dropdown.open.active > .dropdown-toggle { @@ -4731,6 +4736,11 @@ input[type="submit"].btn.btn-mini { background-color: #111111; } +.navbar-inverse .nav li.dropdown > a:hover .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + .navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { border-top-color: #999999; border-bottom-color: #999999; diff --git a/less/navbar.less b/less/navbar.less index 2b186f10e1..b292b72bb0 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -245,6 +245,7 @@ } .navbar .nav .dropdown-toggle .caret { margin-top: 8px; + } // Hover @@ -334,6 +335,12 @@ } } +// Caret should match text color on hover +.navbar .nav li.dropdown > a:hover .caret { + border-top-color: @navbarLinkColorActive; + border-bottom-color: @navbarLinkColorActive; +} + // Remove background color from open dropdown .navbar .nav li.dropdown.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, @@ -436,6 +443,10 @@ background-color: @navbarInverseLinkBackgroundActive; color: @navbarInverseLinkColorActive; } + .nav li.dropdown > a:hover .caret { + border-top-color: @navbarInverseLinkColorActive; + border-bottom-color: @navbarInverseLinkColorActive; + } .nav li.dropdown > .dropdown-toggle .caret { border-top-color: @navbarInverseLinkColor; border-bottom-color: @navbarInverseLinkColor; From fda5bb135e0a91f335f1e3bd4e5313070f6e0708 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Nov 2012 00:46:09 -0800 Subject: [PATCH 09/26] Fixes #5963: Add large button example to icons, fix vertical alignment in large buttons --- docs/assets/css/bootstrap.css | 2 +- docs/base-css.html | 8 ++++++++ docs/templates/pages/base-css.mustache | 8 ++++++++ less/buttons.less | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index f2cd3d3e98..ed58d7aafa 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3238,7 +3238,7 @@ button.close { .btn-large [class^="icon-"], .btn-large [class*=" icon-"] { - margin-top: 2px; + margin-top: 4px; } .btn-small { diff --git a/docs/base-css.html b/docs/base-css.html index fee6fc8970..69229231f6 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -2076,6 +2076,14 @@ For example, <code><section></code> should be wrapped as inlin <li><a href="#"><i class="i"></i> Make admin</a></li> </ul> </div> + + +
Large button
+
+ Star +
+
+<a class="btn btn-large" href="#"><i class="icon-star"></i> Star</a>
 
Small button
diff --git a/docs/templates/pages/base-css.mustache b/docs/templates/pages/base-css.mustache index 29c4cebb1e..17f446b3d8 100644 --- a/docs/templates/pages/base-css.mustache +++ b/docs/templates/pages/base-css.mustache @@ -2013,6 +2013,14 @@ <li><a href="#"><i class="i"></i> {{_i}}Make admin{{/i}}</a></li> </ul> </div> + + +
{{_i}}Large button{{/i}}
+
+ Star +
{{! /bs-docs-example }} +
+<a class="btn btn-large" href="#"><i class="icon-star"></i> Star</a>
 
{{_i}}Small button{{/i}}
diff --git a/less/buttons.less b/less/buttons.less index e0afbed96b..78371c6ff0 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -73,7 +73,7 @@ } .btn-large [class^="icon-"], .btn-large [class*=" icon-"] { - margin-top: 2px; + margin-top: 4px; } // Small From 693fd0db2a91ce6c8bc5ac354a6c8d97552013b7 Mon Sep 17 00:00:00 2001 From: Zulfiqar Ali Date: Wed, 28 Nov 2012 16:47:59 +0800 Subject: [PATCH 10/26] help-block margin-top should also apply after a span.uneditable-input --- less/forms.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/less/forms.less b/less/forms.less index 6a8edfb676..4e76173654 100644 --- a/less/forms.less +++ b/less/forms.less @@ -673,7 +673,7 @@ legend + .control-group { input, select, textarea, - span.input { + span.uneditable-input { + .help-block { margin-top: @baseLineHeight / 2; } From bfc97fdaf6cefceb4091e745977b5bac2ffda1c7 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Nov 2012 01:38:21 -0800 Subject: [PATCH 11/26] Fixes #4852: IE8 popover carets fixed * IE8 refused a negative z-index to place the previous :after behind the .arrow, so I had to flip the styles. * .arrow is the gray border/background, .arrow:after is now the white inner arrow * Added a hex IE8 fallback to ensure the arrow shows for Date: Wed, 28 Nov 2012 01:48:34 -0800 Subject: [PATCH 12/26] Fixes #5940: Prevent @headingsColor from changing alert colors --- docs/assets/css/bootstrap.css | 6 +++++- less/alerts.less | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 9eee6fa0ca..9c343dc172 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3803,7 +3803,6 @@ input[type="submit"].btn.btn-mini { .alert { padding: 8px 35px 8px 14px; margin-bottom: 20px; - color: #c09853; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); background-color: #fcf8e3; border: 1px solid #fbeed5; @@ -3812,6 +3811,11 @@ input[type="submit"].btn.btn-mini { border-radius: 4px; } +.alert, +.alert h4 { + color: #c09853; +} + .alert h4 { margin: 0; } diff --git a/less/alerts.less b/less/alerts.less index 9abb226d6b..37e50f9038 100644 --- a/less/alerts.less +++ b/less/alerts.less @@ -13,6 +13,10 @@ background-color: @warningBackground; border: 1px solid @warningBorder; .border-radius(@baseBorderRadius); +} +.alert, +.alert h4 { + // Specified for the h4 to prevent conflicts of changing @headingsColor color: @warningText; } .alert h4 { From 783120dffaab396955b0ad237bf3a82a73a6e1dc Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Nov 2012 01:51:04 -0800 Subject: [PATCH 13/26] Fixes #5927: Scope button group 5px button left margin to immediate children --- docs/assets/css/bootstrap.css | 6 +++--- less/button-groups.less | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 9c343dc172..b25535eb6e 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3573,9 +3573,9 @@ input[type="submit"].btn.btn-mini { font-size: 0; } -.btn-toolbar .btn + .btn, -.btn-toolbar .btn-group + .btn, -.btn-toolbar .btn + .btn-group { +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { margin-left: 5px; } diff --git a/less/button-groups.less b/less/button-groups.less index 002a3ff075..2963c75def 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -24,9 +24,9 @@ font-size: 0; // Hack to remove whitespace that results from using inline-block margin-top: @baseLineHeight / 2; margin-bottom: @baseLineHeight / 2; - .btn + .btn, - .btn-group + .btn, - .btn + .btn-group { + > .btn + .btn, + > .btn-group + .btn, + > .btn + .btn-group { margin-left: 5px; } } From bf3a5df371dc58cc4030bf0177b2be964054d4d8 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Nov 2012 02:10:23 -0800 Subject: [PATCH 14/26] Fixes #5930: redeclare font-size for popoves in btn-groups --- docs/assets/css/bootstrap.css | 3 ++- less/button-groups.less | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index b25535eb6e..8bdd175d60 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3591,7 +3591,8 @@ input[type="submit"].btn.btn-mini { } .btn-group > .btn, -.btn-group > .dropdown-menu { +.btn-group > .dropdown-menu, +.btn-group > .popover { font-size: 14px; } diff --git a/less/button-groups.less b/less/button-groups.less index 2963c75def..c830852b2b 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -40,7 +40,8 @@ margin-left: -1px; } .btn-group > .btn, -.btn-group > .dropdown-menu { +.btn-group > .dropdown-menu, +.btn-group > .popover { font-size: @baseFontSize; // redeclare as part 2 of font-size inline-block hack } From 296b8384050746b11c02bde2e68954981c3ec5fe Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Nov 2012 02:17:50 -0800 Subject: [PATCH 15/26] Fixes #5616: scope carousel state classes to immediate children only --- docs/assets/css/bootstrap.css | 28 ++++++++++++++-------------- less/carousel.less | 28 ++++++++++++++-------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 8bdd175d60..1088df9662 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -5912,7 +5912,7 @@ a.badge:hover { overflow: hidden; } -.carousel .item { +.carousel > .item { position: relative; display: none; -webkit-transition: 0.6s ease-in-out left; @@ -5921,46 +5921,46 @@ a.badge:hover { transition: 0.6s ease-in-out left; } -.carousel .item > img { +.carousel > .item > img { display: block; line-height: 1; } -.carousel .active, -.carousel .next, -.carousel .prev { +.carousel > .active, +.carousel > .next, +.carousel > .prev { display: block; } -.carousel .active { +.carousel > .active { left: 0; } -.carousel .next, -.carousel .prev { +.carousel > .next, +.carousel > .prev { position: absolute; top: 0; width: 100%; } -.carousel .next { +.carousel > .next { left: 100%; } -.carousel .prev { +.carousel > .prev { left: -100%; } -.carousel .next.left, -.carousel .prev.right { +.carousel > .next.left, +.carousel > .prev.right { left: 0; } -.carousel .active.left { +.carousel > .active.left { left: -100%; } -.carousel .active.right { +.carousel > .active.right { left: 100%; } diff --git a/less/carousel.less b/less/carousel.less index 33f98ac4d2..072884d4f7 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -17,48 +17,48 @@ .carousel { - .item { + > .item { display: none; position: relative; .transition(.6s ease-in-out left); } // Account for jankitude on images - .item > img { + > .item > img { display: block; line-height: 1; } - .active, - .next, - .prev { display: block; } + > .active, + > .next, + > .prev { display: block; } - .active { + > .active { left: 0; } - .next, - .prev { + > .next, + > .prev { position: absolute; top: 0; width: 100%; } - .next { + > .next { left: 100%; } - .prev { + > .prev { left: -100%; } - .next.left, - .prev.right { + > .next.left, + > .prev.right { left: 0; } - .active.left { + > .active.left { left: -100%; } - .active.right { + > .active.right { left: 100%; } From 8fb36cb3dd60c34afdbb8e46cc457b2e8795b3c5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Nov 2012 02:21:34 -0800 Subject: [PATCH 16/26] Fixes #5594: Vertical button groups show use max-width, not width, and be scoped to immediate children buttons only --- docs/assets/css/bootstrap.css | 14 +++++++------- less/button-groups.less | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 1088df9662..4647711247 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3763,39 +3763,39 @@ input[type="submit"].btn.btn-mini { *zoom: 1; } -.btn-group-vertical .btn { +.btn-group-vertical > .btn { display: block; float: none; - width: 100%; + max-width: 100%; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } -.btn-group-vertical .btn + .btn { +.btn-group-vertical > .btn + .btn { margin-top: -1px; margin-left: 0; } -.btn-group-vertical .btn:first-child { +.btn-group-vertical > .btn:first-child { -webkit-border-radius: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; } -.btn-group-vertical .btn:last-child { +.btn-group-vertical > .btn:last-child { -webkit-border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; } -.btn-group-vertical .btn-large:first-child { +.btn-group-vertical > .btn-large:first-child { -webkit-border-radius: 6px 6px 0 0; -moz-border-radius: 6px 6px 0 0; border-radius: 6px 6px 0 0; } -.btn-group-vertical .btn-large:last-child { +.btn-group-vertical > .btn-large:last-child { -webkit-border-radius: 0 0 6px 6px; -moz-border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px; diff --git a/less/button-groups.less b/less/button-groups.less index c830852b2b..d6054c8085 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -203,25 +203,25 @@ display: inline-block; // makes buttons only take up the width they need .ie7-inline-block(); } -.btn-group-vertical .btn { +.btn-group-vertical > .btn { display: block; float: none; - width: 100%; + max-width: 100%; .border-radius(0); } -.btn-group-vertical .btn + .btn { +.btn-group-vertical > .btn + .btn { margin-left: 0; margin-top: -1px; } -.btn-group-vertical .btn:first-child { +.btn-group-vertical > .btn:first-child { .border-radius(@baseBorderRadius @baseBorderRadius 0 0); } -.btn-group-vertical .btn:last-child { +.btn-group-vertical > .btn:last-child { .border-radius(0 0 @baseBorderRadius @baseBorderRadius); } -.btn-group-vertical .btn-large:first-child { +.btn-group-vertical > .btn-large:first-child { .border-radius(@borderRadiusLarge @borderRadiusLarge 0 0); } -.btn-group-vertical .btn-large:last-child { +.btn-group-vertical > .btn-large:last-child { .border-radius(0 0 @borderRadiusLarge @borderRadiusLarge); } From f1349a245096da5e29fd83fa99346e5e40faf077 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Nov 2012 02:22:37 -0800 Subject: [PATCH 17/26] Fixes #5533: Remove filter gradient from disabled links on dropdowns --- docs/assets/css/bootstrap.css | 1 + less/dropdowns.less | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 4647711247..71b486188f 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -2950,6 +2950,7 @@ table th[class*="span"], cursor: default; background-color: transparent; background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .open { diff --git a/less/dropdowns.less b/less/dropdowns.less index 90f3741e85..484bd3dda3 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -115,6 +115,7 @@ text-decoration: none; background-color: transparent; background-image: none; // Remove CSS gradient + .reset-filter(); cursor: default; } From fe8df5022be4a009d01fb8a1bd2a1386803b2ea2 Mon Sep 17 00:00:00 2001 From: "Kyle A. Matheny" Date: Wed, 28 Nov 2012 23:33:05 +0000 Subject: [PATCH 18/26] Update Makefile Fixed both instances of uglifyjs usage. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b62423d104..33d48ae222 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ build: @cp js/tests/vendor/jquery.js docs/assets/js/ @echo "Compiling documentation... ${CHECK} Done" @cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js js/bootstrap-affix.js > docs/assets/js/bootstrap.js - @uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js + @uglifyjs docs/assets/js/bootstrap.js -nc > docs/assets/js/bootstrap.min.tmp.js @echo "/**\n* Bootstrap.js v2.2.2 by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js @cat docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js > docs/assets/js/bootstrap.min.js @rm docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js @@ -72,7 +72,7 @@ bootstrap: recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css recess --compress ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.min.css cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js js/bootstrap-affix.js > bootstrap/js/bootstrap.js - uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.tmp.js + uglifyjs bootstrap/js/bootstrap.js -nc > bootstrap/js/bootstrap.min.tmp.js echo "/*!\n* Bootstrap.js by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > bootstrap/js/copyright.js cat bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js > bootstrap/js/bootstrap.min.js rm bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js From 78390d12afe2bc6f2b15f21f8ba87f8ba69738c6 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Nov 2012 15:40:51 -0800 Subject: [PATCH 19/26] Fix the carousel after we scoped selectors --- docs/assets/css/bootstrap.css | 28 ++++++++++++++-------------- less/carousel.less | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 71b486188f..225f8739dd 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -5913,7 +5913,7 @@ a.badge:hover { overflow: hidden; } -.carousel > .item { +.carousel-inner > .item { position: relative; display: none; -webkit-transition: 0.6s ease-in-out left; @@ -5922,46 +5922,46 @@ a.badge:hover { transition: 0.6s ease-in-out left; } -.carousel > .item > img { +.carousel-inner > .item > img { display: block; line-height: 1; } -.carousel > .active, -.carousel > .next, -.carousel > .prev { +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { display: block; } -.carousel > .active { +.carousel-inner > .active { left: 0; } -.carousel > .next, -.carousel > .prev { +.carousel-inner > .next, +.carousel-inner > .prev { position: absolute; top: 0; width: 100%; } -.carousel > .next { +.carousel-inner > .next { left: 100%; } -.carousel > .prev { +.carousel-inner > .prev { left: -100%; } -.carousel > .next.left, -.carousel > .prev.right { +.carousel-inner > .next.left, +.carousel-inner > .prev.right { left: 0; } -.carousel > .active.left { +.carousel-inner > .active.left { left: -100%; } -.carousel > .active.right { +.carousel-inner > .active.right { left: 100%; } diff --git a/less/carousel.less b/less/carousel.less index 072884d4f7..2dc0506032 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -15,7 +15,7 @@ position: relative; } -.carousel { +.carousel-inner { > .item { display: none; From ddd154481bc9341668f236ca071c936803e43f7a Mon Sep 17 00:00:00 2001 From: Zulfiqar Ali Date: Thu, 29 Nov 2012 17:40:23 +0800 Subject: [PATCH 20/26] added compiled css file --- docs/assets/css/bootstrap.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 2da34b4add..30b4407378 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -1957,7 +1957,8 @@ legend + .control-group { .form-horizontal input + .help-block, .form-horizontal select + .help-block, -.form-horizontal textarea + .help-block { +.form-horizontal textarea + .help-block, +.form-horizontal span.uneditable-input + .help-block { margin-top: 10px; } From acc037de15665614e61563903dbcdc3e4115eea6 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 29 Nov 2012 20:59:14 -0800 Subject: [PATCH 21/26] add holder and replace placehold.it --- docs/assets/js/bootstrap.min.js | 19 +- docs/assets/js/holder/holder.js | 230 +++++++++++++++++++++++ docs/base-css.html | 11 +- docs/components.html | 53 +++--- docs/customize.html | 5 +- docs/examples/carousel.html | 6 +- docs/extend.html | 5 +- docs/getting-started.html | 5 +- docs/index.html | 5 +- docs/javascript.html | 5 +- docs/scaffolding.html | 5 +- docs/templates/layout.mustache | 5 +- docs/templates/pages/base-css.mustache | 6 +- docs/templates/pages/components.mustache | 48 ++--- less/tests/css-tests.html | 38 ++-- 15 files changed, 360 insertions(+), 86 deletions(-) create mode 100755 docs/assets/js/holder/holder.js diff --git a/docs/assets/js/bootstrap.min.js b/docs/assets/js/bootstrap.min.js index 502b1d6c87..9ff72eb777 100644 --- a/docs/assets/js/bootstrap.min.js +++ b/docs/assets/js/bootstrap.min.js @@ -3,4 +3,21 @@ * Copyright 2012 Twitter, Inc. * http://www.apache.org/licenses/LICENSE-2.0.txt */ -!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0]});if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(document).on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.offset(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.detach(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);n[n.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover",title:"",delay:0,html:!1}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content > *")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'

'})}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}},e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length"+t+""})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=!~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'',item:'
  • ',minLength:1},e.fn.typeahead.Constructor=t,e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))},e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery); \ No newline at end of file +/* =================================================== + * bootstrap-transition.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#transitions + * =================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0]});if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(document).on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.offset(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.detach(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);n[n.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'
    ',trigger:"hover",title:"",delay:0,html:!1}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content > *")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'

    '})}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}},e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length"+t+""})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=!~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'',item:'
  • ',minLength:1},e.fn.typeahead.Constructor=t,e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))},e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery); \ No newline at end of file diff --git a/docs/assets/js/holder/holder.js b/docs/assets/js/holder/holder.js new file mode 100755 index 0000000000..6460c74dd2 --- /dev/null +++ b/docs/assets/js/holder/holder.js @@ -0,0 +1,230 @@ +/* + +Holder - 1.4 - client side image placeholders +(c) 2012 Ivan Malopinsky / http://imsky.co + +Provided under the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0 +Commercial use requires attribution. + +*/ + +var Holder = Holder || {}; +(function (app, win) { + +var preempted = false, +fallback = false, +canvas = document.createElement('canvas'); + +//getElementsByClassName polyfill +document.getElementsByClassName||(document.getElementsByClassName=function(e){var t=document,n,r,i,s=[];if(t.querySelectorAll)return t.querySelectorAll("."+e);if(t.evaluate){r=".//*[contains(concat(' ', @class, ' '), ' "+e+" ')]",n=t.evaluate(r,t,null,0,null);while(i=n.iterateNext())s.push(i)}else{n=t.getElementsByTagName("*"),r=new RegExp("(^|\\s)"+e+"(\\s|$)");for(i=0;i 1) { + text_height = Math.max(minFactor, template.size); + } + ctx.font = "bold " + text_height + "px sans-serif"; + ctx.fillText(text, (dimensions.width / 2), (dimensions.height / 2), dimensions.width); + return canvas.toDataURL("image/png"); +} + +if (!canvas.getContext) { + fallback = true; +} else { + if (canvas.toDataURL("image/png").indexOf("data:image/png") < 0) { + //Android doesn't support data URI + fallback = true; + } else { + var ctx = canvas.getContext("2d"); + } +} + +function render(mode, el, holder, src){ + + var dimensions = holder.dimensions, theme = holder.theme, text = holder.text; + var dimensions_caption = dimensions.width + "x" + dimensions.height; + theme = (text ? extend(theme, { text: text }) : theme); + + if(mode == "image"){ + el.setAttribute("data-src", src); + el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption); + el.style.width = dimensions.width + "px"; + el.style.height = dimensions.height + "px"; + el.style.backgroundColor = theme.background; + + if(!fallback){ + el.setAttribute("src", draw(ctx, dimensions, theme)); + } + } + else { + if(!fallback){ + el.style.backgroundImage = "url("+draw(ctx, dimensions, theme)+")"; + } + } + +}; + +function parse_flags(flags, options){ + + var ret = { + theme: settings.themes.gray + }, render = false; + + for (sl = flags.length, j = 0; j < sl; j++) { + if (app.flags.dimensions.match(flags[j])) { + render = true; + ret.dimensions = app.flags.dimensions.output(flags[j]); + } else if (app.flags.colors.match(flags[j])) { + ret.theme = app.flags.colors.output(flags[j]); + } else if (options.themes[flags[j]]) { + //If a theme is specified, it will override custom colors + ret.theme = options.themes[flags[j]]; + } else if (app.flags.text.match(flags[j])) { + ret.text = app.flags.text.output(flags[j]); + } + } + + return render ? ret : false; + +}; + +var settings = { + domain: "holder.js", + images: "img", + elements: ".holderjs", + themes: { + "gray": { + background: "#eee", + foreground: "#aaa", + size: 12 + }, + "social": { + background: "#3a5a97", + foreground: "#fff", + size: 12 + }, + "industrial": { + background: "#434A52", + foreground: "#C2F200", + size: 12 + } + } +}; + + +app.flags = { + dimensions: { + regex: /([0-9]+)x([0-9]+)/, + output: function(val){ + var exec = this.regex.exec(val); + return { + width: +exec[1], + height: +exec[2] + } + } + }, + colors: { + regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i, + output: function(val){ + var exec = this.regex.exec(val); + return { + size: settings.themes.gray.size, + foreground: "#" + exec[2], + background: "#" + exec[1] + } + } + }, + text: { + regex: /text\:(.*)/, + output: function(val){ + return this.regex.exec(val)[1]; + } + } +} + +for(var flag in app.flags){ + app.flags[flag].match = function (val){ + return val.match(this.regex) + } +} + +app.add_theme = function (name, theme) { + name != null && theme != null && (settings.themes[name] = theme); + return app; +}; + +app.add_image = function (src, el) { + var node = selector(el); + if (node.length) { + for (var i = 0, l = node.length; i < l; i++) { + var img = document.createElement("img") + img.setAttribute("data-src", src); + node[i].appendChild(img); + } + } + return app; +}; + +app.run = function (o) { + var options = extend(settings, o), + images = selector(options.images), + elements = selector(options.elements), + preempted = true; + + var cssregex = new RegExp(options.domain+"\/(.*?)\"?\\)"); + + for(var l = elements.length, i = 0; i < l; i++){ + var src = window.getComputedStyle(elements[i],null).getPropertyValue("background-image"); + var flags = src.match(cssregex); + if(flags){ + var holder = parse_flags(flags[1].split("/"), options); + if(holder){ + render("background", elements[i], holder, src); + } + } + } + + for (var l = images.length, i = 0; i < l; i++) { + var src = images[i].getAttribute("data-src") || images[i].getAttribute("src"); + if (src.indexOf(options.domain)>=0) { + var holder = parse_flags(src.substr(src.lastIndexOf(options.domain) + options.domain.length + 1).split("/"), options); + if (holder) { + render("image", images[i], holder, src); + } + } + } + return app; +}; + +contentLoaded(win, function () { + preempted || app.run() +}); + +})(Holder, window); diff --git a/docs/base-css.html b/docs/base-css.html index 69229231f6..651912f3af 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -1825,9 +1825,9 @@ For example, <code><section></code> should be wrapped as inlin

    Add classes to an <img> element to easily style images in any project.

    - - - + + +
     <img src="..." class="img-rounded">
    @@ -2173,7 +2173,6 @@ For example, <code><section></code> should be wrapped as inlin
         
         
         
    -    
         
         
         
    @@ -2187,6 +2186,10 @@ For example, <code><section></code> should be wrapped as inlin
         
         
         
    +
    +    
    +    
    +
         
     
     
    diff --git a/docs/components.html b/docs/components.html
    index 5cda4f168a..a5b1b6afa7 100644
    --- a/docs/components.html
    +++ b/docs/components.html
    @@ -1924,22 +1924,22 @@
                 
    @@ -1951,7 +1951,7 @@
                 
    • - +

      Thumbnail label

      Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

      @@ -1961,7 +1961,7 @@
    • - +

      Thumbnail label

      Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

      @@ -1971,7 +1971,7 @@
    • - +

      Thumbnail label

      Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

      @@ -1997,7 +1997,7 @@ <ul class="thumbnails"> <li class="span4"> <a href="#" class="thumbnail"> - <img src="http://placehold.it/300x200" alt=""> + <img data-src="holder.js/300x200" alt=""> </a> </li> ... @@ -2008,7 +2008,7 @@ <ul class="thumbnails"> <li class="span4"> <div class="thumbnail"> - <img src="http://placehold.it/300x200" alt=""> + <img data-src="holder.js/300x200" alt=""> <h3>Thumbnail label</h3> <p>Thumbnail caption...</p> </div> @@ -2022,27 +2022,27 @@ @@ -2314,7 +2314,7 @@
      - +

      Media heading

      @@ -2323,14 +2323,14 @@
      - +

      Media heading

      Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
      - +

      Media heading

      @@ -2343,7 +2343,7 @@
       <div class="media">
         <a class="pull-left" href="#">
      -    <img class="media-object" src="http://placehold.it/64x64">
      +    <img class="media-object" data-src="holder.js/64x64">
         </a>
         <div class="media-body">
           <h4 class="media-heading">Media heading</h4>
      @@ -2367,7 +2367,7 @@
                   
      • - +

        Media heading

        @@ -2375,7 +2375,7 @@
        - +

        Nested media heading

        @@ -2383,7 +2383,7 @@
        - +

        Nested media heading

        @@ -2395,7 +2395,7 @@
        - +

        Nested media heading

        @@ -2406,7 +2406,7 @@
      • - +

        Media heading

        @@ -2419,7 +2419,7 @@ <ul class="media-list"> <li class="media"> <a class="pull-left" href="#"> - <img class="media-object" src="http://placehold.it/64x64"> + <img class="media-object" data-src="holder.js/64x64"> </a> <div class="media-body"> <h4 class="media-heading">Media heading</h4> @@ -2581,7 +2581,6 @@ class="clearfix" - @@ -2595,6 +2594,10 @@ class="clearfix" + + + + diff --git a/docs/customize.html b/docs/customize.html index b2eddc592f..9d9d3c26b4 100644 --- a/docs/customize.html +++ b/docs/customize.html @@ -489,7 +489,6 @@ - @@ -503,6 +502,10 @@ + + + + diff --git a/docs/examples/carousel.html b/docs/examples/carousel.html index 92134c506f..42b95dd7e4 100644 --- a/docs/examples/carousel.html +++ b/docs/examples/carousel.html @@ -353,19 +353,19 @@
        - +

        Heading

        Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

        View details »

        - +

        Heading

        Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

        View details »

        - +

        Heading

        Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

        View details »

        diff --git a/docs/extend.html b/docs/extend.html index 31c0def849..938f064f4a 100644 --- a/docs/extend.html +++ b/docs/extend.html @@ -265,7 +265,6 @@ - @@ -279,6 +278,10 @@ + + + + diff --git a/docs/getting-started.html b/docs/getting-started.html index 17c11e5f1c..4f910e2dc0 100644 --- a/docs/getting-started.html +++ b/docs/getting-started.html @@ -343,7 +343,6 @@ - @@ -357,6 +356,10 @@ + + + + diff --git a/docs/index.html b/docs/index.html index ec26060852..12521d0654 100644 --- a/docs/index.html +++ b/docs/index.html @@ -196,7 +196,6 @@ - @@ -210,6 +209,10 @@ + + + + diff --git a/docs/javascript.html b/docs/javascript.html index f07f289099..9a834b8207 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -1726,7 +1726,6 @@ $('[data-spy="affix"]').each(function () { - @@ -1740,6 +1739,10 @@ $('[data-spy="affix"]').each(function () { + + + + diff --git a/docs/scaffolding.html b/docs/scaffolding.html index 31f2f986a6..4b13e28427 100644 --- a/docs/scaffolding.html +++ b/docs/scaffolding.html @@ -577,7 +577,6 @@ - @@ -591,6 +590,10 @@ + + + + diff --git a/docs/templates/layout.mustache b/docs/templates/layout.mustache index d0039b3469..9557ec44f6 100644 --- a/docs/templates/layout.mustache +++ b/docs/templates/layout.mustache @@ -109,7 +109,6 @@ - @@ -123,6 +122,10 @@ + + + + diff --git a/docs/templates/pages/base-css.mustache b/docs/templates/pages/base-css.mustache index 17f446b3d8..b042e34a58 100644 --- a/docs/templates/pages/base-css.mustache +++ b/docs/templates/pages/base-css.mustache @@ -1762,9 +1762,9 @@

        {{_i}}Add classes to an <img> element to easily style images in any project.{{/i}}

        - - - + + +
         <img src="..." class="img-rounded">
        diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache
        index 0a655d6de2..6fa1947028 100644
        --- a/docs/templates/pages/components.mustache
        +++ b/docs/templates/pages/components.mustache
        @@ -1853,22 +1853,22 @@
                     
        @@ -1880,7 +1880,7 @@
                     
        • - +

          {{_i}}Thumbnail label{{/i}}

          Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

          @@ -1890,7 +1890,7 @@
        • - +

          {{_i}}Thumbnail label{{/i}}

          Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

          @@ -1900,7 +1900,7 @@
        • - +

          {{_i}}Thumbnail label{{/i}}

          Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

          @@ -1926,7 +1926,7 @@ <ul class="thumbnails"> <li class="span4"> <a href="#" class="thumbnail"> - <img src="http://placehold.it/300x200" alt=""> + <img data-src="holder.js/300x200" alt=""> </a> </li> ... @@ -1937,7 +1937,7 @@ <ul class="thumbnails"> <li class="span4"> <div class="thumbnail"> - <img src="http://placehold.it/300x200" alt=""> + <img data-src="holder.js/300x200" alt=""> <h3>{{_i}}Thumbnail label{{/i}}</h3> <p>{{_i}}Thumbnail caption...{{/i}}</p> </div> @@ -1951,27 +1951,27 @@ @@ -2243,7 +2243,7 @@
          - +

          {{_i}}Media heading{{/i}}

          @@ -2252,14 +2252,14 @@
          - +

          {{_i}}Media heading{{/i}}

          Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
          - +

          {{_i}}Media heading{{/i}}

          @@ -2272,7 +2272,7 @@
           <div class="media">
             <a class="pull-left" href="#">
          -    <img class="media-object" src="http://placehold.it/64x64">
          +    <img class="media-object" data-src="holder.js/64x64">
             </a>
             <div class="media-body">
               <h4 class="media-heading">{{_i}}Media heading{{/i}}</h4>
          @@ -2296,7 +2296,7 @@
                       
          • - +

            {{_i}}Media heading{{/i}}

            @@ -2304,7 +2304,7 @@
            - +

            {{_i}}Nested media heading{{/i}}

            @@ -2312,7 +2312,7 @@
            - +

            {{_i}}Nested media heading{{/i}}

            @@ -2324,7 +2324,7 @@
            - +

            {{_i}}Nested media heading{{/i}}

            @@ -2335,7 +2335,7 @@
          • - +

            {{_i}}Media heading{{/i}}

            @@ -2348,7 +2348,7 @@ <ul class="media-list"> <li class="media"> <a class="pull-left" href="#"> - <img class="media-object" src="http://placehold.it/64x64"> + <img class="media-object" data-src="holder.js/64x64"> </a> <div class="media-body"> <h4 class="media-heading">{{_i}}Media heading{{/i}}</h4> diff --git a/less/tests/css-tests.html b/less/tests/css-tests.html index c0cb1485e9..f4df422aa1 100644 --- a/less/tests/css-tests.html +++ b/less/tests/css-tests.html @@ -107,13 +107,13 @@
            - +
            - +
            - +
            @@ -121,13 +121,13 @@
            - +
            - +
            - +
            @@ -996,16 +996,16 @@

            Default thumbnails (no grid sizing)

            • - +
            • - +
            • - +
            • - +
            @@ -1014,17 +1014,17 @@ @@ -1034,17 +1034,17 @@ @@ -1055,17 +1055,17 @@ From 38c546c785d4e96da097253dd135fa7ff9cac69e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 29 Nov 2012 21:35:45 -0800 Subject: [PATCH 22/26] upgrade to holder 1.6 --- docs/assets/js/holder/holder.js | 284 ++++++++++++++++++++++---------- 1 file changed, 198 insertions(+), 86 deletions(-) diff --git a/docs/assets/js/holder/holder.js b/docs/assets/js/holder/holder.js index 6460c74dd2..2377badf0e 100755 --- a/docs/assets/js/holder/holder.js +++ b/docs/assets/js/holder/holder.js @@ -1,6 +1,6 @@ /* -Holder - 1.4 - client side image placeholders +Holder - 1.6 - client side image placeholders (c) 2012 Ivan Malopinsky / http://imsky.co Provided under the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0 @@ -33,32 +33,160 @@ function selector(a){ //shallow object property extend function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c} -function draw(ctx, dimensions, template) { - var dimension_arr = [dimensions.height, dimensions.width].sort(); +function text_size(width, height, template) { + var dimension_arr = [height, width].sort(); var maxFactor = Math.round(dimension_arr[1] / 16), minFactor = Math.round(dimension_arr[0] / 16); var text_height = Math.max(template.size, maxFactor); - canvas.width = dimensions.width; - canvas.height = dimensions.height; + return { + height: text_height + } +} + +function draw(ctx, dimensions, template, ratio) { + var ts = text_size(dimensions.width, dimensions.height, template); + var text_height = ts.height; + var width = dimensions.width * ratio, height = dimensions.height * ratio; + canvas.width = width; + canvas.height = height; ctx.textAlign = "center"; ctx.textBaseline = "middle"; ctx.fillStyle = template.background; - ctx.fillRect(0, 0, dimensions.width, dimensions.height); + ctx.fillRect(0, 0, width, height); ctx.fillStyle = template.foreground; ctx.font = "bold " + text_height + "px sans-serif"; var text = template.text ? template.text : (dimensions.width + "x" + dimensions.height); - if (Math.round(ctx.measureText(text).width) / dimensions.width > 1) { - text_height = Math.max(minFactor, template.size); + if (ctx.measureText(text).width / width > 1) { + text_height = template.size / (ctx.measureText(text).width / width); } - ctx.font = "bold " + text_height + "px sans-serif"; - ctx.fillText(text, (dimensions.width / 2), (dimensions.height / 2), dimensions.width); + ctx.font = "bold " + (text_height * ratio) + "px sans-serif"; + ctx.fillText(text, (width / 2), (height / 2), width); return canvas.toDataURL("image/png"); } +function render(mode, el, holder, src) { + + var dimensions = holder.dimensions, + theme = holder.theme, + text = holder.text; + var dimensions_caption = dimensions.width + "x" + dimensions.height; + theme = (text ? extend(theme, { + text: text + }) : theme); + + var ratio = 1; + if(window.devicePixelRatio && window.devicePixelRatio > 1){ + ratio = window.devicePixelRatio; + } + + if (mode == "image") { + el.setAttribute("data-src", src); + el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption); + el.style.width = dimensions.width + "px"; + el.style.height = dimensions.height + "px"; + + if (fallback) { + el.style.backgroundColor = theme.background; + } + else{ + el.setAttribute("src", draw(ctx, dimensions, theme, ratio)); + } + } else { + if (!fallback) { + el.style.backgroundImage = "url(" + draw(ctx, dimensions, theme, ratio) + ")"; + el.style.backgroundSize = dimensions.width+"px "+dimensions.height+"px"; + } + } +}; + +function fluid(el, holder, src) { + var dimensions = holder.dimensions, + theme = holder.theme, + text = holder.text; + var dimensions_caption = dimensions.width + "x" + dimensions.height; + theme = (text ? extend(theme, { + text: text + }) : theme); + + var fluid = document.createElement("table"); + fluid.setAttribute("cellspacing",0) + fluid.setAttribute("cellpadding",0) + fluid.setAttribute("border",0) + + var row = document.createElement("tr") + .appendChild(document.createElement("td") + .appendChild(document.createTextNode(theme.text))); + + fluid.style.backgroundColor = theme.background; + fluid.style.color = theme.foreground; + fluid.className = el.className + " holderjs-fluid"; + fluid.style.width = holder.dimensions.width + (holder.dimensions.width.indexOf("%")>0?"":"px"); + fluid.style.height = holder.dimensions.height + (holder.dimensions.height.indexOf("%")>0?"":"px"); + fluid.id = el.id; + + var frag = document.createDocumentFragment(), + tbody = document.createElement("tbody"), + tr = document.createElement("tr"), + td = document.createElement("td"); + tr.appendChild(td); + tbody.appendChild(tr); + frag.appendChild(tbody); + + if (theme.text) { + td.appendChild(document.createTextNode(theme.text)) + fluid.appendChild(frag); + } else { + td.appendChild(document.createTextNode(dimensions_caption)) + fluid.appendChild(frag); + fluid_images.push(fluid); + setTimeout(fluid_update, 0); + } + + el.parentNode.replaceChild(fluid, el); +} + +function fluid_update() { + for (i in fluid_images) { + var el = fluid_images[i]; + var label = el.getElementsByTagName("td")[0].firstChild; + label.data = el.offsetWidth + "x" + el.offsetHeight; + } +} + +function parse_flags(flags, options) { + + var ret = { + theme: settings.themes.gray + }, render = false; + + for (sl = flags.length, j = 0; j < sl; j++) { + var flag = flags[j]; + if (app.flags.dimensions.match(flag)) { + render = true; + ret.dimensions = app.flags.dimensions.output(flag); + } else if (app.flags.fluid.match(flag)) { + render = true; + ret.dimensions = app.flags.fluid.output(flag); + ret.fluid = true; + } else if (app.flags.colors.match(flag)) { + ret.theme = app.flags.colors.output(flag); + } else if (options.themes[flag]) { + //If a theme is specified, it will override custom colors + ret.theme = options.themes[flag]; + } else if (app.flags.text.match(flag)) { + ret.text = app.flags.text.output(flag); + } + } + + return render ? ret : false; + +}; + if (!canvas.getContext) { fallback = true; } else { - if (canvas.toDataURL("image/png").indexOf("data:image/png") < 0) { + if (canvas.toDataURL("image/png") + .indexOf("data:image/png") < 0) { //Android doesn't support data URI fallback = true; } else { @@ -66,54 +194,7 @@ if (!canvas.getContext) { } } -function render(mode, el, holder, src){ - - var dimensions = holder.dimensions, theme = holder.theme, text = holder.text; - var dimensions_caption = dimensions.width + "x" + dimensions.height; - theme = (text ? extend(theme, { text: text }) : theme); - - if(mode == "image"){ - el.setAttribute("data-src", src); - el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption); - el.style.width = dimensions.width + "px"; - el.style.height = dimensions.height + "px"; - el.style.backgroundColor = theme.background; - - if(!fallback){ - el.setAttribute("src", draw(ctx, dimensions, theme)); - } - } - else { - if(!fallback){ - el.style.backgroundImage = "url("+draw(ctx, dimensions, theme)+")"; - } - } - -}; - -function parse_flags(flags, options){ - - var ret = { - theme: settings.themes.gray - }, render = false; - - for (sl = flags.length, j = 0; j < sl; j++) { - if (app.flags.dimensions.match(flags[j])) { - render = true; - ret.dimensions = app.flags.dimensions.output(flags[j]); - } else if (app.flags.colors.match(flags[j])) { - ret.theme = app.flags.colors.output(flags[j]); - } else if (options.themes[flags[j]]) { - //If a theme is specified, it will override custom colors - ret.theme = options.themes[flags[j]]; - } else if (app.flags.text.match(flags[j])) { - ret.text = app.flags.text.output(flags[j]); - } - } - - return render ? ret : false; - -}; +var fluid_images = []; var settings = { domain: "holder.js", @@ -125,24 +206,25 @@ var settings = { foreground: "#aaa", size: 12 }, - "social": { + "social": { background: "#3a5a97", foreground: "#fff", size: 12 }, - "industrial": { + "industrial": { background: "#434A52", foreground: "#C2F200", size: 12 } - } + }, + stylesheet: ".holderjs-fluid {font-size:16px;font-weight:bold;text-align:center;font-family:sans-serif;border-collapse:collapse;border:0;vertical-align:middle;margin:0}" }; app.flags = { dimensions: { - regex: /([0-9]+)x([0-9]+)/, - output: function(val){ + regex: /(\d+)x(\d+)/, + output: function (val) { var exec = this.regex.exec(val); return { width: +exec[1], @@ -150,27 +232,37 @@ app.flags = { } } }, - colors: { - regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i, - output: function(val){ + fluid: { + regex: /([0-9%]+)x([0-9%]+)/, + output: function (val) { var exec = this.regex.exec(val); return { - size: settings.themes.gray.size, - foreground: "#" + exec[2], - background: "#" + exec[1] - } + width: exec[1], + height: exec[2] + } + } + }, + colors: { + regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i, + output: function (val) { + var exec = this.regex.exec(val); + return { + size: settings.themes.gray.size, + foreground: "#" + exec[2], + background: "#" + exec[1] + } } }, text: { regex: /text\:(.*)/, - output: function(val){ + output: function (val) { return this.regex.exec(val)[1]; } } } -for(var flag in app.flags){ - app.flags[flag].match = function (val){ +for (var flag in app.flags) { + app.flags[flag].match = function (val) { return val.match(this.regex) } } @@ -194,29 +286,43 @@ app.add_image = function (src, el) { app.run = function (o) { var options = extend(settings, o), - images = selector(options.images), + images_nodes = selector(options.images), elements = selector(options.elements), - preempted = true; + preempted = true, + images = []; - var cssregex = new RegExp(options.domain+"\/(.*?)\"?\\)"); + for (i = 0, l = images_nodes.length; i < l; i++) images.push(images_nodes[i]); - for(var l = elements.length, i = 0; i < l; i++){ - var src = window.getComputedStyle(elements[i],null).getPropertyValue("background-image"); + var holdercss = document.createElement("style"); + holdercss.type = "text/css"; + holdercss.styleSheet ? holdercss.styleSheet.cssText = options.stylesheet : holdercss.textContent = options.stylesheet; + document.getElementsByTagName("head")[0].appendChild(holdercss); + + var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)"); + + for (var l = elements.length, i = 0; i < l; i++) { + var src = window.getComputedStyle(elements[i], null) + .getPropertyValue("background-image"); var flags = src.match(cssregex); - if(flags){ + if (flags) { var holder = parse_flags(flags[1].split("/"), options); - if(holder){ + if (holder) { render("background", elements[i], holder, src); } } } for (var l = images.length, i = 0; i < l; i++) { - var src = images[i].getAttribute("data-src") || images[i].getAttribute("src"); - if (src.indexOf(options.domain)>=0) { - var holder = parse_flags(src.substr(src.lastIndexOf(options.domain) + options.domain.length + 1).split("/"), options); + var src = images[i].getAttribute("src") || images[i].getAttribute("data-src"); + if (src != null && src.indexOf(options.domain) >= 0) { + var holder = parse_flags(src.substr(src.lastIndexOf(options.domain) + options.domain.length + 1) + .split("/"), options); if (holder) { - render("image", images[i], holder, src); + if (holder.fluid) { + fluid(images[i], holder, src); + } else { + render("image", images[i], holder, src); + } } } } @@ -224,7 +330,13 @@ app.run = function (o) { }; contentLoaded(win, function () { - preempted || app.run() + if (window.addEventListener) { + window.addEventListener("resize", fluid_update, false); + window.addEventListener("orientationchange", fluid_update, false); + } else { + window.attachEvent("onresize", fluid_update) + } + preempted || app.run(); }); })(Holder, window); From 721b56830358f283caf1e7887e3308a79e98b825 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 29 Nov 2012 23:27:09 -0800 Subject: [PATCH 23/26] update comment --- less/navs.less | 1 + 1 file changed, 1 insertion(+) diff --git a/less/navs.less b/less/navs.less index 4cffa8a68d..2d08e79dac 100644 --- a/less/navs.less +++ b/less/navs.less @@ -22,6 +22,7 @@ } // Prevent IE8 from misplacing imgs +// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989 .nav > li > a > img { max-width: none; } From 322a56354fdc576492769c631cb7af51edcb7a68 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 29 Nov 2012 23:27:20 -0800 Subject: [PATCH 24/26] run make with nav img fix --- docs/assets/css/bootstrap.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 225f8739dd..e6003ee147 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3877,6 +3877,10 @@ input[type="submit"].btn.btn-mini { background-color: #eeeeee; } +.nav > li > a > img { + max-width: none; +} + .nav > .pull-right { float: right; } From f087b3428c6b48ee34b8da3991fc692e04719898 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 29 Nov 2012 23:33:09 -0800 Subject: [PATCH 25/26] remove element from selector --- docs/assets/css/bootstrap.css | 2 +- less/forms.less | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 79a7a1520d..50453131c2 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -1958,7 +1958,7 @@ legend + .control-group { .form-horizontal input + .help-block, .form-horizontal select + .help-block, .form-horizontal textarea + .help-block, -.form-horizontal span.uneditable-input + .help-block { +.form-horizontal .uneditable-input + .help-block { margin-top: 10px; } diff --git a/less/forms.less b/less/forms.less index 4e76173654..1e1a04bdfb 100644 --- a/less/forms.less +++ b/less/forms.less @@ -673,7 +673,7 @@ legend + .control-group { input, select, textarea, - span.uneditable-input { + .uneditable-input { + .help-block { margin-top: @baseLineHeight / 2; } From bca3ff4ed6f42701ceae1405f518c35ec8c623be Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 29 Nov 2012 23:39:33 -0800 Subject: [PATCH 26/26] Fixes #5853: Maintain 10px margin above help block when following input groups --- docs/assets/css/bootstrap.css | 4 +++- less/forms.less | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 50453131c2..732724f137 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -1958,7 +1958,9 @@ legend + .control-group { .form-horizontal input + .help-block, .form-horizontal select + .help-block, .form-horizontal textarea + .help-block, -.form-horizontal .uneditable-input + .help-block { +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { margin-top: 10px; } diff --git a/less/forms.less b/less/forms.less index 1e1a04bdfb..2dff229191 100644 --- a/less/forms.less +++ b/less/forms.less @@ -673,7 +673,9 @@ legend + .control-group { input, select, textarea, - .uneditable-input { + .uneditable-input, + .input-prepend, + .input-append { + .help-block { margin-top: @baseLineHeight / 2; }