1)f[0]=[a.makeArray(d)];if(h&&c)f[2]=function(b){a.tmpl.afterManip(this,b,j)};r.apply(this,f)}else r.apply(this,arguments);c=0;!e&&a.tmpl.complete(b);return this}});a.extend({tmpl:function(d,h,e,c){var j,k=!c;if(k){c=p;d=a.template[d]||a.template(null,d);f={}}else if(!d){d=c.tmpl;b[c.key]=c;c.nodes=[];c.wrapped&&n(c,c.wrapped);return a(i(c,null,c.tmpl(a,c)))}if(!d)return[];if(typeof h==="function")h=h.call(c||{});e&&e.wrapped&&n(e,e.wrapped);j=a.isArray(h)?a.map(h,function(a){return a?g(e,c,d,a):null}):[g(e,c,d,h)];return k?a(i(c,null,j)):j},tmplItem:function(b){var c;if(b instanceof a)b=b[0];while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return c||p},template:function(c,b){if(b){if(typeof b==="string")b=o(b);else if(b instanceof a)b=b[0]||{};if(b.nodeType)b=a.data(b,"tmpl")||a.data(b,"tmpl",o(b.innerHTML));return typeof c==="string"?(a.template[c]=b):b}return c?typeof c!=="string"?a.template(null,c):a.template[c]||a.template(null,q.test(c)?c:a(c)):null},encode:function(a){return(""+a).split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){_=_.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(_,$1,$2);_=[];",close:"call=$item.calls();_=call._.concat($item.wrap(call,_));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){_.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){_.push($.encode($1a));}"},"!":{open:""}},complete:function(){b={}},afterManip:function(f,b,d){var e=b.nodeType===11?a.makeArray(b.childNodes):b.nodeType===1?[b]:[];d.call(f,b);m(e);c++}});function i(e,g,f){var b,c=f?a.map(f,function(a){return typeof a==="string"?e.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+e.key+'" $2'):a:i(a,e,a._ctnt)}):e;if(g)return c;c=c.join("");c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(f,c,e,d){b=a(e).get();m(b);if(c)b=j(c).concat(b);if(d)b=b.concat(j(d))});return b?b:j(c)}function j(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function o(b){return new Function("jQuery","$item","var $=jQuery,call,_=[],$data=$item.data;with($data){_.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(m,l,j,d,b,c,e){var i=a.tmpl.tag[j],h,f,g;if(!i)throw"Template command not found: "+j;h=i._default||[];if(c&&!/\w$/.test(b)){b+=c;c=""}if(b){b=k(b);e=e?","+k(e)+")":c?")":"";f=c?b.indexOf(".")>-1?b+c:"("+b+").call($item"+e:b;g=c?f:"(typeof("+b+")==='function'?("+b+").call($item):("+b+"))"}else g=f=h.$1||"null";d=k(d);return"');"+i[l?"close":"open"].split("$notnull_1").join(b?"typeof("+b+")!=='undefined' && ("+b+")!=null":"true").split("$1a").join(g).split("$1").join(f).split("$2").join(d?d.replace(/\s*([^\(]+)\s*(\((.*?)\))?/g,function(d,c,b,a){a=a?","+a+")":b?")":"";return a?"("+c+").call($item"+a:d}):h.$2||"")+"_.push('"})+"');}return _;")}function n(c,b){c._wrap=i(c,true,a.isArray(b)?b:[q.test(b)?b:a(b).html()]).join("")}function k(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function s(b){var a=document.createElement("div");a.appendChild(b.cloneNode(true));return a.innerHTML}function m(o){var n="_"+c,k,j,l={},e,p,i;for(e=0,p=o.length;e=0;i--)m(j[i]);m(k)}function m(j){var p,i=j,k,e,m;if(m=j.getAttribute(d)){while(i.parentNode&&(i=i.parentNode).nodeType===1&&!(p=i.getAttribute(d)));if(p!==m){i=i.parentNode?i.nodeType===11?0:i.getAttribute(d)||0:0;if(!(e=b[m])){e=f[m];e=g(e,b[i]||f[i],null,true);e.key=++h;b[h]=e}c&&o(m)}j.removeAttribute(d)}else if(c&&(e=a.data(j,"tmplItem"))){o(e.key);b[e.key]=e;i=a.data(j.parentNode,"tmplItem");i=i?i.key:0}if(e){k=e;while(k&&k.key!=i){k.nodes.push(j);k=k.parent}delete e._ctnt;delete e._wrap;a.data(j,"tmplItem",e)}function o(a){a=a+n;e=l[a]=l[a]||g(e,b[e.parent.key+n]||e.parent,null,true)}}}function u(a,d,c,b){if(!a)return l.pop();l.push({_:a,tmpl:d,item:this,data:c,options:b})}function w(d,c,b){return a.tmpl(a.template(d),c,b,this)}function x(b,d){var c=b.options||{};c.wrapped=d;return a.tmpl(a.template(b.tmpl),b.data,c,b.item)}function v(d,c){var b=this._wrap;return a.map(a(a.isArray(b)?b.join(""):b).filter(d||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||s(a)})}function t(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]);a(b).remove()}})(jQuery)
--------------------------------------------------------------------------------
/source/popover-extra-placements.js:
--------------------------------------------------------------------------------
1 | /* ===================================================
2 | * popover-extra-placements.js v0.1
3 | * http://twitter.github.com/bootstrap-popover-extra-placements
4 | * ===================================================
5 | * Copyright 2012 Daniel Kleehammer
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | (function($) {
22 | "use strict"; // jshint;_;
23 |
24 | // save the original plugin function object
25 | var _super = $.fn.popover;
26 |
27 | // create a new constructor
28 | var Popover = function(element, options) {
29 | _super.Constructor.apply(this, arguments);
30 | };
31 |
32 | // extend prototypes and create a super function
33 | Popover.prototype = $.extend({}, _super.Constructor.prototype, {
34 | constructor: Popover,
35 | _super: function() {
36 | var args = $.makeArray(arguments);
37 | _super.Constructor.prototype[args.shift()].apply(this, args);
38 | },
39 | show: function() {
40 | var $tip, inside, pos, actualWidth, actualHeight, placement, tp, e = $.Event('show');
41 |
42 | if (this.hasContent && this.enabled) {
43 | this.$element.trigger(e);
44 | $tip = this.tip();
45 | this.setContent();
46 |
47 | if (this.options.animation) {
48 | $tip.addClass('fade');
49 | }
50 |
51 | placement = typeof this.options.placement == 'function' ?
52 | this.options.placement.call(this, $tip[0], this.$element[0]) :
53 | this.options.placement;
54 |
55 | inside = /in/.test(placement);
56 |
57 | $tip
58 | .remove()
59 | .css({ top: 0, left: 0, display: 'block' })
60 | .appendTo(inside ? this.$element : document.body);
61 |
62 | pos = this.getPosition(inside);
63 |
64 | actualWidth = $tip[0].offsetWidth;
65 | actualHeight = $tip[0].offsetHeight;
66 |
67 | switch (inside ? placement.split(' ')[1] : placement) {
68 | case 'bottom':
69 | tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2};
70 | break;
71 | case 'top':
72 | tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2};
73 | break;
74 | case 'left':
75 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth};
76 | break;
77 | case 'right':
78 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width};
79 | break;
80 |
81 | // extend placements (top)
82 | case 'topLeft':
83 | tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - (actualWidth * .20)};
84 | break;
85 | case 'topRight':
86 | tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - (actualWidth * .80)};
87 | break;
88 |
89 | // extend placements (right)
90 | case 'rightTop':
91 | tp = {top: pos.top + pos.height / 2 - (actualHeight *.20), left: pos.left + pos.width};
92 | break;
93 | case 'rightBottom':
94 | tp = {top: pos.top + pos.height / 2 - (actualHeight * .80), left: pos.left + pos.width};
95 | break;
96 |
97 | // extend placements (bottom)
98 | case 'bottomLeft':
99 | tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - (actualWidth * .20)};
100 | break;
101 | case 'bottomRight':
102 | tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - (actualWidth * .80)};
103 | break;
104 |
105 | // extend placements (left)
106 | case 'leftTop':
107 | tp = {top: pos.top + pos.height / 2 - (actualHeight *.20), left: pos.left - actualWidth};
108 | break;
109 | case 'leftBottom':
110 | tp = {top: pos.top + pos.height / 2 - (actualHeight * .80), left: pos.left - actualWidth};
111 | break;
112 |
113 | }
114 |
115 | $tip
116 | .css(tp)
117 | .addClass(placement)
118 | .addClass('in');
119 |
120 | this.$element.trigger('shown');
121 | }
122 | }
123 | });
124 |
125 | $.fn.popover = $.extend(function (option) {
126 | return this.each(function () {
127 | var $this = $(this)
128 | , data = $this.data('bs.popover')
129 | , options = typeof option == 'object' && option;
130 | if (!data) $this.data('bs.popover', (data = new Popover(this, options)));
131 | if (typeof option == 'string') data[option]();
132 | });
133 | }, _super);
134 |
135 | // this plugin uses styles stored in a separate file.
136 | $(document).find('script').each(function(index, script){
137 | if (script.src.indexOf('popover-extra-placements.js') != -1) {
138 | $('head').append('');
139 | } else if (script.src.indexOf('popover-extra-placements.min.js') != -1) {
140 | $('head').append('');
141 | }
142 | });
143 | })(jQuery);
144 |
--------------------------------------------------------------------------------
/source/popover-extra-placements.less:
--------------------------------------------------------------------------------
1 | /* ===================================================
2 | * popover-extra-placements.css v0.1
3 | * http://twitter.github.com/bootstrap-popover-extra-placements
4 | * ===================================================
5 | * Copyright 2012 Daniel Kleehammer
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | /** Global variables **/
22 | @popover_margin: 10px;
23 | @arrow_border: 10px;
24 | @arrow_color: #fff;
25 | @arrow_after_border: 11px;
26 | @arrow_after_color: rgba(0, 0, 0, 0.25);
27 |
28 |
29 |
30 |
31 | /*************************
32 | * Top Positions
33 | *************************/
34 |
35 | /** Top Left **/
36 | .popover.topLeft {
37 | margin-top: -@popover_margin;
38 | }
39 | .popover.topLeft {
40 | .arrow {
41 | bottom: -@popover_margin;
42 | left: 25%;
43 | margin-left: -10px;
44 | border-width: @arrow_border @arrow_border 0;
45 | border-top-color: @arrow_color;
46 | }
47 | .arrow:after {
48 | border-width: @arrow_after_border @arrow_after_border 0;
49 | border-top-color: @arrow_after_color;
50 | bottom: -1px;
51 | left: -@arrow_after_border;
52 | }
53 | }
54 |
55 | /** Top Right **/
56 | .popover.topRight {
57 | margin-top: -@popover_margin;
58 | .arrow {
59 | bottom: -@popover_margin;
60 | left: 75%;
61 | margin-left: -10px;
62 | border-width: @arrow_border @arrow_border 0;
63 | border-top-color: @arrow_color;
64 | }
65 | .arrow:after {
66 | border-width: @arrow_after_border @arrow_after_border 0;
67 | border-top-color: @arrow_after_color;
68 | bottom: -1px;
69 | left: -@arrow_after_border;
70 | }
71 | }
72 |
73 | /*************************
74 | * Right Positions
75 | *************************/
76 |
77 | /** Right Top **/
78 | .popover.rightTop {
79 | margin-left: @popover_margin;
80 | .arrow {
81 | top: 25%;
82 | left: -@popover_margin;
83 | margin-top: -@popover_margin;
84 | border-width: @arrow_border @arrow_border @arrow_border 0;
85 | border-right-color: @arrow_color;
86 | }
87 | .arrow:after {
88 | border-width: @arrow_after_border @arrow_after_border @arrow_after_border 0;
89 | border-right-color: @arrow_after_color;
90 | bottom: -@arrow_after_border;
91 | left: -1px;
92 | }
93 | }
94 | .popover.rightBottom {
95 | margin-left: @popover_margin;
96 | .arrow {
97 | top: 75%;
98 | left: -@popover_margin;
99 | margin-top: -@popover_margin;
100 | border-width: @arrow_border @arrow_border @arrow_border 0;
101 | border-right-color: @arrow_color;
102 | }
103 | .arrow:after {
104 | border-width: @arrow_after_border @arrow_after_border @arrow_after_border 0;
105 | border-right-color: @arrow_after_color;
106 | bottom: -@arrow_after_border;
107 | left: -1px;
108 | }
109 | }
110 |
111 | /*************************
112 | * Bottom Positions
113 | *************************/
114 |
115 | /** Bottom Left **/
116 | .popover.bottomLeft {
117 | margin-top: @popover_margin;
118 | .arrow {
119 | top: -@popover_margin;
120 | left: 25%;
121 | margin-left: -@popover_margin;
122 | border-width: 0 @arrow_border @arrow_border;
123 | border-bottom-color: @arrow_color;
124 | }
125 | .arrow:after {
126 | border-width: 0 @arrow_after_border @arrow_after_border;
127 | border-bottom-color: @arrow_after_color;
128 | top: -1px;
129 | left: -@arrow_after_border;
130 | }
131 | }
132 |
133 | /** Bottom Right **/
134 | .popover.bottomRight {
135 | margin-top: @popover_margin;
136 | .arrow {
137 | top: -@popover_margin;
138 | left: 75%;
139 | margin-left: -@popover_margin;
140 | border-width: 0 @arrow_border @arrow_border;
141 | border-bottom-color: @arrow_color;
142 | }
143 | .arrow:after {
144 | border-width: 0 @arrow_after_border @arrow_after_border;
145 | border-bottom-color: @arrow_after_color;
146 | top: -1px;
147 | left: -@arrow_after_border;
148 | }
149 | }
150 |
151 | /*************************
152 | * Left Positions
153 | *************************/
154 |
155 | /** Left Top **/
156 | .popover.leftTop {
157 | margin-left: -@popover_margin;
158 | .arrow {
159 | top: 25%;
160 | right: -@popover_margin;
161 | margin-top: -@popover_margin;
162 | border-width: @arrow_border 0 @arrow_border @arrow_border;
163 | border-left-color: @arrow_color;
164 | }
165 | .arrow:after {
166 | border-width: @arrow_after_border 0 @arrow_after_border @arrow_after_border;
167 | border-left-color: @arrow_after_color;
168 | bottom: -@arrow_after_border;
169 | right: -1px;
170 | }
171 | }
172 |
173 | /** Left Bottom **/
174 | .popover.leftBottom {
175 | margin-left: -@popover_margin;
176 | .arrow {
177 | top: 75%;
178 | right: -@popover_margin;
179 | margin-top: -@popover_margin;
180 | border-width: @arrow_border 0 @arrow_border @arrow_border;
181 | border-left-color: @arrow_color;
182 | }
183 | .arrow:after {
184 | border-width: @arrow_after_border 0 @arrow_after_border @arrow_after_border;
185 | border-left-color: @arrow_after_color;
186 | bottom: -@arrow_after_border;
187 | right: -1px;
188 | }
189 | }
190 |
191 |
--------------------------------------------------------------------------------
/example/bootstrap/css/bootstrap-responsive.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Responsive v2.1.1
3 | *
4 | * Copyright 2012 Twitter, Inc
5 | * Licensed under the Apache License v2.0
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Designed and built with all the love in the world @twitter by @mdo and @fat.
9 | */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade.in{top:auto}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}
10 |
--------------------------------------------------------------------------------
/example/bootstrap/js/bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Bootstrap.js by @fat & @mdo
3 | * plugins: bootstrap-transition.js, bootstrap-modal.js, bootstrap-dropdown.js, bootstrap-scrollspy.js, bootstrap-tab.js, bootstrap-tooltip.js, bootstrap-popover.js, bootstrap-affix.js, bootstrap-alert.js, bootstrap-button.js, bootstrap-collapse.js, bootstrap-carousel.js, bootstrap-typeahead.js
4 | * Copyright 2012 Twitter, Inc.
5 | * http://www.apache.org/licenses/LICENSE-2.0.txt
6 | */
7 | !function(a){a(function(){a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c);if(this.isShown||c.isDefaultPrevented())return;a("body").addClass("modal-open"),this.isShown=!0,this.escape(),this.backdrop(function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in").attr("aria-hidden",!1).focus(),b.enforceFocus(),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();var c=this;b=a.Event("hide"),this.$element.trigger(b);if(!this.isShown||b.isDefaultPrevented())return;this.isShown=!1,a("body").removeClass("modal-open"),this.escape(),a(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var b=this;a(document).on("focusin.modal",function(a){b.$element[0]!==a.target&&!b.$element.has(a.target).length&&b.$element.focus()})},escape:function(){var a=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(b){b.which==27&&a.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),b.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),b.hideModal()})},hideModal:function(a){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('
').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(this.removeBackdrop,this)):this.removeBackdrop()):b&&b()}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),typeof c=="object"&&c);e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f).one("hide",function(){c.focus()})})})}(window.jQuery),!function(a){function d(){e(a(b)).removeClass("open")}function e(b){var c=b.attr("data-target"),d;return c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,"")),d=a(c),d.length||(d=b.parent()),d}var b="[data-toggle=dropdown]",c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),f,g;if(c.is(".disabled, :disabled"))return;return f=e(c),g=f.hasClass("open"),d(),g||(f.toggleClass("open"),c.focus()),!1},keydown:function(b){var c,d,f,g,h,i;if(!/(38|40|27)/.test(b.keyCode))return;c=a(this),b.preventDefault(),b.stopPropagation();if(c.is(".disabled, :disabled"))return;g=e(c),h=g.hasClass("open");if(!h||h&&b.keyCode==27)return c.click();d=a("[role=menu] li:not(.divider) a",g);if(!d.length)return;i=d.index(d.filter(":focus")),b.keyCode==38&&i>0&&i--,b.keyCode==40&&i a",this.$body=a("body"),this.refresh(),this.process()}b.prototype={constructor:b,refresh:function(){var b=this,c;this.offsets=a([]),this.targets=a([]),c=this.$body.find(this.selector).map(function(){var b=a(this),c=b.data("target")||b.attr("href"),d=/^#\w/.test(c)&&a(c);return d&&d.length&&[[d.position().top,c]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,c=b-this.$scrollElement.height(),d=this.offsets,e=this.targets,f=this.activeTarget,g;if(a>=c)return f!=(g=e.last()[0])&&this.activate(g);for(g=d.length;g--;)f!=e[g]&&a>=d[g]&&(!d[g+1]||a<=d[g+1])&&this.activate(e[g])},activate:function(b){var c,d;this.activeTarget=b,a(this.selector).parent(".active").removeClass("active"),d=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',c=a(d).parent("li").addClass("active"),c.parent(".dropdown-menu").length&&(c=c.closest("li.dropdown").addClass("active")),c.trigger("activate")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f,g;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],g=a.Event("show",{relatedTarget:e}),b.trigger(g);if(g.isDefaultPrevented())return;f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery),!function(a){var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouseenter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);if(!c.options.delay||!c.options.delay.show)return c.show();clearTimeout(this.timeout),c.hoverState="in",this.timeout=setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show)},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!c.options.delay||!c.options.delay.hide)return c.hide();c.hoverState="out",this.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}var b=this,c=this.tip();return c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.remove(),this},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a},tip:function(){return this.$tip=this.$tip||a(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(){this[this.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover",title:"",delay:0,html:!0}}(window.jQuery),!function(a){var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content > *")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:''})}(window.jQuery),!function(a){var b=function(b,c){this.options=a.extend({},a.fn.affix.defaults,c),this.$window=a(window).on("scroll.affix.data-api",a.proxy(this.checkPosition,this)),this.$element=a(b),this.checkPosition()};b.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var b=a(document).height(),c=this.$window.scrollTop(),d=this.$element.offset(),e=this.options.offset,f=e.bottom,g=e.top,h="affix affix-top affix-bottom",i;typeof e!="object"&&(f=g=e),typeof g=="function"&&(g=e.top()),typeof f=="function"&&(f=e.bottom()),i=this.unpin!=null&&c+this.unpin<=d.top?!1:f!=null&&d.top+this.$element.height()>=b-f?"bottom":g!=null&&c<=g?"top":!1;if(this.affixed===i)return;this.affixed=i,this.unpin=i=="bottom"?d.top-c:null,this.$element.removeClass(h).addClass("affix"+(i?"-"+i:""))},a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("affix"),f=typeof c=="object"&&c;e||d.data("affix",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.defaults={offset:0},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery),!function(a){var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger(b=a.Event("close"));if(b.isDefaultPrevented())return;e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(this.transitioning)return;b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in");if(d&&d.length){e=d.data("collapse");if(e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[b](this.$element[0][c])},hide:function(){var b;if(this.transitioning)return;b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0)},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[a!==null?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){c.type=="show"&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c);if(c.isDefaultPrevented())return;this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();c[a(e).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(e).collapse(f)})})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=c,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},to:function(b){var c=this.$element.find(".item.active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.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(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this,j=a.Event("slide",{relatedTarget:e[0]});this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h]();if(e.hasClass("active"))return;if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(j);if(j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})}else{this.$element.trigger(j);if(j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,typeof c=="object"&&c),g=typeof c=="string"?c:f.slide;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):g?e[g]():f.interval&&e.cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),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=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(a)).change(),this.hide()},updater:function(a){return a},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c;return this.query=this.$element.val(),!this.query||this.query.length"+b+""})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),(a.browser.chrome||a.browser.webkit||a.browser.msie)&&this.$element.on("keydown",a.proxy(this.keydown,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},move:function(a){if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()},keydown:function(b){this.suppressKeyPressRepeat=!~a.inArray(b.keyCode,[40,38,9,13,27]),this.move(b)},keypress:function(a){if(this.suppressKeyPressRepeat)return;this.move(a)},keyup:function(a){switch(a.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation(),a.preventDefault()},blur:function(a){var b=this;setTimeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'',item:'',minLength:1},a.fn.typeahead.Constructor=b,a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})})}(window.jQuery)
--------------------------------------------------------------------------------
/example/bootstrap/css/bootstrap-responsive.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Responsive v2.1.1
3 | *
4 | * Copyright 2012 Twitter, Inc
5 | * Licensed under the Apache License v2.0
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Designed and built with all the love in the world @twitter by @mdo and @fat.
9 | */
10 |
11 | .clearfix {
12 | *zoom: 1;
13 | }
14 |
15 | .clearfix:before,
16 | .clearfix:after {
17 | display: table;
18 | line-height: 0;
19 | content: "";
20 | }
21 |
22 | .clearfix:after {
23 | clear: both;
24 | }
25 |
26 | .hide-text {
27 | font: 0/0 a;
28 | color: transparent;
29 | text-shadow: none;
30 | background-color: transparent;
31 | border: 0;
32 | }
33 |
34 | .input-block-level {
35 | display: block;
36 | width: 100%;
37 | min-height: 30px;
38 | -webkit-box-sizing: border-box;
39 | -moz-box-sizing: border-box;
40 | box-sizing: border-box;
41 | }
42 |
43 | .hidden {
44 | display: none;
45 | visibility: hidden;
46 | }
47 |
48 | .visible-phone {
49 | display: none !important;
50 | }
51 |
52 | .visible-tablet {
53 | display: none !important;
54 | }
55 |
56 | .hidden-desktop {
57 | display: none !important;
58 | }
59 |
60 | .visible-desktop {
61 | display: inherit !important;
62 | }
63 |
64 | @media (min-width: 768px) and (max-width: 979px) {
65 | .hidden-desktop {
66 | display: inherit !important;
67 | }
68 | .visible-desktop {
69 | display: none !important ;
70 | }
71 | .visible-tablet {
72 | display: inherit !important;
73 | }
74 | .hidden-tablet {
75 | display: none !important;
76 | }
77 | }
78 |
79 | @media (max-width: 767px) {
80 | .hidden-desktop {
81 | display: inherit !important;
82 | }
83 | .visible-desktop {
84 | display: none !important;
85 | }
86 | .visible-phone {
87 | display: inherit !important;
88 | }
89 | .hidden-phone {
90 | display: none !important;
91 | }
92 | }
93 |
94 | @media (min-width: 1200px) {
95 | .row {
96 | margin-left: -30px;
97 | *zoom: 1;
98 | }
99 | .row:before,
100 | .row:after {
101 | display: table;
102 | line-height: 0;
103 | content: "";
104 | }
105 | .row:after {
106 | clear: both;
107 | }
108 | [class*="span"] {
109 | float: left;
110 | min-height: 1px;
111 | margin-left: 30px;
112 | }
113 | .container,
114 | .navbar-static-top .container,
115 | .navbar-fixed-top .container,
116 | .navbar-fixed-bottom .container {
117 | width: 1170px;
118 | }
119 | .span12 {
120 | width: 1170px;
121 | }
122 | .span11 {
123 | width: 1070px;
124 | }
125 | .span10 {
126 | width: 970px;
127 | }
128 | .span9 {
129 | width: 870px;
130 | }
131 | .span8 {
132 | width: 770px;
133 | }
134 | .span7 {
135 | width: 670px;
136 | }
137 | .span6 {
138 | width: 570px;
139 | }
140 | .span5 {
141 | width: 470px;
142 | }
143 | .span4 {
144 | width: 370px;
145 | }
146 | .span3 {
147 | width: 270px;
148 | }
149 | .span2 {
150 | width: 170px;
151 | }
152 | .span1 {
153 | width: 70px;
154 | }
155 | .offset12 {
156 | margin-left: 1230px;
157 | }
158 | .offset11 {
159 | margin-left: 1130px;
160 | }
161 | .offset10 {
162 | margin-left: 1030px;
163 | }
164 | .offset9 {
165 | margin-left: 930px;
166 | }
167 | .offset8 {
168 | margin-left: 830px;
169 | }
170 | .offset7 {
171 | margin-left: 730px;
172 | }
173 | .offset6 {
174 | margin-left: 630px;
175 | }
176 | .offset5 {
177 | margin-left: 530px;
178 | }
179 | .offset4 {
180 | margin-left: 430px;
181 | }
182 | .offset3 {
183 | margin-left: 330px;
184 | }
185 | .offset2 {
186 | margin-left: 230px;
187 | }
188 | .offset1 {
189 | margin-left: 130px;
190 | }
191 | .row-fluid {
192 | width: 100%;
193 | *zoom: 1;
194 | }
195 | .row-fluid:before,
196 | .row-fluid:after {
197 | display: table;
198 | line-height: 0;
199 | content: "";
200 | }
201 | .row-fluid:after {
202 | clear: both;
203 | }
204 | .row-fluid [class*="span"] {
205 | display: block;
206 | float: left;
207 | width: 100%;
208 | min-height: 30px;
209 | margin-left: 2.564102564102564%;
210 | *margin-left: 2.5109110747408616%;
211 | -webkit-box-sizing: border-box;
212 | -moz-box-sizing: border-box;
213 | box-sizing: border-box;
214 | }
215 | .row-fluid [class*="span"]:first-child {
216 | margin-left: 0;
217 | }
218 | .row-fluid .span12 {
219 | width: 100%;
220 | *width: 99.94680851063829%;
221 | }
222 | .row-fluid .span11 {
223 | width: 91.45299145299145%;
224 | *width: 91.39979996362975%;
225 | }
226 | .row-fluid .span10 {
227 | width: 82.90598290598291%;
228 | *width: 82.8527914166212%;
229 | }
230 | .row-fluid .span9 {
231 | width: 74.35897435897436%;
232 | *width: 74.30578286961266%;
233 | }
234 | .row-fluid .span8 {
235 | width: 65.81196581196582%;
236 | *width: 65.75877432260411%;
237 | }
238 | .row-fluid .span7 {
239 | width: 57.26495726495726%;
240 | *width: 57.21176577559556%;
241 | }
242 | .row-fluid .span6 {
243 | width: 48.717948717948715%;
244 | *width: 48.664757228587014%;
245 | }
246 | .row-fluid .span5 {
247 | width: 40.17094017094017%;
248 | *width: 40.11774868157847%;
249 | }
250 | .row-fluid .span4 {
251 | width: 31.623931623931625%;
252 | *width: 31.570740134569924%;
253 | }
254 | .row-fluid .span3 {
255 | width: 23.076923076923077%;
256 | *width: 23.023731587561375%;
257 | }
258 | .row-fluid .span2 {
259 | width: 14.52991452991453%;
260 | *width: 14.476723040552828%;
261 | }
262 | .row-fluid .span1 {
263 | width: 5.982905982905983%;
264 | *width: 5.929714493544281%;
265 | }
266 | .row-fluid .offset12 {
267 | margin-left: 105.12820512820512%;
268 | *margin-left: 105.02182214948171%;
269 | }
270 | .row-fluid .offset12:first-child {
271 | margin-left: 102.56410256410257%;
272 | *margin-left: 102.45771958537915%;
273 | }
274 | .row-fluid .offset11 {
275 | margin-left: 96.58119658119658%;
276 | *margin-left: 96.47481360247316%;
277 | }
278 | .row-fluid .offset11:first-child {
279 | margin-left: 94.01709401709402%;
280 | *margin-left: 93.91071103837061%;
281 | }
282 | .row-fluid .offset10 {
283 | margin-left: 88.03418803418803%;
284 | *margin-left: 87.92780505546462%;
285 | }
286 | .row-fluid .offset10:first-child {
287 | margin-left: 85.47008547008548%;
288 | *margin-left: 85.36370249136206%;
289 | }
290 | .row-fluid .offset9 {
291 | margin-left: 79.48717948717949%;
292 | *margin-left: 79.38079650845607%;
293 | }
294 | .row-fluid .offset9:first-child {
295 | margin-left: 76.92307692307693%;
296 | *margin-left: 76.81669394435352%;
297 | }
298 | .row-fluid .offset8 {
299 | margin-left: 70.94017094017094%;
300 | *margin-left: 70.83378796144753%;
301 | }
302 | .row-fluid .offset8:first-child {
303 | margin-left: 68.37606837606839%;
304 | *margin-left: 68.26968539734497%;
305 | }
306 | .row-fluid .offset7 {
307 | margin-left: 62.393162393162385%;
308 | *margin-left: 62.28677941443899%;
309 | }
310 | .row-fluid .offset7:first-child {
311 | margin-left: 59.82905982905982%;
312 | *margin-left: 59.72267685033642%;
313 | }
314 | .row-fluid .offset6 {
315 | margin-left: 53.84615384615384%;
316 | *margin-left: 53.739770867430444%;
317 | }
318 | .row-fluid .offset6:first-child {
319 | margin-left: 51.28205128205128%;
320 | *margin-left: 51.175668303327875%;
321 | }
322 | .row-fluid .offset5 {
323 | margin-left: 45.299145299145295%;
324 | *margin-left: 45.1927623204219%;
325 | }
326 | .row-fluid .offset5:first-child {
327 | margin-left: 42.73504273504273%;
328 | *margin-left: 42.62865975631933%;
329 | }
330 | .row-fluid .offset4 {
331 | margin-left: 36.75213675213675%;
332 | *margin-left: 36.645753773413354%;
333 | }
334 | .row-fluid .offset4:first-child {
335 | margin-left: 34.18803418803419%;
336 | *margin-left: 34.081651209310785%;
337 | }
338 | .row-fluid .offset3 {
339 | margin-left: 28.205128205128204%;
340 | *margin-left: 28.0987452264048%;
341 | }
342 | .row-fluid .offset3:first-child {
343 | margin-left: 25.641025641025642%;
344 | *margin-left: 25.53464266230224%;
345 | }
346 | .row-fluid .offset2 {
347 | margin-left: 19.65811965811966%;
348 | *margin-left: 19.551736679396257%;
349 | }
350 | .row-fluid .offset2:first-child {
351 | margin-left: 17.094017094017094%;
352 | *margin-left: 16.98763411529369%;
353 | }
354 | .row-fluid .offset1 {
355 | margin-left: 11.11111111111111%;
356 | *margin-left: 11.004728132387708%;
357 | }
358 | .row-fluid .offset1:first-child {
359 | margin-left: 8.547008547008547%;
360 | *margin-left: 8.440625568285142%;
361 | }
362 | input,
363 | textarea,
364 | .uneditable-input {
365 | margin-left: 0;
366 | }
367 | .controls-row [class*="span"] + [class*="span"] {
368 | margin-left: 30px;
369 | }
370 | input.span12,
371 | textarea.span12,
372 | .uneditable-input.span12 {
373 | width: 1156px;
374 | }
375 | input.span11,
376 | textarea.span11,
377 | .uneditable-input.span11 {
378 | width: 1056px;
379 | }
380 | input.span10,
381 | textarea.span10,
382 | .uneditable-input.span10 {
383 | width: 956px;
384 | }
385 | input.span9,
386 | textarea.span9,
387 | .uneditable-input.span9 {
388 | width: 856px;
389 | }
390 | input.span8,
391 | textarea.span8,
392 | .uneditable-input.span8 {
393 | width: 756px;
394 | }
395 | input.span7,
396 | textarea.span7,
397 | .uneditable-input.span7 {
398 | width: 656px;
399 | }
400 | input.span6,
401 | textarea.span6,
402 | .uneditable-input.span6 {
403 | width: 556px;
404 | }
405 | input.span5,
406 | textarea.span5,
407 | .uneditable-input.span5 {
408 | width: 456px;
409 | }
410 | input.span4,
411 | textarea.span4,
412 | .uneditable-input.span4 {
413 | width: 356px;
414 | }
415 | input.span3,
416 | textarea.span3,
417 | .uneditable-input.span3 {
418 | width: 256px;
419 | }
420 | input.span2,
421 | textarea.span2,
422 | .uneditable-input.span2 {
423 | width: 156px;
424 | }
425 | input.span1,
426 | textarea.span1,
427 | .uneditable-input.span1 {
428 | width: 56px;
429 | }
430 | .thumbnails {
431 | margin-left: -30px;
432 | }
433 | .thumbnails > li {
434 | margin-left: 30px;
435 | }
436 | .row-fluid .thumbnails {
437 | margin-left: 0;
438 | }
439 | }
440 |
441 | @media (min-width: 768px) and (max-width: 979px) {
442 | .row {
443 | margin-left: -20px;
444 | *zoom: 1;
445 | }
446 | .row:before,
447 | .row:after {
448 | display: table;
449 | line-height: 0;
450 | content: "";
451 | }
452 | .row:after {
453 | clear: both;
454 | }
455 | [class*="span"] {
456 | float: left;
457 | min-height: 1px;
458 | margin-left: 20px;
459 | }
460 | .container,
461 | .navbar-static-top .container,
462 | .navbar-fixed-top .container,
463 | .navbar-fixed-bottom .container {
464 | width: 724px;
465 | }
466 | .span12 {
467 | width: 724px;
468 | }
469 | .span11 {
470 | width: 662px;
471 | }
472 | .span10 {
473 | width: 600px;
474 | }
475 | .span9 {
476 | width: 538px;
477 | }
478 | .span8 {
479 | width: 476px;
480 | }
481 | .span7 {
482 | width: 414px;
483 | }
484 | .span6 {
485 | width: 352px;
486 | }
487 | .span5 {
488 | width: 290px;
489 | }
490 | .span4 {
491 | width: 228px;
492 | }
493 | .span3 {
494 | width: 166px;
495 | }
496 | .span2 {
497 | width: 104px;
498 | }
499 | .span1 {
500 | width: 42px;
501 | }
502 | .offset12 {
503 | margin-left: 764px;
504 | }
505 | .offset11 {
506 | margin-left: 702px;
507 | }
508 | .offset10 {
509 | margin-left: 640px;
510 | }
511 | .offset9 {
512 | margin-left: 578px;
513 | }
514 | .offset8 {
515 | margin-left: 516px;
516 | }
517 | .offset7 {
518 | margin-left: 454px;
519 | }
520 | .offset6 {
521 | margin-left: 392px;
522 | }
523 | .offset5 {
524 | margin-left: 330px;
525 | }
526 | .offset4 {
527 | margin-left: 268px;
528 | }
529 | .offset3 {
530 | margin-left: 206px;
531 | }
532 | .offset2 {
533 | margin-left: 144px;
534 | }
535 | .offset1 {
536 | margin-left: 82px;
537 | }
538 | .row-fluid {
539 | width: 100%;
540 | *zoom: 1;
541 | }
542 | .row-fluid:before,
543 | .row-fluid:after {
544 | display: table;
545 | line-height: 0;
546 | content: "";
547 | }
548 | .row-fluid:after {
549 | clear: both;
550 | }
551 | .row-fluid [class*="span"] {
552 | display: block;
553 | float: left;
554 | width: 100%;
555 | min-height: 30px;
556 | margin-left: 2.7624309392265194%;
557 | *margin-left: 2.709239449864817%;
558 | -webkit-box-sizing: border-box;
559 | -moz-box-sizing: border-box;
560 | box-sizing: border-box;
561 | }
562 | .row-fluid [class*="span"]:first-child {
563 | margin-left: 0;
564 | }
565 | .row-fluid .span12 {
566 | width: 100%;
567 | *width: 99.94680851063829%;
568 | }
569 | .row-fluid .span11 {
570 | width: 91.43646408839778%;
571 | *width: 91.38327259903608%;
572 | }
573 | .row-fluid .span10 {
574 | width: 82.87292817679558%;
575 | *width: 82.81973668743387%;
576 | }
577 | .row-fluid .span9 {
578 | width: 74.30939226519337%;
579 | *width: 74.25620077583166%;
580 | }
581 | .row-fluid .span8 {
582 | width: 65.74585635359117%;
583 | *width: 65.69266486422946%;
584 | }
585 | .row-fluid .span7 {
586 | width: 57.18232044198895%;
587 | *width: 57.12912895262725%;
588 | }
589 | .row-fluid .span6 {
590 | width: 48.61878453038674%;
591 | *width: 48.56559304102504%;
592 | }
593 | .row-fluid .span5 {
594 | width: 40.05524861878453%;
595 | *width: 40.00205712942283%;
596 | }
597 | .row-fluid .span4 {
598 | width: 31.491712707182323%;
599 | *width: 31.43852121782062%;
600 | }
601 | .row-fluid .span3 {
602 | width: 22.92817679558011%;
603 | *width: 22.87498530621841%;
604 | }
605 | .row-fluid .span2 {
606 | width: 14.3646408839779%;
607 | *width: 14.311449394616199%;
608 | }
609 | .row-fluid .span1 {
610 | width: 5.801104972375691%;
611 | *width: 5.747913483013988%;
612 | }
613 | .row-fluid .offset12 {
614 | margin-left: 105.52486187845304%;
615 | *margin-left: 105.41847889972962%;
616 | }
617 | .row-fluid .offset12:first-child {
618 | margin-left: 102.76243093922652%;
619 | *margin-left: 102.6560479605031%;
620 | }
621 | .row-fluid .offset11 {
622 | margin-left: 96.96132596685082%;
623 | *margin-left: 96.8549429881274%;
624 | }
625 | .row-fluid .offset11:first-child {
626 | margin-left: 94.1988950276243%;
627 | *margin-left: 94.09251204890089%;
628 | }
629 | .row-fluid .offset10 {
630 | margin-left: 88.39779005524862%;
631 | *margin-left: 88.2914070765252%;
632 | }
633 | .row-fluid .offset10:first-child {
634 | margin-left: 85.6353591160221%;
635 | *margin-left: 85.52897613729868%;
636 | }
637 | .row-fluid .offset9 {
638 | margin-left: 79.8342541436464%;
639 | *margin-left: 79.72787116492299%;
640 | }
641 | .row-fluid .offset9:first-child {
642 | margin-left: 77.07182320441989%;
643 | *margin-left: 76.96544022569647%;
644 | }
645 | .row-fluid .offset8 {
646 | margin-left: 71.2707182320442%;
647 | *margin-left: 71.16433525332079%;
648 | }
649 | .row-fluid .offset8:first-child {
650 | margin-left: 68.50828729281768%;
651 | *margin-left: 68.40190431409427%;
652 | }
653 | .row-fluid .offset7 {
654 | margin-left: 62.70718232044199%;
655 | *margin-left: 62.600799341718584%;
656 | }
657 | .row-fluid .offset7:first-child {
658 | margin-left: 59.94475138121547%;
659 | *margin-left: 59.838368402492065%;
660 | }
661 | .row-fluid .offset6 {
662 | margin-left: 54.14364640883978%;
663 | *margin-left: 54.037263430116376%;
664 | }
665 | .row-fluid .offset6:first-child {
666 | margin-left: 51.38121546961326%;
667 | *margin-left: 51.27483249088986%;
668 | }
669 | .row-fluid .offset5 {
670 | margin-left: 45.58011049723757%;
671 | *margin-left: 45.47372751851417%;
672 | }
673 | .row-fluid .offset5:first-child {
674 | margin-left: 42.81767955801105%;
675 | *margin-left: 42.71129657928765%;
676 | }
677 | .row-fluid .offset4 {
678 | margin-left: 37.01657458563536%;
679 | *margin-left: 36.91019160691196%;
680 | }
681 | .row-fluid .offset4:first-child {
682 | margin-left: 34.25414364640884%;
683 | *margin-left: 34.14776066768544%;
684 | }
685 | .row-fluid .offset3 {
686 | margin-left: 28.45303867403315%;
687 | *margin-left: 28.346655695309746%;
688 | }
689 | .row-fluid .offset3:first-child {
690 | margin-left: 25.69060773480663%;
691 | *margin-left: 25.584224756083227%;
692 | }
693 | .row-fluid .offset2 {
694 | margin-left: 19.88950276243094%;
695 | *margin-left: 19.783119783707537%;
696 | }
697 | .row-fluid .offset2:first-child {
698 | margin-left: 17.12707182320442%;
699 | *margin-left: 17.02068884448102%;
700 | }
701 | .row-fluid .offset1 {
702 | margin-left: 11.32596685082873%;
703 | *margin-left: 11.219583872105325%;
704 | }
705 | .row-fluid .offset1:first-child {
706 | margin-left: 8.56353591160221%;
707 | *margin-left: 8.457152932878806%;
708 | }
709 | input,
710 | textarea,
711 | .uneditable-input {
712 | margin-left: 0;
713 | }
714 | .controls-row [class*="span"] + [class*="span"] {
715 | margin-left: 20px;
716 | }
717 | input.span12,
718 | textarea.span12,
719 | .uneditable-input.span12 {
720 | width: 710px;
721 | }
722 | input.span11,
723 | textarea.span11,
724 | .uneditable-input.span11 {
725 | width: 648px;
726 | }
727 | input.span10,
728 | textarea.span10,
729 | .uneditable-input.span10 {
730 | width: 586px;
731 | }
732 | input.span9,
733 | textarea.span9,
734 | .uneditable-input.span9 {
735 | width: 524px;
736 | }
737 | input.span8,
738 | textarea.span8,
739 | .uneditable-input.span8 {
740 | width: 462px;
741 | }
742 | input.span7,
743 | textarea.span7,
744 | .uneditable-input.span7 {
745 | width: 400px;
746 | }
747 | input.span6,
748 | textarea.span6,
749 | .uneditable-input.span6 {
750 | width: 338px;
751 | }
752 | input.span5,
753 | textarea.span5,
754 | .uneditable-input.span5 {
755 | width: 276px;
756 | }
757 | input.span4,
758 | textarea.span4,
759 | .uneditable-input.span4 {
760 | width: 214px;
761 | }
762 | input.span3,
763 | textarea.span3,
764 | .uneditable-input.span3 {
765 | width: 152px;
766 | }
767 | input.span2,
768 | textarea.span2,
769 | .uneditable-input.span2 {
770 | width: 90px;
771 | }
772 | input.span1,
773 | textarea.span1,
774 | .uneditable-input.span1 {
775 | width: 28px;
776 | }
777 | }
778 |
779 | @media (max-width: 767px) {
780 | body {
781 | padding-right: 20px;
782 | padding-left: 20px;
783 | }
784 | .navbar-fixed-top,
785 | .navbar-fixed-bottom,
786 | .navbar-static-top {
787 | margin-right: -20px;
788 | margin-left: -20px;
789 | }
790 | .container-fluid {
791 | padding: 0;
792 | }
793 | .dl-horizontal dt {
794 | float: none;
795 | width: auto;
796 | clear: none;
797 | text-align: left;
798 | }
799 | .dl-horizontal dd {
800 | margin-left: 0;
801 | }
802 | .container {
803 | width: auto;
804 | }
805 | .row-fluid {
806 | width: 100%;
807 | }
808 | .row,
809 | .thumbnails {
810 | margin-left: 0;
811 | }
812 | .thumbnails > li {
813 | float: none;
814 | margin-left: 0;
815 | }
816 | [class*="span"],
817 | .row-fluid [class*="span"] {
818 | display: block;
819 | float: none;
820 | width: 100%;
821 | margin-left: 0;
822 | -webkit-box-sizing: border-box;
823 | -moz-box-sizing: border-box;
824 | box-sizing: border-box;
825 | }
826 | .span12,
827 | .row-fluid .span12 {
828 | width: 100%;
829 | -webkit-box-sizing: border-box;
830 | -moz-box-sizing: border-box;
831 | box-sizing: border-box;
832 | }
833 | .input-large,
834 | .input-xlarge,
835 | .input-xxlarge,
836 | input[class*="span"],
837 | select[class*="span"],
838 | textarea[class*="span"],
839 | .uneditable-input {
840 | display: block;
841 | width: 100%;
842 | min-height: 30px;
843 | -webkit-box-sizing: border-box;
844 | -moz-box-sizing: border-box;
845 | box-sizing: border-box;
846 | }
847 | .input-prepend input,
848 | .input-append input,
849 | .input-prepend input[class*="span"],
850 | .input-append input[class*="span"] {
851 | display: inline-block;
852 | width: auto;
853 | }
854 | .controls-row [class*="span"] + [class*="span"] {
855 | margin-left: 0;
856 | }
857 | .modal {
858 | position: fixed;
859 | top: 20px;
860 | right: 20px;
861 | left: 20px;
862 | width: auto;
863 | margin: 0;
864 | }
865 | .modal.fade.in {
866 | top: auto;
867 | }
868 | }
869 |
870 | @media (max-width: 480px) {
871 | .nav-collapse {
872 | -webkit-transform: translate3d(0, 0, 0);
873 | }
874 | .page-header h1 small {
875 | display: block;
876 | line-height: 20px;
877 | }
878 | input[type="checkbox"],
879 | input[type="radio"] {
880 | border: 1px solid #ccc;
881 | }
882 | .form-horizontal .control-label {
883 | float: none;
884 | width: auto;
885 | padding-top: 0;
886 | text-align: left;
887 | }
888 | .form-horizontal .controls {
889 | margin-left: 0;
890 | }
891 | .form-horizontal .control-list {
892 | padding-top: 0;
893 | }
894 | .form-horizontal .form-actions {
895 | padding-right: 10px;
896 | padding-left: 10px;
897 | }
898 | .modal {
899 | top: 10px;
900 | right: 10px;
901 | left: 10px;
902 | }
903 | .modal-header .close {
904 | padding: 10px;
905 | margin: -10px;
906 | }
907 | .carousel-caption {
908 | position: static;
909 | }
910 | }
911 |
912 | @media (max-width: 979px) {
913 | body {
914 | padding-top: 0;
915 | }
916 | .navbar-fixed-top,
917 | .navbar-fixed-bottom {
918 | position: static;
919 | }
920 | .navbar-fixed-top {
921 | margin-bottom: 20px;
922 | }
923 | .navbar-fixed-bottom {
924 | margin-top: 20px;
925 | }
926 | .navbar-fixed-top .navbar-inner,
927 | .navbar-fixed-bottom .navbar-inner {
928 | padding: 5px;
929 | }
930 | .navbar .container {
931 | width: auto;
932 | padding: 0;
933 | }
934 | .navbar .brand {
935 | padding-right: 10px;
936 | padding-left: 10px;
937 | margin: 0 0 0 -5px;
938 | }
939 | .nav-collapse {
940 | clear: both;
941 | }
942 | .nav-collapse .nav {
943 | float: none;
944 | margin: 0 0 10px;
945 | }
946 | .nav-collapse .nav > li {
947 | float: none;
948 | }
949 | .nav-collapse .nav > li > a {
950 | margin-bottom: 2px;
951 | }
952 | .nav-collapse .nav > .divider-vertical {
953 | display: none;
954 | }
955 | .nav-collapse .nav .nav-header {
956 | color: #777777;
957 | text-shadow: none;
958 | }
959 | .nav-collapse .nav > li > a,
960 | .nav-collapse .dropdown-menu a {
961 | padding: 9px 15px;
962 | font-weight: bold;
963 | color: #777777;
964 | -webkit-border-radius: 3px;
965 | -moz-border-radius: 3px;
966 | border-radius: 3px;
967 | }
968 | .nav-collapse .btn {
969 | padding: 4px 10px 4px;
970 | font-weight: normal;
971 | -webkit-border-radius: 4px;
972 | -moz-border-radius: 4px;
973 | border-radius: 4px;
974 | }
975 | .nav-collapse .dropdown-menu li + li a {
976 | margin-bottom: 2px;
977 | }
978 | .nav-collapse .nav > li > a:hover,
979 | .nav-collapse .dropdown-menu a:hover {
980 | background-color: #f2f2f2;
981 | }
982 | .navbar-inverse .nav-collapse .nav > li > a:hover,
983 | .navbar-inverse .nav-collapse .dropdown-menu a:hover {
984 | background-color: #111111;
985 | }
986 | .nav-collapse.in .btn-group {
987 | padding: 0;
988 | margin-top: 5px;
989 | }
990 | .nav-collapse .dropdown-menu {
991 | position: static;
992 | top: auto;
993 | left: auto;
994 | display: block;
995 | float: none;
996 | max-width: none;
997 | padding: 0;
998 | margin: 0 15px;
999 | background-color: transparent;
1000 | border: none;
1001 | -webkit-border-radius: 0;
1002 | -moz-border-radius: 0;
1003 | border-radius: 0;
1004 | -webkit-box-shadow: none;
1005 | -moz-box-shadow: none;
1006 | box-shadow: none;
1007 | }
1008 | .nav-collapse .dropdown-menu:before,
1009 | .nav-collapse .dropdown-menu:after {
1010 | display: none;
1011 | }
1012 | .nav-collapse .dropdown-menu .divider {
1013 | display: none;
1014 | }
1015 | .nav-collapse .nav > li > .dropdown-menu:before,
1016 | .nav-collapse .nav > li > .dropdown-menu:after {
1017 | display: none;
1018 | }
1019 | .nav-collapse .navbar-form,
1020 | .nav-collapse .navbar-search {
1021 | float: none;
1022 | padding: 10px 15px;
1023 | margin: 10px 0;
1024 | border-top: 1px solid #f2f2f2;
1025 | border-bottom: 1px solid #f2f2f2;
1026 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
1027 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
1028 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
1029 | }
1030 | .navbar-inverse .nav-collapse .navbar-form,
1031 | .navbar-inverse .nav-collapse .navbar-search {
1032 | border-top-color: #111111;
1033 | border-bottom-color: #111111;
1034 | }
1035 | .navbar .nav-collapse .nav.pull-right {
1036 | float: none;
1037 | margin-left: 0;
1038 | }
1039 | .nav-collapse,
1040 | .nav-collapse.collapse {
1041 | height: 0;
1042 | overflow: hidden;
1043 | }
1044 | .navbar .btn-navbar {
1045 | display: block;
1046 | }
1047 | .navbar-static .navbar-inner {
1048 | padding-right: 10px;
1049 | padding-left: 10px;
1050 | }
1051 | }
1052 |
1053 | @media (min-width: 980px) {
1054 | .nav-collapse.collapse {
1055 | height: auto !important;
1056 | overflow: visible !important;
1057 | }
1058 | }
1059 |
--------------------------------------------------------------------------------
/example/bootstrap/js/bootstrap.js:
--------------------------------------------------------------------------------
1 | /* ===================================================
2 | * bootstrap-transition.js v2.1.1
3 | * http://twitter.github.com/bootstrap/javascript.html#transitions
4 | * ===================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | $(function () {
24 |
25 | "use strict"; // jshint ;_;
26 |
27 |
28 | /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
29 | * ======================================================= */
30 |
31 | $.support.transition = (function () {
32 |
33 | var transitionEnd = (function () {
34 |
35 | var el = document.createElement('bootstrap')
36 | , transEndEventNames = {
37 | 'WebkitTransition' : 'webkitTransitionEnd'
38 | , 'MozTransition' : 'transitionend'
39 | , 'OTransition' : 'oTransitionEnd otransitionend'
40 | , 'transition' : 'transitionend'
41 | }
42 | , name
43 |
44 | for (name in transEndEventNames){
45 | if (el.style[name] !== undefined) {
46 | return transEndEventNames[name]
47 | }
48 | }
49 |
50 | }())
51 |
52 | return transitionEnd && {
53 | end: transitionEnd
54 | }
55 |
56 | })()
57 |
58 | })
59 |
60 | }(window.jQuery);
61 | /* =========================================================
62 | * bootstrap-modal.js v2.1.1
63 | * http://twitter.github.com/bootstrap/javascript.html#modals
64 | * =========================================================
65 | * Copyright 2012 Twitter, Inc.
66 | *
67 | * Licensed under the Apache License, Version 2.0 (the "License");
68 | * you may not use this file except in compliance with the License.
69 | * You may obtain a copy of the License at
70 | *
71 | * http://www.apache.org/licenses/LICENSE-2.0
72 | *
73 | * Unless required by applicable law or agreed to in writing, software
74 | * distributed under the License is distributed on an "AS IS" BASIS,
75 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76 | * See the License for the specific language governing permissions and
77 | * limitations under the License.
78 | * ========================================================= */
79 |
80 |
81 | !function ($) {
82 |
83 | "use strict"; // jshint ;_;
84 |
85 |
86 | /* MODAL CLASS DEFINITION
87 | * ====================== */
88 |
89 | var Modal = function (element, options) {
90 | this.options = options
91 | this.$element = $(element)
92 | .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
93 | this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
94 | }
95 |
96 | Modal.prototype = {
97 |
98 | constructor: Modal
99 |
100 | , toggle: function () {
101 | return this[!this.isShown ? 'show' : 'hide']()
102 | }
103 |
104 | , show: function () {
105 | var that = this
106 | , e = $.Event('show')
107 |
108 | this.$element.trigger(e)
109 |
110 | if (this.isShown || e.isDefaultPrevented()) return
111 |
112 | $('body').addClass('modal-open')
113 |
114 | this.isShown = true
115 |
116 | this.escape()
117 |
118 | this.backdrop(function () {
119 | var transition = $.support.transition && that.$element.hasClass('fade')
120 |
121 | if (!that.$element.parent().length) {
122 | that.$element.appendTo(document.body) //don't move modals dom position
123 | }
124 |
125 | that.$element
126 | .show()
127 |
128 | if (transition) {
129 | that.$element[0].offsetWidth // force reflow
130 | }
131 |
132 | that.$element
133 | .addClass('in')
134 | .attr('aria-hidden', false)
135 | .focus()
136 |
137 | that.enforceFocus()
138 |
139 | transition ?
140 | that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
141 | that.$element.trigger('shown')
142 |
143 | })
144 | }
145 |
146 | , hide: function (e) {
147 | e && e.preventDefault()
148 |
149 | var that = this
150 |
151 | e = $.Event('hide')
152 |
153 | this.$element.trigger(e)
154 |
155 | if (!this.isShown || e.isDefaultPrevented()) return
156 |
157 | this.isShown = false
158 |
159 | $('body').removeClass('modal-open')
160 |
161 | this.escape()
162 |
163 | $(document).off('focusin.modal')
164 |
165 | this.$element
166 | .removeClass('in')
167 | .attr('aria-hidden', true)
168 |
169 | $.support.transition && this.$element.hasClass('fade') ?
170 | this.hideWithTransition() :
171 | this.hideModal()
172 | }
173 |
174 | , enforceFocus: function () {
175 | var that = this
176 | $(document).on('focusin.modal', function (e) {
177 | if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
178 | that.$element.focus()
179 | }
180 | })
181 | }
182 |
183 | , escape: function () {
184 | var that = this
185 | if (this.isShown && this.options.keyboard) {
186 | this.$element.on('keyup.dismiss.modal', function ( e ) {
187 | e.which == 27 && that.hide()
188 | })
189 | } else if (!this.isShown) {
190 | this.$element.off('keyup.dismiss.modal')
191 | }
192 | }
193 |
194 | , hideWithTransition: function () {
195 | var that = this
196 | , timeout = setTimeout(function () {
197 | that.$element.off($.support.transition.end)
198 | that.hideModal()
199 | }, 500)
200 |
201 | this.$element.one($.support.transition.end, function () {
202 | clearTimeout(timeout)
203 | that.hideModal()
204 | })
205 | }
206 |
207 | , hideModal: function (that) {
208 | this.$element
209 | .hide()
210 | .trigger('hidden')
211 |
212 | this.backdrop()
213 | }
214 |
215 | , removeBackdrop: function () {
216 | this.$backdrop.remove()
217 | this.$backdrop = null
218 | }
219 |
220 | , backdrop: function (callback) {
221 | var that = this
222 | , animate = this.$element.hasClass('fade') ? 'fade' : ''
223 |
224 | if (this.isShown && this.options.backdrop) {
225 | var doAnimate = $.support.transition && animate
226 |
227 | this.$backdrop = $('')
228 | .appendTo(document.body)
229 |
230 | if (this.options.backdrop != 'static') {
231 | this.$backdrop.click($.proxy(this.hide, this))
232 | }
233 |
234 | if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
235 |
236 | this.$backdrop.addClass('in')
237 |
238 | doAnimate ?
239 | this.$backdrop.one($.support.transition.end, callback) :
240 | callback()
241 |
242 | } else if (!this.isShown && this.$backdrop) {
243 | this.$backdrop.removeClass('in')
244 |
245 | $.support.transition && this.$element.hasClass('fade')?
246 | this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
247 | this.removeBackdrop()
248 |
249 | } else if (callback) {
250 | callback()
251 | }
252 | }
253 | }
254 |
255 |
256 | /* MODAL PLUGIN DEFINITION
257 | * ======================= */
258 |
259 | $.fn.modal = function (option) {
260 | return this.each(function () {
261 | var $this = $(this)
262 | , data = $this.data('modal')
263 | , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
264 | if (!data) $this.data('modal', (data = new Modal(this, options)))
265 | if (typeof option == 'string') data[option]()
266 | else if (options.show) data.show()
267 | })
268 | }
269 |
270 | $.fn.modal.defaults = {
271 | backdrop: true
272 | , keyboard: true
273 | , show: true
274 | }
275 |
276 | $.fn.modal.Constructor = Modal
277 |
278 |
279 | /* MODAL DATA-API
280 | * ============== */
281 |
282 | $(function () {
283 | $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
284 | var $this = $(this)
285 | , href = $this.attr('href')
286 | , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
287 | , option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
288 |
289 | e.preventDefault()
290 |
291 | $target
292 | .modal(option)
293 | .one('hide', function () {
294 | $this.focus()
295 | })
296 | })
297 | })
298 |
299 | }(window.jQuery);
300 | /* ============================================================
301 | * bootstrap-dropdown.js v2.1.1
302 | * http://twitter.github.com/bootstrap/javascript.html#dropdowns
303 | * ============================================================
304 | * Copyright 2012 Twitter, Inc.
305 | *
306 | * Licensed under the Apache License, Version 2.0 (the "License");
307 | * you may not use this file except in compliance with the License.
308 | * You may obtain a copy of the License at
309 | *
310 | * http://www.apache.org/licenses/LICENSE-2.0
311 | *
312 | * Unless required by applicable law or agreed to in writing, software
313 | * distributed under the License is distributed on an "AS IS" BASIS,
314 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
315 | * See the License for the specific language governing permissions and
316 | * limitations under the License.
317 | * ============================================================ */
318 |
319 |
320 | !function ($) {
321 |
322 | "use strict"; // jshint ;_;
323 |
324 |
325 | /* DROPDOWN CLASS DEFINITION
326 | * ========================= */
327 |
328 | var toggle = '[data-toggle=dropdown]'
329 | , Dropdown = function (element) {
330 | var $el = $(element).on('click.dropdown.data-api', this.toggle)
331 | $('html').on('click.dropdown.data-api', function () {
332 | $el.parent().removeClass('open')
333 | })
334 | }
335 |
336 | Dropdown.prototype = {
337 |
338 | constructor: Dropdown
339 |
340 | , toggle: function (e) {
341 | var $this = $(this)
342 | , $parent
343 | , isActive
344 |
345 | if ($this.is('.disabled, :disabled')) return
346 |
347 | $parent = getParent($this)
348 |
349 | isActive = $parent.hasClass('open')
350 |
351 | clearMenus()
352 |
353 | if (!isActive) {
354 | $parent.toggleClass('open')
355 | $this.focus()
356 | }
357 |
358 | return false
359 | }
360 |
361 | , keydown: function (e) {
362 | var $this
363 | , $items
364 | , $active
365 | , $parent
366 | , isActive
367 | , index
368 |
369 | if (!/(38|40|27)/.test(e.keyCode)) return
370 |
371 | $this = $(this)
372 |
373 | e.preventDefault()
374 | e.stopPropagation()
375 |
376 | if ($this.is('.disabled, :disabled')) return
377 |
378 | $parent = getParent($this)
379 |
380 | isActive = $parent.hasClass('open')
381 |
382 | if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
383 |
384 | $items = $('[role=menu] li:not(.divider) a', $parent)
385 |
386 | if (!$items.length) return
387 |
388 | index = $items.index($items.filter(':focus'))
389 |
390 | if (e.keyCode == 38 && index > 0) index-- // up
391 | if (e.keyCode == 40 && index < $items.length - 1) index++ // down
392 | if (!~index) index = 0
393 |
394 | $items
395 | .eq(index)
396 | .focus()
397 | }
398 |
399 | }
400 |
401 | function clearMenus(e) {
402 | var $toggle = $(toggle);
403 | if (e === undefined) {
404 | $toggle.parent().removeClass('open')
405 | } else if ($toggle.attr('data-sticky') && $(e.target).closest('.dropdown-menu').length == 0) {
406 | $toggle.parent().removeClass('open')
407 | }
408 | // getParent($(toggle))
409 | // .removeClass('open')
410 | }
411 |
412 | function getParent($this) {
413 | var selector = $this.attr('data-target')
414 | , $parent
415 |
416 | if (!selector) {
417 | selector = $this.attr('href')
418 | selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
419 | }
420 |
421 | $parent = $(selector)
422 | $parent.length || ($parent = $this.parent())
423 |
424 | return $parent
425 | }
426 |
427 |
428 | /* DROPDOWN PLUGIN DEFINITION
429 | * ========================== */
430 |
431 | $.fn.dropdown = function (option) {
432 | return this.each(function () {
433 | var $this = $(this)
434 | , data = $this.data('dropdown')
435 | if (!data) $this.data('dropdown', (data = new Dropdown(this)))
436 | if (typeof option == 'string') data[option].call($this)
437 | })
438 | }
439 |
440 | $.fn.dropdown.Constructor = Dropdown
441 |
442 |
443 | /* APPLY TO STANDARD DROPDOWN ELEMENTS
444 | * =================================== */
445 |
446 | $(function () {
447 | $('html')
448 | .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
449 | $('body')
450 | .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
451 | .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
452 | .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
453 | })
454 |
455 | }(window.jQuery);
456 | /* =============================================================
457 | * bootstrap-scrollspy.js v2.1.1
458 | * http://twitter.github.com/bootstrap/javascript.html#scrollspy
459 | * =============================================================
460 | * Copyright 2012 Twitter, Inc.
461 | *
462 | * Licensed under the Apache License, Version 2.0 (the "License");
463 | * you may not use this file except in compliance with the License.
464 | * You may obtain a copy of the License at
465 | *
466 | * http://www.apache.org/licenses/LICENSE-2.0
467 | *
468 | * Unless required by applicable law or agreed to in writing, software
469 | * distributed under the License is distributed on an "AS IS" BASIS,
470 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
471 | * See the License for the specific language governing permissions and
472 | * limitations under the License.
473 | * ============================================================== */
474 |
475 |
476 | !function ($) {
477 |
478 | "use strict"; // jshint ;_;
479 |
480 |
481 | /* SCROLLSPY CLASS DEFINITION
482 | * ========================== */
483 |
484 | function ScrollSpy(element, options) {
485 | var process = $.proxy(this.process, this)
486 | , $element = $(element).is('body') ? $(window) : $(element)
487 | , href
488 | this.options = $.extend({}, $.fn.scrollspy.defaults, options)
489 | this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
490 | this.selector = (this.options.target
491 | || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
492 | || '') + ' .nav li > a'
493 | this.$body = $('body')
494 | this.refresh()
495 | this.process()
496 | }
497 |
498 | ScrollSpy.prototype = {
499 |
500 | constructor: ScrollSpy
501 |
502 | , refresh: function () {
503 | var self = this
504 | , $targets
505 |
506 | this.offsets = $([])
507 | this.targets = $([])
508 |
509 | $targets = this.$body
510 | .find(this.selector)
511 | .map(function () {
512 | var $el = $(this)
513 | , href = $el.data('target') || $el.attr('href')
514 | , $href = /^#\w/.test(href) && $(href)
515 | return ( $href
516 | && $href.length
517 | && [[ $href.position().top, href ]] ) || null
518 | })
519 | .sort(function (a, b) { return a[0] - b[0] })
520 | .each(function () {
521 | self.offsets.push(this[0])
522 | self.targets.push(this[1])
523 | })
524 | }
525 |
526 | , process: function () {
527 | var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
528 | , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
529 | , maxScroll = scrollHeight - this.$scrollElement.height()
530 | , offsets = this.offsets
531 | , targets = this.targets
532 | , activeTarget = this.activeTarget
533 | , i
534 |
535 | if (scrollTop >= maxScroll) {
536 | return activeTarget != (i = targets.last()[0])
537 | && this.activate ( i )
538 | }
539 |
540 | for (i = offsets.length; i--;) {
541 | activeTarget != targets[i]
542 | && scrollTop >= offsets[i]
543 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
544 | && this.activate( targets[i] )
545 | }
546 | }
547 |
548 | , activate: function (target) {
549 | var active
550 | , selector
551 |
552 | this.activeTarget = target
553 |
554 | $(this.selector)
555 | .parent('.active')
556 | .removeClass('active')
557 |
558 | selector = this.selector
559 | + '[data-target="' + target + '"],'
560 | + this.selector + '[href="' + target + '"]'
561 |
562 | active = $(selector)
563 | .parent('li')
564 | .addClass('active')
565 |
566 | if (active.parent('.dropdown-menu').length) {
567 | active = active.closest('li.dropdown').addClass('active')
568 | }
569 |
570 | active.trigger('activate')
571 | }
572 |
573 | }
574 |
575 |
576 | /* SCROLLSPY PLUGIN DEFINITION
577 | * =========================== */
578 |
579 | $.fn.scrollspy = function (option) {
580 | return this.each(function () {
581 | var $this = $(this)
582 | , data = $this.data('scrollspy')
583 | , options = typeof option == 'object' && option
584 | if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
585 | if (typeof option == 'string') data[option]()
586 | })
587 | }
588 |
589 | $.fn.scrollspy.Constructor = ScrollSpy
590 |
591 | $.fn.scrollspy.defaults = {
592 | offset: 10
593 | }
594 |
595 |
596 | /* SCROLLSPY DATA-API
597 | * ================== */
598 |
599 | $(window).on('load', function () {
600 | $('[data-spy="scroll"]').each(function () {
601 | var $spy = $(this)
602 | $spy.scrollspy($spy.data())
603 | })
604 | })
605 |
606 | }(window.jQuery);
607 | /* ========================================================
608 | * bootstrap-tab.js v2.1.1
609 | * http://twitter.github.com/bootstrap/javascript.html#tabs
610 | * ========================================================
611 | * Copyright 2012 Twitter, Inc.
612 | *
613 | * Licensed under the Apache License, Version 2.0 (the "License");
614 | * you may not use this file except in compliance with the License.
615 | * You may obtain a copy of the License at
616 | *
617 | * http://www.apache.org/licenses/LICENSE-2.0
618 | *
619 | * Unless required by applicable law or agreed to in writing, software
620 | * distributed under the License is distributed on an "AS IS" BASIS,
621 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
622 | * See the License for the specific language governing permissions and
623 | * limitations under the License.
624 | * ======================================================== */
625 |
626 |
627 | !function ($) {
628 |
629 | "use strict"; // jshint ;_;
630 |
631 |
632 | /* TAB CLASS DEFINITION
633 | * ==================== */
634 |
635 | var Tab = function (element) {
636 | this.element = $(element)
637 | }
638 |
639 | Tab.prototype = {
640 |
641 | constructor: Tab
642 |
643 | , show: function () {
644 | var $this = this.element
645 | , $ul = $this.closest('ul:not(.dropdown-menu)')
646 | , selector = $this.attr('data-target')
647 | , previous
648 | , $target
649 | , e
650 |
651 | if (!selector) {
652 | selector = $this.attr('href')
653 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
654 | }
655 |
656 | if ( $this.parent('li').hasClass('active') ) return
657 |
658 | previous = $ul.find('.active a').last()[0]
659 |
660 | e = $.Event('show', {
661 | relatedTarget: previous
662 | })
663 |
664 | $this.trigger(e)
665 |
666 | if (e.isDefaultPrevented()) return
667 |
668 | $target = $(selector)
669 |
670 | this.activate($this.parent('li'), $ul)
671 | this.activate($target, $target.parent(), function () {
672 | $this.trigger({
673 | type: 'shown'
674 | , relatedTarget: previous
675 | })
676 | })
677 | }
678 |
679 | , activate: function ( element, container, callback) {
680 | var $active = container.find('> .active')
681 | , transition = callback
682 | && $.support.transition
683 | && $active.hasClass('fade')
684 |
685 | function next() {
686 | $active
687 | .removeClass('active')
688 | .find('> .dropdown-menu > .active')
689 | .removeClass('active')
690 |
691 | element.addClass('active')
692 |
693 | if (transition) {
694 | element[0].offsetWidth // reflow for transition
695 | element.addClass('in')
696 | } else {
697 | element.removeClass('fade')
698 | }
699 |
700 | if ( element.parent('.dropdown-menu') ) {
701 | element.closest('li.dropdown').addClass('active')
702 | }
703 |
704 | callback && callback()
705 | }
706 |
707 | transition ?
708 | $active.one($.support.transition.end, next) :
709 | next()
710 |
711 | $active.removeClass('in')
712 | }
713 | }
714 |
715 |
716 | /* TAB PLUGIN DEFINITION
717 | * ===================== */
718 |
719 | $.fn.tab = function ( option ) {
720 | return this.each(function () {
721 | var $this = $(this)
722 | , data = $this.data('tab')
723 | if (!data) $this.data('tab', (data = new Tab(this)))
724 | if (typeof option == 'string') data[option]()
725 | })
726 | }
727 |
728 | $.fn.tab.Constructor = Tab
729 |
730 |
731 | /* TAB DATA-API
732 | * ============ */
733 |
734 | $(function () {
735 | $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
736 | e.preventDefault()
737 | $(this).tab('show')
738 | })
739 | })
740 |
741 | }(window.jQuery);
742 | /* ===========================================================
743 | * bootstrap-tooltip.js v2.1.1
744 | * http://twitter.github.com/bootstrap/javascript.html#tooltips
745 | * Inspired by the original jQuery.tipsy by Jason Frame
746 | * ===========================================================
747 | * Copyright 2012 Twitter, Inc.
748 | *
749 | * Licensed under the Apache License, Version 2.0 (the "License");
750 | * you may not use this file except in compliance with the License.
751 | * You may obtain a copy of the License at
752 | *
753 | * http://www.apache.org/licenses/LICENSE-2.0
754 | *
755 | * Unless required by applicable law or agreed to in writing, software
756 | * distributed under the License is distributed on an "AS IS" BASIS,
757 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
758 | * See the License for the specific language governing permissions and
759 | * limitations under the License.
760 | * ========================================================== */
761 |
762 |
763 | !function ($) {
764 |
765 | "use strict"; // jshint ;_;
766 |
767 |
768 | /* TOOLTIP PUBLIC CLASS DEFINITION
769 | * =============================== */
770 |
771 | var Tooltip = function (element, options) {
772 | this.init('tooltip', element, options)
773 | }
774 |
775 | Tooltip.prototype = {
776 |
777 | constructor: Tooltip
778 |
779 | , init: function (type, element, options) {
780 | var eventIn
781 | , eventOut
782 |
783 | this.type = type
784 | this.$element = $(element)
785 | this.options = this.getOptions(options)
786 | this.enabled = true
787 |
788 | if (this.options.trigger == 'click') {
789 | this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
790 | } else if (this.options.trigger != 'manual') {
791 | eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
792 | eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
793 | this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
794 | this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
795 | }
796 |
797 | this.options.selector ?
798 | (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
799 | this.fixTitle()
800 | }
801 |
802 | , getOptions: function (options) {
803 | options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
804 |
805 | if (options.delay && typeof options.delay == 'number') {
806 | options.delay = {
807 | show: options.delay
808 | , hide: options.delay
809 | }
810 | }
811 |
812 | return options
813 | }
814 |
815 | , enter: function (e) {
816 | var self = $(e.currentTarget)[this.type](this._options).data(this.type)
817 |
818 | if (!self.options.delay || !self.options.delay.show) return self.show()
819 |
820 | clearTimeout(this.timeout)
821 | self.hoverState = 'in'
822 | this.timeout = setTimeout(function() {
823 | if (self.hoverState == 'in') self.show()
824 | }, self.options.delay.show)
825 | }
826 |
827 | , leave: function (e) {
828 | var self = $(e.currentTarget)[this.type](this._options).data(this.type)
829 |
830 | if (this.timeout) clearTimeout(this.timeout)
831 | if (!self.options.delay || !self.options.delay.hide) return self.hide()
832 |
833 | self.hoverState = 'out'
834 | this.timeout = setTimeout(function() {
835 | if (self.hoverState == 'out') self.hide()
836 | }, self.options.delay.hide)
837 | }
838 |
839 | , show: function () {
840 | var $tip
841 | , inside
842 | , pos
843 | , actualWidth
844 | , actualHeight
845 | , placement
846 | , tp
847 |
848 | if (this.hasContent() && this.enabled) {
849 | $tip = this.tip()
850 | this.setContent()
851 |
852 | if (this.options.animation) {
853 | $tip.addClass('fade')
854 | }
855 |
856 | placement = typeof this.options.placement == 'function' ?
857 | this.options.placement.call(this, $tip[0], this.$element[0]) :
858 | this.options.placement
859 |
860 | inside = /in/.test(placement)
861 |
862 | $tip
863 | .remove()
864 | .css({ top: 0, left: 0, display: 'block' })
865 | .appendTo(inside ? this.$element : document.body)
866 |
867 | pos = this.getPosition(inside)
868 |
869 | actualWidth = $tip[0].offsetWidth
870 | actualHeight = $tip[0].offsetHeight
871 |
872 | switch (inside ? placement.split(' ')[1] : placement) {
873 | case 'bottom':
874 | tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
875 | break
876 | case 'top':
877 | tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
878 | break
879 | case 'left':
880 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
881 | break
882 | case 'right':
883 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
884 | break
885 | }
886 |
887 | $tip
888 | .css(tp)
889 | .addClass(placement)
890 | .addClass('in')
891 | }
892 | }
893 |
894 | , setContent: function () {
895 | var $tip = this.tip()
896 | , title = this.getTitle()
897 |
898 | $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
899 | $tip.removeClass('fade in top bottom left right')
900 | }
901 |
902 | , hide: function () {
903 | var that = this
904 | , $tip = this.tip()
905 |
906 | $tip.removeClass('in')
907 |
908 | function removeWithAnimation() {
909 | var timeout = setTimeout(function () {
910 | $tip.off($.support.transition.end).remove()
911 | }, 500)
912 |
913 | $tip.one($.support.transition.end, function () {
914 | clearTimeout(timeout)
915 | $tip.remove()
916 | })
917 | }
918 |
919 | $.support.transition && this.$tip.hasClass('fade') ?
920 | removeWithAnimation() :
921 | $tip.remove()
922 |
923 | return this
924 | }
925 |
926 | , fixTitle: function () {
927 | var $e = this.$element
928 | if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
929 | $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
930 | }
931 | }
932 |
933 | , hasContent: function () {
934 | return this.getTitle()
935 | }
936 |
937 | , getPosition: function (inside) {
938 | return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
939 | width: this.$element[0].offsetWidth
940 | , height: this.$element[0].offsetHeight
941 | })
942 | }
943 |
944 | , getTitle: function () {
945 | var title
946 | , $e = this.$element
947 | , o = this.options
948 |
949 | title = $e.attr('data-original-title')
950 | || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
951 |
952 | return title
953 | }
954 |
955 | , tip: function () {
956 | return this.$tip = this.$tip || $(this.options.template)
957 | }
958 |
959 | , validate: function () {
960 | if (!this.$element[0].parentNode) {
961 | this.hide()
962 | this.$element = null
963 | this.options = null
964 | }
965 | }
966 |
967 | , enable: function () {
968 | this.enabled = true
969 | }
970 |
971 | , disable: function () {
972 | this.enabled = false
973 | }
974 |
975 | , toggleEnabled: function () {
976 | this.enabled = !this.enabled
977 | }
978 |
979 | , toggle: function () {
980 | this[this.tip().hasClass('in') ? 'hide' : 'show']()
981 | }
982 |
983 | , destroy: function () {
984 | this.hide().$element.off('.' + this.type).removeData(this.type)
985 | }
986 |
987 | }
988 |
989 |
990 | /* TOOLTIP PLUGIN DEFINITION
991 | * ========================= */
992 |
993 | $.fn.tooltip = function ( option ) {
994 | return this.each(function () {
995 | var $this = $(this)
996 | , data = $this.data('tooltip')
997 | , options = typeof option == 'object' && option
998 | if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
999 | if (typeof option == 'string') data[option]()
1000 | })
1001 | }
1002 |
1003 | $.fn.tooltip.Constructor = Tooltip
1004 |
1005 | $.fn.tooltip.defaults = {
1006 | animation: true
1007 | , placement: 'top'
1008 | , selector: false
1009 | , template: ''
1010 | , trigger: 'hover'
1011 | , title: ''
1012 | , delay: 0
1013 | , html: true
1014 | }
1015 |
1016 | }(window.jQuery);
1017 |
1018 | /* ===========================================================
1019 | * bootstrap-popover.js v2.1.1
1020 | * http://twitter.github.com/bootstrap/javascript.html#popovers
1021 | * ===========================================================
1022 | * Copyright 2012 Twitter, Inc.
1023 | *
1024 | * Licensed under the Apache License, Version 2.0 (the "License");
1025 | * you may not use this file except in compliance with the License.
1026 | * You may obtain a copy of the License at
1027 | *
1028 | * http://www.apache.org/licenses/LICENSE-2.0
1029 | *
1030 | * Unless required by applicable law or agreed to in writing, software
1031 | * distributed under the License is distributed on an "AS IS" BASIS,
1032 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1033 | * See the License for the specific language governing permissions and
1034 | * limitations under the License.
1035 | * =========================================================== */
1036 |
1037 |
1038 | !function ($) {
1039 |
1040 | "use strict"; // jshint ;_;
1041 |
1042 |
1043 | /* POPOVER PUBLIC CLASS DEFINITION
1044 | * =============================== */
1045 |
1046 | var Popover = function (element, options) {
1047 | this.init('popover', element, options)
1048 | }
1049 |
1050 |
1051 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
1052 | ========================================== */
1053 |
1054 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
1055 |
1056 | constructor: Popover
1057 |
1058 | , setContent: function () {
1059 | var $tip = this.tip()
1060 | , title = this.getTitle()
1061 | , content = this.getContent()
1062 |
1063 | $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1064 | $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
1065 |
1066 | $tip.removeClass('fade top bottom left right in')
1067 | }
1068 |
1069 | , hasContent: function () {
1070 | return this.getTitle() || this.getContent()
1071 | }
1072 |
1073 | , getContent: function () {
1074 | var content
1075 | , $e = this.$element
1076 | , o = this.options
1077 |
1078 | content = $e.attr('data-content')
1079 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
1080 |
1081 | return content
1082 | }
1083 |
1084 | , tip: function () {
1085 | if (!this.$tip) {
1086 | this.$tip = $(this.options.template)
1087 | }
1088 | return this.$tip
1089 | }
1090 |
1091 | , destroy: function () {
1092 | this.hide().$element.off('.' + this.type).removeData(this.type)
1093 | }
1094 |
1095 | })
1096 |
1097 |
1098 | /* POPOVER PLUGIN DEFINITION
1099 | * ======================= */
1100 |
1101 | $.fn.popover = function (option) {
1102 | return this.each(function () {
1103 | var $this = $(this)
1104 | , data = $this.data('popover')
1105 | , options = typeof option == 'object' && option
1106 | if (!data) $this.data('popover', (data = new Popover(this, options)))
1107 | if (typeof option == 'string') data[option]()
1108 | })
1109 | }
1110 |
1111 | $.fn.popover.Constructor = Popover
1112 |
1113 | $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
1114 | placement: 'right'
1115 | , trigger: 'click'
1116 | , content: ''
1117 | , template: ''
1118 | })
1119 |
1120 | }(window.jQuery);
1121 | /* ==========================================================
1122 | * bootstrap-affix.js v2.1.1
1123 | * http://twitter.github.com/bootstrap/javascript.html#affix
1124 | * ==========================================================
1125 | * Copyright 2012 Twitter, Inc.
1126 | *
1127 | * Licensed under the Apache License, Version 2.0 (the "License");
1128 | * you may not use this file except in compliance with the License.
1129 | * You may obtain a copy of the License at
1130 | *
1131 | * http://www.apache.org/licenses/LICENSE-2.0
1132 | *
1133 | * Unless required by applicable law or agreed to in writing, software
1134 | * distributed under the License is distributed on an "AS IS" BASIS,
1135 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1136 | * See the License for the specific language governing permissions and
1137 | * limitations under the License.
1138 | * ========================================================== */
1139 |
1140 |
1141 | !function ($) {
1142 |
1143 | "use strict"; // jshint ;_;
1144 |
1145 |
1146 | /* AFFIX CLASS DEFINITION
1147 | * ====================== */
1148 |
1149 | var Affix = function (element, options) {
1150 | this.options = $.extend({}, $.fn.affix.defaults, options)
1151 | this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
1152 | this.$element = $(element)
1153 | this.checkPosition()
1154 | }
1155 |
1156 | Affix.prototype.checkPosition = function () {
1157 | if (!this.$element.is(':visible')) return
1158 |
1159 | var scrollHeight = $(document).height()
1160 | , scrollTop = this.$window.scrollTop()
1161 | , position = this.$element.offset()
1162 | , offset = this.options.offset
1163 | , offsetBottom = offset.bottom
1164 | , offsetTop = offset.top
1165 | , reset = 'affix affix-top affix-bottom'
1166 | , affix
1167 |
1168 | if (typeof offset != 'object') offsetBottom = offsetTop = offset
1169 | if (typeof offsetTop == 'function') offsetTop = offset.top()
1170 | if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
1171 |
1172 | affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
1173 | false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
1174 | 'bottom' : offsetTop != null && scrollTop <= offsetTop ?
1175 | 'top' : false
1176 |
1177 | if (this.affixed === affix) return
1178 |
1179 | this.affixed = affix
1180 | this.unpin = affix == 'bottom' ? position.top - scrollTop : null
1181 |
1182 | this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
1183 | }
1184 |
1185 |
1186 | /* AFFIX PLUGIN DEFINITION
1187 | * ======================= */
1188 |
1189 | $.fn.affix = function (option) {
1190 | return this.each(function () {
1191 | var $this = $(this)
1192 | , data = $this.data('affix')
1193 | , options = typeof option == 'object' && option
1194 | if (!data) $this.data('affix', (data = new Affix(this, options)))
1195 | if (typeof option == 'string') data[option]()
1196 | })
1197 | }
1198 |
1199 | $.fn.affix.Constructor = Affix
1200 |
1201 | $.fn.affix.defaults = {
1202 | offset: 0
1203 | }
1204 |
1205 |
1206 | /* AFFIX DATA-API
1207 | * ============== */
1208 |
1209 | $(window).on('load', function () {
1210 | $('[data-spy="affix"]').each(function () {
1211 | var $spy = $(this)
1212 | , data = $spy.data()
1213 |
1214 | data.offset = data.offset || {}
1215 |
1216 | data.offsetBottom && (data.offset.bottom = data.offsetBottom)
1217 | data.offsetTop && (data.offset.top = data.offsetTop)
1218 |
1219 | $spy.affix(data)
1220 | })
1221 | })
1222 |
1223 |
1224 | }(window.jQuery);
1225 | /* ==========================================================
1226 | * bootstrap-alert.js v2.1.1
1227 | * http://twitter.github.com/bootstrap/javascript.html#alerts
1228 | * ==========================================================
1229 | * Copyright 2012 Twitter, Inc.
1230 | *
1231 | * Licensed under the Apache License, Version 2.0 (the "License");
1232 | * you may not use this file except in compliance with the License.
1233 | * You may obtain a copy of the License at
1234 | *
1235 | * http://www.apache.org/licenses/LICENSE-2.0
1236 | *
1237 | * Unless required by applicable law or agreed to in writing, software
1238 | * distributed under the License is distributed on an "AS IS" BASIS,
1239 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1240 | * See the License for the specific language governing permissions and
1241 | * limitations under the License.
1242 | * ========================================================== */
1243 |
1244 |
1245 | !function ($) {
1246 |
1247 | "use strict"; // jshint ;_;
1248 |
1249 |
1250 | /* ALERT CLASS DEFINITION
1251 | * ====================== */
1252 |
1253 | var dismiss = '[data-dismiss="alert"]'
1254 | , Alert = function (el) {
1255 | $(el).on('click', dismiss, this.close)
1256 | }
1257 |
1258 | Alert.prototype.close = function (e) {
1259 | var $this = $(this)
1260 | , selector = $this.attr('data-target')
1261 | , $parent
1262 |
1263 | if (!selector) {
1264 | selector = $this.attr('href')
1265 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
1266 | }
1267 |
1268 | $parent = $(selector)
1269 |
1270 | e && e.preventDefault()
1271 |
1272 | $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
1273 |
1274 | $parent.trigger(e = $.Event('close'))
1275 |
1276 | if (e.isDefaultPrevented()) return
1277 |
1278 | $parent.removeClass('in')
1279 |
1280 | function removeElement() {
1281 | $parent
1282 | .trigger('closed')
1283 | .remove()
1284 | }
1285 |
1286 | $.support.transition && $parent.hasClass('fade') ?
1287 | $parent.on($.support.transition.end, removeElement) :
1288 | removeElement()
1289 | }
1290 |
1291 |
1292 | /* ALERT PLUGIN DEFINITION
1293 | * ======================= */
1294 |
1295 | $.fn.alert = function (option) {
1296 | return this.each(function () {
1297 | var $this = $(this)
1298 | , data = $this.data('alert')
1299 | if (!data) $this.data('alert', (data = new Alert(this)))
1300 | if (typeof option == 'string') data[option].call($this)
1301 | })
1302 | }
1303 |
1304 | $.fn.alert.Constructor = Alert
1305 |
1306 |
1307 | /* ALERT DATA-API
1308 | * ============== */
1309 |
1310 | $(function () {
1311 | $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
1312 | })
1313 |
1314 | }(window.jQuery);
1315 | /* ============================================================
1316 | * bootstrap-button.js v2.1.1
1317 | * http://twitter.github.com/bootstrap/javascript.html#buttons
1318 | * ============================================================
1319 | * Copyright 2012 Twitter, Inc.
1320 | *
1321 | * Licensed under the Apache License, Version 2.0 (the "License");
1322 | * you may not use this file except in compliance with the License.
1323 | * You may obtain a copy of the License at
1324 | *
1325 | * http://www.apache.org/licenses/LICENSE-2.0
1326 | *
1327 | * Unless required by applicable law or agreed to in writing, software
1328 | * distributed under the License is distributed on an "AS IS" BASIS,
1329 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1330 | * See the License for the specific language governing permissions and
1331 | * limitations under the License.
1332 | * ============================================================ */
1333 |
1334 |
1335 | !function ($) {
1336 |
1337 | "use strict"; // jshint ;_;
1338 |
1339 |
1340 | /* BUTTON PUBLIC CLASS DEFINITION
1341 | * ============================== */
1342 |
1343 | var Button = function (element, options) {
1344 | this.$element = $(element)
1345 | this.options = $.extend({}, $.fn.button.defaults, options)
1346 | }
1347 |
1348 | Button.prototype.setState = function (state) {
1349 | var d = 'disabled'
1350 | , $el = this.$element
1351 | , data = $el.data()
1352 | , val = $el.is('input') ? 'val' : 'html'
1353 |
1354 | state = state + 'Text'
1355 | data.resetText || $el.data('resetText', $el[val]())
1356 |
1357 | $el[val](data[state] || this.options[state])
1358 |
1359 | // push to event loop to allow forms to submit
1360 | setTimeout(function () {
1361 | state == 'loadingText' ?
1362 | $el.addClass(d).attr(d, d) :
1363 | $el.removeClass(d).removeAttr(d)
1364 | }, 0)
1365 | }
1366 |
1367 | Button.prototype.toggle = function () {
1368 | var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
1369 |
1370 | $parent && $parent
1371 | .find('.active')
1372 | .removeClass('active')
1373 |
1374 | this.$element.toggleClass('active')
1375 | }
1376 |
1377 |
1378 | /* BUTTON PLUGIN DEFINITION
1379 | * ======================== */
1380 |
1381 | $.fn.button = function (option) {
1382 | return this.each(function () {
1383 | var $this = $(this)
1384 | , data = $this.data('button')
1385 | , options = typeof option == 'object' && option
1386 | if (!data) $this.data('button', (data = new Button(this, options)))
1387 | if (option == 'toggle') data.toggle()
1388 | else if (option) data.setState(option)
1389 | })
1390 | }
1391 |
1392 | $.fn.button.defaults = {
1393 | loadingText: 'loading...'
1394 | }
1395 |
1396 | $.fn.button.Constructor = Button
1397 |
1398 |
1399 | /* BUTTON DATA-API
1400 | * =============== */
1401 |
1402 | $(function () {
1403 | $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
1404 | var $btn = $(e.target)
1405 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
1406 | $btn.button('toggle')
1407 | })
1408 | })
1409 |
1410 | }(window.jQuery);
1411 | /* =============================================================
1412 | * bootstrap-collapse.js v2.1.1
1413 | * http://twitter.github.com/bootstrap/javascript.html#collapse
1414 | * =============================================================
1415 | * Copyright 2012 Twitter, Inc.
1416 | *
1417 | * Licensed under the Apache License, Version 2.0 (the "License");
1418 | * you may not use this file except in compliance with the License.
1419 | * You may obtain a copy of the License at
1420 | *
1421 | * http://www.apache.org/licenses/LICENSE-2.0
1422 | *
1423 | * Unless required by applicable law or agreed to in writing, software
1424 | * distributed under the License is distributed on an "AS IS" BASIS,
1425 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1426 | * See the License for the specific language governing permissions and
1427 | * limitations under the License.
1428 | * ============================================================ */
1429 |
1430 |
1431 | !function ($) {
1432 |
1433 | "use strict"; // jshint ;_;
1434 |
1435 |
1436 | /* COLLAPSE PUBLIC CLASS DEFINITION
1437 | * ================================ */
1438 |
1439 | var Collapse = function (element, options) {
1440 | this.$element = $(element)
1441 | this.options = $.extend({}, $.fn.collapse.defaults, options)
1442 |
1443 | if (this.options.parent) {
1444 | this.$parent = $(this.options.parent)
1445 | }
1446 |
1447 | this.options.toggle && this.toggle()
1448 | }
1449 |
1450 | Collapse.prototype = {
1451 |
1452 | constructor: Collapse
1453 |
1454 | , dimension: function () {
1455 | var hasWidth = this.$element.hasClass('width')
1456 | return hasWidth ? 'width' : 'height'
1457 | }
1458 |
1459 | , show: function () {
1460 | var dimension
1461 | , scroll
1462 | , actives
1463 | , hasData
1464 |
1465 | if (this.transitioning) return
1466 |
1467 | dimension = this.dimension()
1468 | scroll = $.camelCase(['scroll', dimension].join('-'))
1469 | actives = this.$parent && this.$parent.find('> .accordion-group > .in')
1470 |
1471 | if (actives && actives.length) {
1472 | hasData = actives.data('collapse')
1473 | if (hasData && hasData.transitioning) return
1474 | actives.collapse('hide')
1475 | hasData || actives.data('collapse', null)
1476 | }
1477 |
1478 | this.$element[dimension](0)
1479 | this.transition('addClass', $.Event('show'), 'shown')
1480 | $.support.transition && this.$element[dimension](this.$element[0][scroll])
1481 | }
1482 |
1483 | , hide: function () {
1484 | var dimension
1485 | if (this.transitioning) return
1486 | dimension = this.dimension()
1487 | this.reset(this.$element[dimension]())
1488 | this.transition('removeClass', $.Event('hide'), 'hidden')
1489 | this.$element[dimension](0)
1490 | }
1491 |
1492 | , reset: function (size) {
1493 | var dimension = this.dimension()
1494 |
1495 | this.$element
1496 | .removeClass('collapse')
1497 | [dimension](size || 'auto')
1498 | [0].offsetWidth
1499 |
1500 | this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
1501 |
1502 | return this
1503 | }
1504 |
1505 | , transition: function (method, startEvent, completeEvent) {
1506 | var that = this
1507 | , complete = function () {
1508 | if (startEvent.type == 'show') that.reset()
1509 | that.transitioning = 0
1510 | that.$element.trigger(completeEvent)
1511 | }
1512 |
1513 | this.$element.trigger(startEvent)
1514 |
1515 | if (startEvent.isDefaultPrevented()) return
1516 |
1517 | this.transitioning = 1
1518 |
1519 | this.$element[method]('in')
1520 |
1521 | $.support.transition && this.$element.hasClass('collapse') ?
1522 | this.$element.one($.support.transition.end, complete) :
1523 | complete()
1524 | }
1525 |
1526 | , toggle: function () {
1527 | this[this.$element.hasClass('in') ? 'hide' : 'show']()
1528 | }
1529 |
1530 | }
1531 |
1532 |
1533 | /* COLLAPSIBLE PLUGIN DEFINITION
1534 | * ============================== */
1535 |
1536 | $.fn.collapse = function (option) {
1537 | return this.each(function () {
1538 | var $this = $(this)
1539 | , data = $this.data('collapse')
1540 | , options = typeof option == 'object' && option
1541 | if (!data) $this.data('collapse', (data = new Collapse(this, options)))
1542 | if (typeof option == 'string') data[option]()
1543 | })
1544 | }
1545 |
1546 | $.fn.collapse.defaults = {
1547 | toggle: true
1548 | }
1549 |
1550 | $.fn.collapse.Constructor = Collapse
1551 |
1552 |
1553 | /* COLLAPSIBLE DATA-API
1554 | * ==================== */
1555 |
1556 | $(function () {
1557 | $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
1558 | var $this = $(this), href
1559 | , target = $this.attr('data-target')
1560 | || e.preventDefault()
1561 | || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
1562 | , option = $(target).data('collapse') ? 'toggle' : $this.data()
1563 | $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
1564 | $(target).collapse(option)
1565 | })
1566 | })
1567 |
1568 | }(window.jQuery);
1569 | /* ==========================================================
1570 | * bootstrap-carousel.js v2.1.1
1571 | * http://twitter.github.com/bootstrap/javascript.html#carousel
1572 | * ==========================================================
1573 | * Copyright 2012 Twitter, Inc.
1574 | *
1575 | * Licensed under the Apache License, Version 2.0 (the "License");
1576 | * you may not use this file except in compliance with the License.
1577 | * You may obtain a copy of the License at
1578 | *
1579 | * http://www.apache.org/licenses/LICENSE-2.0
1580 | *
1581 | * Unless required by applicable law or agreed to in writing, software
1582 | * distributed under the License is distributed on an "AS IS" BASIS,
1583 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1584 | * See the License for the specific language governing permissions and
1585 | * limitations under the License.
1586 | * ========================================================== */
1587 |
1588 |
1589 | !function ($) {
1590 |
1591 | "use strict"; // jshint ;_;
1592 |
1593 |
1594 | /* CAROUSEL CLASS DEFINITION
1595 | * ========================= */
1596 |
1597 | var Carousel = function (element, options) {
1598 | this.$element = $(element)
1599 | this.options = options
1600 | this.options.slide && this.slide(this.options.slide)
1601 | this.options.pause == 'hover' && this.$element
1602 | .on('mouseenter', $.proxy(this.pause, this))
1603 | .on('mouseleave', $.proxy(this.cycle, this))
1604 | }
1605 |
1606 | Carousel.prototype = {
1607 |
1608 | cycle: function (e) {
1609 | if (!e) this.paused = false
1610 | this.options.interval
1611 | && !this.paused
1612 | && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
1613 | return this
1614 | }
1615 |
1616 | , to: function (pos) {
1617 | var $active = this.$element.find('.item.active')
1618 | , children = $active.parent().children()
1619 | , activePos = children.index($active)
1620 | , that = this
1621 |
1622 | if (pos > (children.length - 1) || pos < 0) return
1623 |
1624 | if (this.sliding) {
1625 | return this.$element.one('slid', function () {
1626 | that.to(pos)
1627 | })
1628 | }
1629 |
1630 | if (activePos == pos) {
1631 | return this.pause().cycle()
1632 | }
1633 |
1634 | return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
1635 | }
1636 |
1637 | , pause: function (e) {
1638 | if (!e) this.paused = true
1639 | if (this.$element.find('.next, .prev').length && $.support.transition.end) {
1640 | this.$element.trigger($.support.transition.end)
1641 | this.cycle()
1642 | }
1643 | clearInterval(this.interval)
1644 | this.interval = null
1645 | return this
1646 | }
1647 |
1648 | , next: function () {
1649 | if (this.sliding) return
1650 | return this.slide('next')
1651 | }
1652 |
1653 | , prev: function () {
1654 | if (this.sliding) return
1655 | return this.slide('prev')
1656 | }
1657 |
1658 | , slide: function (type, next) {
1659 | var $active = this.$element.find('.item.active')
1660 | , $next = next || $active[type]()
1661 | , isCycling = this.interval
1662 | , direction = type == 'next' ? 'left' : 'right'
1663 | , fallback = type == 'next' ? 'first' : 'last'
1664 | , that = this
1665 | , e = $.Event('slide', {
1666 | relatedTarget: $next[0]
1667 | })
1668 |
1669 | this.sliding = true
1670 |
1671 | isCycling && this.pause()
1672 |
1673 | $next = $next.length ? $next : this.$element.find('.item')[fallback]()
1674 |
1675 | if ($next.hasClass('active')) return
1676 |
1677 | if ($.support.transition && this.$element.hasClass('slide')) {
1678 | this.$element.trigger(e)
1679 | if (e.isDefaultPrevented()) return
1680 | $next.addClass(type)
1681 | $next[0].offsetWidth // force reflow
1682 | $active.addClass(direction)
1683 | $next.addClass(direction)
1684 | this.$element.one($.support.transition.end, function () {
1685 | $next.removeClass([type, direction].join(' ')).addClass('active')
1686 | $active.removeClass(['active', direction].join(' '))
1687 | that.sliding = false
1688 | setTimeout(function () { that.$element.trigger('slid') }, 0)
1689 | })
1690 | } else {
1691 | this.$element.trigger(e)
1692 | if (e.isDefaultPrevented()) return
1693 | $active.removeClass('active')
1694 | $next.addClass('active')
1695 | this.sliding = false
1696 | this.$element.trigger('slid')
1697 | }
1698 |
1699 | isCycling && this.cycle()
1700 |
1701 | return this
1702 | }
1703 |
1704 | }
1705 |
1706 |
1707 | /* CAROUSEL PLUGIN DEFINITION
1708 | * ========================== */
1709 |
1710 | $.fn.carousel = function (option) {
1711 | return this.each(function () {
1712 | var $this = $(this)
1713 | , data = $this.data('carousel')
1714 | , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
1715 | , action = typeof option == 'string' ? option : options.slide
1716 | if (!data) $this.data('carousel', (data = new Carousel(this, options)))
1717 | if (typeof option == 'number') data.to(option)
1718 | else if (action) data[action]()
1719 | else if (options.interval) data.cycle()
1720 | })
1721 | }
1722 |
1723 | $.fn.carousel.defaults = {
1724 | interval: 5000
1725 | , pause: 'hover'
1726 | }
1727 |
1728 | $.fn.carousel.Constructor = Carousel
1729 |
1730 |
1731 | /* CAROUSEL DATA-API
1732 | * ================= */
1733 |
1734 | $(function () {
1735 | $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
1736 | var $this = $(this), href
1737 | , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
1738 | , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
1739 | $target.carousel(options)
1740 | e.preventDefault()
1741 | })
1742 | })
1743 |
1744 | }(window.jQuery);
1745 | /* =============================================================
1746 | * bootstrap-typeahead.js v2.1.1
1747 | * http://twitter.github.com/bootstrap/javascript.html#typeahead
1748 | * =============================================================
1749 | * Copyright 2012 Twitter, Inc.
1750 | *
1751 | * Licensed under the Apache License, Version 2.0 (the "License");
1752 | * you may not use this file except in compliance with the License.
1753 | * You may obtain a copy of the License at
1754 | *
1755 | * http://www.apache.org/licenses/LICENSE-2.0
1756 | *
1757 | * Unless required by applicable law or agreed to in writing, software
1758 | * distributed under the License is distributed on an "AS IS" BASIS,
1759 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1760 | * See the License for the specific language governing permissions and
1761 | * limitations under the License.
1762 | * ============================================================ */
1763 |
1764 |
1765 | !function($){
1766 |
1767 | "use strict"; // jshint ;_;
1768 |
1769 |
1770 | /* TYPEAHEAD PUBLIC CLASS DEFINITION
1771 | * ================================= */
1772 |
1773 | var Typeahead = function (element, options) {
1774 | this.$element = $(element)
1775 | this.options = $.extend({}, $.fn.typeahead.defaults, options)
1776 | this.matcher = this.options.matcher || this.matcher
1777 | this.sorter = this.options.sorter || this.sorter
1778 | this.highlighter = this.options.highlighter || this.highlighter
1779 | this.updater = this.options.updater || this.updater
1780 | this.$menu = $(this.options.menu).appendTo('body')
1781 | this.source = this.options.source
1782 | this.shown = false
1783 | this.listen()
1784 | }
1785 |
1786 | Typeahead.prototype = {
1787 |
1788 | constructor: Typeahead
1789 |
1790 | , select: function () {
1791 | var val = this.$menu.find('.active').attr('data-value')
1792 | this.$element
1793 | .val(this.updater(val))
1794 | .change()
1795 | return this.hide()
1796 | }
1797 |
1798 | , updater: function (item) {
1799 | return item
1800 | }
1801 |
1802 | , show: function () {
1803 | var pos = $.extend({}, this.$element.offset(), {
1804 | height: this.$element[0].offsetHeight
1805 | })
1806 |
1807 | this.$menu.css({
1808 | top: pos.top + pos.height
1809 | , left: pos.left
1810 | })
1811 |
1812 | this.$menu.show()
1813 | this.shown = true
1814 | return this
1815 | }
1816 |
1817 | , hide: function () {
1818 | this.$menu.hide()
1819 | this.shown = false
1820 | return this
1821 | }
1822 |
1823 | , lookup: function (event) {
1824 | var items
1825 |
1826 | this.query = this.$element.val()
1827 |
1828 | if (!this.query || this.query.length < this.options.minLength) {
1829 | return this.shown ? this.hide() : this
1830 | }
1831 |
1832 | items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
1833 |
1834 | return items ? this.process(items) : this
1835 | }
1836 |
1837 | , process: function (items) {
1838 | var that = this
1839 |
1840 | items = $.grep(items, function (item) {
1841 | return that.matcher(item)
1842 | })
1843 |
1844 | items = this.sorter(items)
1845 |
1846 | if (!items.length) {
1847 | return this.shown ? this.hide() : this
1848 | }
1849 |
1850 | return this.render(items.slice(0, this.options.items)).show()
1851 | }
1852 |
1853 | , matcher: function (item) {
1854 | return ~item.toLowerCase().indexOf(this.query.toLowerCase())
1855 | }
1856 |
1857 | , sorter: function (items) {
1858 | var beginswith = []
1859 | , caseSensitive = []
1860 | , caseInsensitive = []
1861 | , item
1862 |
1863 | while (item = items.shift()) {
1864 | if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
1865 | else if (~item.indexOf(this.query)) caseSensitive.push(item)
1866 | else caseInsensitive.push(item)
1867 | }
1868 |
1869 | return beginswith.concat(caseSensitive, caseInsensitive)
1870 | }
1871 |
1872 | , highlighter: function (item) {
1873 | var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
1874 | return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
1875 | return '' + match + ''
1876 | })
1877 | }
1878 |
1879 | , render: function (items) {
1880 | var that = this
1881 |
1882 | items = $(items).map(function (i, item) {
1883 | i = $(that.options.item).attr('data-value', item)
1884 | i.find('a').html(that.highlighter(item))
1885 | return i[0]
1886 | })
1887 |
1888 | items.first().addClass('active')
1889 | this.$menu.html(items)
1890 | return this
1891 | }
1892 |
1893 | , next: function (event) {
1894 | var active = this.$menu.find('.active').removeClass('active')
1895 | , next = active.next()
1896 |
1897 | if (!next.length) {
1898 | next = $(this.$menu.find('li')[0])
1899 | }
1900 |
1901 | next.addClass('active')
1902 | }
1903 |
1904 | , prev: function (event) {
1905 | var active = this.$menu.find('.active').removeClass('active')
1906 | , prev = active.prev()
1907 |
1908 | if (!prev.length) {
1909 | prev = this.$menu.find('li').last()
1910 | }
1911 |
1912 | prev.addClass('active')
1913 | }
1914 |
1915 | , listen: function () {
1916 | this.$element
1917 | .on('blur', $.proxy(this.blur, this))
1918 | .on('keypress', $.proxy(this.keypress, this))
1919 | .on('keyup', $.proxy(this.keyup, this))
1920 |
1921 | if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
1922 | this.$element.on('keydown', $.proxy(this.keydown, this))
1923 | }
1924 |
1925 | this.$menu
1926 | .on('click', $.proxy(this.click, this))
1927 | .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
1928 | }
1929 |
1930 | , move: function (e) {
1931 | if (!this.shown) return
1932 |
1933 | switch(e.keyCode) {
1934 | case 9: // tab
1935 | case 13: // enter
1936 | case 27: // escape
1937 | e.preventDefault()
1938 | break
1939 |
1940 | case 38: // up arrow
1941 | e.preventDefault()
1942 | this.prev()
1943 | break
1944 |
1945 | case 40: // down arrow
1946 | e.preventDefault()
1947 | this.next()
1948 | break
1949 | }
1950 |
1951 | e.stopPropagation()
1952 | }
1953 |
1954 | , keydown: function (e) {
1955 | this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
1956 | this.move(e)
1957 | }
1958 |
1959 | , keypress: function (e) {
1960 | if (this.suppressKeyPressRepeat) return
1961 | this.move(e)
1962 | }
1963 |
1964 | , keyup: function (e) {
1965 | switch(e.keyCode) {
1966 | case 40: // down arrow
1967 | case 38: // up arrow
1968 | break
1969 |
1970 | case 9: // tab
1971 | case 13: // enter
1972 | if (!this.shown) return
1973 | this.select()
1974 | break
1975 |
1976 | case 27: // escape
1977 | if (!this.shown) return
1978 | this.hide()
1979 | break
1980 |
1981 | default:
1982 | this.lookup()
1983 | }
1984 |
1985 | e.stopPropagation()
1986 | e.preventDefault()
1987 | }
1988 |
1989 | , blur: function (e) {
1990 | var that = this
1991 | setTimeout(function () { that.hide() }, 150)
1992 | }
1993 |
1994 | , click: function (e) {
1995 | e.stopPropagation()
1996 | e.preventDefault()
1997 | this.select()
1998 | }
1999 |
2000 | , mouseenter: function (e) {
2001 | this.$menu.find('.active').removeClass('active')
2002 | $(e.currentTarget).addClass('active')
2003 | }
2004 |
2005 | }
2006 |
2007 |
2008 | /* TYPEAHEAD PLUGIN DEFINITION
2009 | * =========================== */
2010 |
2011 | $.fn.typeahead = function (option) {
2012 | return this.each(function () {
2013 | var $this = $(this)
2014 | , data = $this.data('typeahead')
2015 | , options = typeof option == 'object' && option
2016 | if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
2017 | if (typeof option == 'string') data[option]()
2018 | })
2019 | }
2020 |
2021 | $.fn.typeahead.defaults = {
2022 | source: []
2023 | , items: 8
2024 | , menu: ''
2025 | , item: ''
2026 | , minLength: 1
2027 | }
2028 |
2029 | $.fn.typeahead.Constructor = Typeahead
2030 |
2031 |
2032 | /* TYPEAHEAD DATA-API
2033 | * ================== */
2034 |
2035 | $(function () {
2036 | $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
2037 | var $this = $(this)
2038 | if ($this.data('typeahead')) return
2039 | e.preventDefault()
2040 | $this.typeahead($this.data())
2041 | })
2042 | })
2043 |
2044 | }(window.jQuery);
2045 |
--------------------------------------------------------------------------------