contour 2.3.0 → 2.4.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5005cd60339b65b03235835e4b2cb4497eff103c
4
- data.tar.gz: 730a8d445aa67a4457a115a7028998fc35a1add3
3
+ metadata.gz: 437703b7d56331d9247a43445a273ee060fa74db
4
+ data.tar.gz: 89c9bc5675e5a46655db7c0d885010c89fb09780
5
5
  SHA512:
6
- metadata.gz: 1f28da541a5c2a86be2c3e5ae5b5ad3f979de201f1abe42a6a3a9dc92e2e1dcce5c84ddc5faee0d0b1b64cbfc0d32b8f94579a80ffa44263d55f6017b8412925
7
- data.tar.gz: 91dfa4343cfd2cc5d885683a29e77f8ba73808f1d4fc9e68221c37f213bcd43f34cfd7b96327fe4877c89c119646a678aff07ee590880137e4e4ba755e57482c
6
+ metadata.gz: fc137f49fc6f6e226f0d050bced540b6c06ebfa5dd0dad53246854303d34277c279a993e2e1fe8438e38d874d85398dffb6bffda8d4ce8c83a31a156e0bb279a
7
+ data.tar.gz: 9211c3702b21caa44288c4fef3886e6c79259396dcea424950f24992afdb083c2641c19599557e50528bfc9087b074484de59179f830d75b127cd8d4481e2c24
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 2.4.0
2
+
3
+ ### Enhancements
4
+ - Updated Bootstrap to 3.1.0
5
+ - **Gem Changes**
6
+ - Updated to devise 3.2.2
7
+
1
8
  ## 2.3.0 (February 3, 2014)
2
9
 
3
10
  ### Enhancements
data/README.md CHANGED
@@ -35,7 +35,7 @@ cd blank_rails_project
35
35
  Modify `Gemfile` and add
36
36
 
37
37
  ```ruby
38
- gem 'contour', '~> 2.3.0'
38
+ gem 'contour', '~> 2.4.0'
39
39
  ```
40
40
 
41
41
  Run Bundle install
@@ -1,34 +1,22 @@
1
1
  /*!
2
- * Bootstrap v3.0.2 by @fat and @mdo
3
- * Copyright 2013 Twitter, Inc.
4
- * Licensed under http://www.apache.org/licenses/LICENSE-2.0
5
- *
6
- * Designed and built with all the love in the world by @mdo and @fat.
2
+ * Bootstrap v3.1.0 (http://getbootstrap.com)
3
+ * Copyright 2011-2014 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
5
  */
8
6
 
9
- if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }
7
+ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap requires jQuery') }
10
8
 
11
9
  /* ========================================================================
12
- * Bootstrap: transition.js v3.0.2
10
+ * Bootstrap: transition.js v3.1.0
13
11
  * http://getbootstrap.com/javascript/#transitions
14
12
  * ========================================================================
15
- * Copyright 2013 Twitter, Inc.
16
- *
17
- * Licensed under the Apache License, Version 2.0 (the "License");
18
- * you may not use this file except in compliance with the License.
19
- * You may obtain a copy of the License at
20
- *
21
- * http://www.apache.org/licenses/LICENSE-2.0
22
- *
23
- * Unless required by applicable law or agreed to in writing, software
24
- * distributed under the License is distributed on an "AS IS" BASIS,
25
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26
- * See the License for the specific language governing permissions and
27
- * limitations under the License.
13
+ * Copyright 2011-2014 Twitter, Inc.
14
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
28
15
  * ======================================================================== */
29
16
 
30
17
 
31
- +function ($) { "use strict";
18
+ +function ($) {
19
+ 'use strict';
32
20
 
33
21
  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
34
22
  // ============================================================
@@ -37,10 +25,10 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
37
25
  var el = document.createElement('bootstrap')
38
26
 
39
27
  var transEndEventNames = {
40
- 'WebkitTransition' : 'webkitTransitionEnd'
41
- , 'MozTransition' : 'transitionend'
42
- , 'OTransition' : 'oTransitionEnd otransitionend'
43
- , 'transition' : 'transitionend'
28
+ 'WebkitTransition' : 'webkitTransitionEnd',
29
+ 'MozTransition' : 'transitionend',
30
+ 'OTransition' : 'oTransitionEnd otransitionend',
31
+ 'transition' : 'transitionend'
44
32
  }
45
33
 
46
34
  for (var name in transEndEventNames) {
@@ -48,6 +36,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
48
36
  return { end: transEndEventNames[name] }
49
37
  }
50
38
  }
39
+
40
+ return false // explicit for ie8 ( ._.)
51
41
  }
52
42
 
53
43
  // http://blog.alexmaccaw.com/css-transitions
@@ -66,26 +56,16 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
66
56
  }(jQuery);
67
57
 
68
58
  /* ========================================================================
69
- * Bootstrap: alert.js v3.0.2
59
+ * Bootstrap: alert.js v3.1.0
70
60
  * http://getbootstrap.com/javascript/#alerts
71
61
  * ========================================================================
72
- * Copyright 2013 Twitter, Inc.
73
- *
74
- * Licensed under the Apache License, Version 2.0 (the "License");
75
- * you may not use this file except in compliance with the License.
76
- * You may obtain a copy of the License at
77
- *
78
- * http://www.apache.org/licenses/LICENSE-2.0
79
- *
80
- * Unless required by applicable law or agreed to in writing, software
81
- * distributed under the License is distributed on an "AS IS" BASIS,
82
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
83
- * See the License for the specific language governing permissions and
84
- * limitations under the License.
62
+ * Copyright 2011-2014 Twitter, Inc.
63
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
85
64
  * ======================================================================== */
86
65
 
87
66
 
88
- +function ($) { "use strict";
67
+ +function ($) {
68
+ 'use strict';
89
69
 
90
70
  // ALERT CLASS DEFINITION
91
71
  // ======================
@@ -165,33 +145,24 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
165
145
  }(jQuery);
166
146
 
167
147
  /* ========================================================================
168
- * Bootstrap: button.js v3.0.2
148
+ * Bootstrap: button.js v3.1.0
169
149
  * http://getbootstrap.com/javascript/#buttons
170
150
  * ========================================================================
171
- * Copyright 2013 Twitter, Inc.
172
- *
173
- * Licensed under the Apache License, Version 2.0 (the "License");
174
- * you may not use this file except in compliance with the License.
175
- * You may obtain a copy of the License at
176
- *
177
- * http://www.apache.org/licenses/LICENSE-2.0
178
- *
179
- * Unless required by applicable law or agreed to in writing, software
180
- * distributed under the License is distributed on an "AS IS" BASIS,
181
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
182
- * See the License for the specific language governing permissions and
183
- * limitations under the License.
151
+ * Copyright 2011-2014 Twitter, Inc.
152
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
184
153
  * ======================================================================== */
185
154
 
186
155
 
187
- +function ($) { "use strict";
156
+ +function ($) {
157
+ 'use strict';
188
158
 
189
159
  // BUTTON PUBLIC CLASS DEFINITION
190
160
  // ==============================
191
161
 
192
162
  var Button = function (element, options) {
193
- this.$element = $(element)
194
- this.options = $.extend({}, Button.DEFAULTS, options)
163
+ this.$element = $(element)
164
+ this.options = $.extend({}, Button.DEFAULTS, options)
165
+ this.isLoading = false
195
166
  }
196
167
 
197
168
  Button.DEFAULTS = {
@@ -211,24 +182,31 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
211
182
  $el[val](data[state] || this.options[state])
212
183
 
213
184
  // push to event loop to allow forms to submit
214
- setTimeout(function () {
215
- state == 'loadingText' ?
216
- $el.addClass(d).attr(d, d) :
217
- $el.removeClass(d).removeAttr(d);
218
- }, 0)
185
+ setTimeout($.proxy(function () {
186
+ if (state == 'loadingText') {
187
+ this.isLoading = true
188
+ $el.addClass(d).attr(d, d)
189
+ } else if (this.isLoading) {
190
+ this.isLoading = false
191
+ $el.removeClass(d).removeAttr(d)
192
+ }
193
+ }, this), 0)
219
194
  }
220
195
 
221
196
  Button.prototype.toggle = function () {
197
+ var changed = true
222
198
  var $parent = this.$element.closest('[data-toggle="buttons"]')
223
199
 
224
200
  if ($parent.length) {
225
201
  var $input = this.$element.find('input')
226
- .prop('checked', !this.$element.hasClass('active'))
227
- .trigger('change')
228
- if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
202
+ if ($input.prop('type') == 'radio') {
203
+ if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
204
+ else $parent.find('.active').removeClass('active')
205
+ }
206
+ if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
229
207
  }
230
208
 
231
- this.$element.toggleClass('active')
209
+ if (changed) this.$element.toggleClass('active')
232
210
  }
233
211
 
234
212
 
@@ -275,26 +253,16 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
275
253
  }(jQuery);
276
254
 
277
255
  /* ========================================================================
278
- * Bootstrap: carousel.js v3.0.2
256
+ * Bootstrap: carousel.js v3.1.0
279
257
  * http://getbootstrap.com/javascript/#carousel
280
258
  * ========================================================================
281
- * Copyright 2013 Twitter, Inc.
282
- *
283
- * Licensed under the Apache License, Version 2.0 (the "License");
284
- * you may not use this file except in compliance with the License.
285
- * You may obtain a copy of the License at
286
- *
287
- * http://www.apache.org/licenses/LICENSE-2.0
288
- *
289
- * Unless required by applicable law or agreed to in writing, software
290
- * distributed under the License is distributed on an "AS IS" BASIS,
291
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
292
- * See the License for the specific language governing permissions and
293
- * limitations under the License.
259
+ * Copyright 2011-2014 Twitter, Inc.
260
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
294
261
  * ======================================================================== */
295
262
 
296
263
 
297
- +function ($) { "use strict";
264
+ +function ($) {
265
+ 'use strict';
298
266
 
299
267
  // CAROUSEL CLASS DEFINITION
300
268
  // =========================
@@ -315,9 +283,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
315
283
  }
316
284
 
317
285
  Carousel.DEFAULTS = {
318
- interval: 5000
319
- , pause: 'hover'
320
- , wrap: true
286
+ interval: 5000,
287
+ pause: 'hover',
288
+ wrap: true
321
289
  }
322
290
 
323
291
  Carousel.prototype.cycle = function (e) {
@@ -345,7 +313,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
345
313
 
346
314
  if (pos > (this.$items.length - 1) || pos < 0) return
347
315
 
348
- if (this.sliding) return this.$element.one('slid', function () { that.to(pos) })
316
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
349
317
  if (activeIndex == pos) return this.pause().cycle()
350
318
 
351
319
  return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@@ -354,7 +322,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
354
322
  Carousel.prototype.pause = function (e) {
355
323
  e || (this.paused = true)
356
324
 
357
- if (this.$element.find('.next, .prev').length && $.support.transition.end) {
325
+ if (this.$element.find('.next, .prev').length && $.support.transition) {
358
326
  this.$element.trigger($.support.transition.end)
359
327
  this.cycle(true)
360
328
  }
@@ -387,25 +355,25 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
387
355
  $next = this.$element.find('.item')[fallback]()
388
356
  }
389
357
 
390
- this.sliding = true
391
-
392
- isCycling && this.pause()
358
+ if ($next.hasClass('active')) return this.sliding = false
393
359
 
394
360
  var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
361
+ this.$element.trigger(e)
362
+ if (e.isDefaultPrevented()) return
395
363
 
396
- if ($next.hasClass('active')) return
364
+ this.sliding = true
365
+
366
+ isCycling && this.pause()
397
367
 
398
368
  if (this.$indicators.length) {
399
369
  this.$indicators.find('.active').removeClass('active')
400
- this.$element.one('slid', function () {
370
+ this.$element.one('slid.bs.carousel', function () {
401
371
  var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
402
372
  $nextIndicator && $nextIndicator.addClass('active')
403
373
  })
404
374
  }
405
375
 
406
376
  if ($.support.transition && this.$element.hasClass('slide')) {
407
- this.$element.trigger(e)
408
- if (e.isDefaultPrevented()) return
409
377
  $next.addClass(type)
410
378
  $next[0].offsetWidth // force reflow
411
379
  $active.addClass(direction)
@@ -415,16 +383,14 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
415
383
  $next.removeClass([type, direction].join(' ')).addClass('active')
416
384
  $active.removeClass(['active', direction].join(' '))
417
385
  that.sliding = false
418
- setTimeout(function () { that.$element.trigger('slid') }, 0)
386
+ setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
419
387
  })
420
- .emulateTransitionEnd(600)
388
+ .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
421
389
  } else {
422
- this.$element.trigger(e)
423
- if (e.isDefaultPrevented()) return
424
390
  $active.removeClass('active')
425
391
  $next.addClass('active')
426
392
  this.sliding = false
427
- this.$element.trigger('slid')
393
+ this.$element.trigger('slid.bs.carousel')
428
394
  }
429
395
 
430
396
  isCycling && this.cycle()
@@ -493,26 +459,16 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
493
459
  }(jQuery);
494
460
 
495
461
  /* ========================================================================
496
- * Bootstrap: collapse.js v3.0.2
462
+ * Bootstrap: collapse.js v3.1.0
497
463
  * http://getbootstrap.com/javascript/#collapse
498
464
  * ========================================================================
499
- * Copyright 2013 Twitter, Inc.
500
- *
501
- * Licensed under the Apache License, Version 2.0 (the "License");
502
- * you may not use this file except in compliance with the License.
503
- * You may obtain a copy of the License at
504
- *
505
- * http://www.apache.org/licenses/LICENSE-2.0
506
- *
507
- * Unless required by applicable law or agreed to in writing, software
508
- * distributed under the License is distributed on an "AS IS" BASIS,
509
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
510
- * See the License for the specific language governing permissions and
511
- * limitations under the License.
465
+ * Copyright 2011-2014 Twitter, Inc.
466
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
512
467
  * ======================================================================== */
513
468
 
514
469
 
515
- +function ($) { "use strict";
470
+ +function ($) {
471
+ 'use strict';
516
472
 
517
473
  // COLLAPSE PUBLIC CLASS DEFINITION
518
474
  // ================================
@@ -563,7 +519,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
563
519
  var complete = function () {
564
520
  this.$element
565
521
  .removeClass('collapsing')
566
- .addClass('in')
522
+ .addClass('collapse in')
567
523
  [dimension]('auto')
568
524
  this.transitioning = 0
569
525
  this.$element.trigger('shown.bs.collapse')
@@ -631,6 +587,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
631
587
  var data = $this.data('bs.collapse')
632
588
  var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
633
589
 
590
+ if (!data && options.toggle && option == 'show') option = !option
634
591
  if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
635
592
  if (typeof option == 'string') data[option]()
636
593
  })
@@ -673,26 +630,16 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
673
630
  }(jQuery);
674
631
 
675
632
  /* ========================================================================
676
- * Bootstrap: dropdown.js v3.0.2
633
+ * Bootstrap: dropdown.js v3.1.0
677
634
  * http://getbootstrap.com/javascript/#dropdowns
678
635
  * ========================================================================
679
- * Copyright 2013 Twitter, Inc.
680
- *
681
- * Licensed under the Apache License, Version 2.0 (the "License");
682
- * you may not use this file except in compliance with the License.
683
- * You may obtain a copy of the License at
684
- *
685
- * http://www.apache.org/licenses/LICENSE-2.0
686
- *
687
- * Unless required by applicable law or agreed to in writing, software
688
- * distributed under the License is distributed on an "AS IS" BASIS,
689
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
690
- * See the License for the specific language governing permissions and
691
- * limitations under the License.
636
+ * Copyright 2011-2014 Twitter, Inc.
637
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
692
638
  * ======================================================================== */
693
639
 
694
640
 
695
- +function ($) { "use strict";
641
+ +function ($) {
642
+ 'use strict';
696
643
 
697
644
  // DROPDOWN CLASS DEFINITION
698
645
  // =========================
@@ -700,7 +647,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
700
647
  var backdrop = '.dropdown-backdrop'
701
648
  var toggle = '[data-toggle=dropdown]'
702
649
  var Dropdown = function (element) {
703
- var $el = $(element).on('click.bs.dropdown', this.toggle)
650
+ $(element).on('click.bs.dropdown', this.toggle)
704
651
  }
705
652
 
706
653
  Dropdown.prototype.toggle = function (e) {
@@ -715,17 +662,18 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
715
662
 
716
663
  if (!isActive) {
717
664
  if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
718
- // if mobile we we use a backdrop because click events don't delegate
665
+ // if mobile we use a backdrop because click events don't delegate
719
666
  $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
720
667
  }
721
668
 
722
- $parent.trigger(e = $.Event('show.bs.dropdown'))
669
+ var relatedTarget = { relatedTarget: this }
670
+ $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
723
671
 
724
672
  if (e.isDefaultPrevented()) return
725
673
 
726
674
  $parent
727
675
  .toggleClass('open')
728
- .trigger('shown.bs.dropdown')
676
+ .trigger('shown.bs.dropdown', relatedTarget)
729
677
 
730
678
  $this.focus()
731
679
  }
@@ -751,7 +699,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
751
699
  return $this.click()
752
700
  }
753
701
 
754
- var $items = $('[role=menu] li:not(.divider):visible a', $parent)
702
+ var desc = ' li:not(.divider):visible a'
703
+ var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc)
755
704
 
756
705
  if (!$items.length) return
757
706
 
@@ -759,19 +708,20 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
759
708
 
760
709
  if (e.keyCode == 38 && index > 0) index-- // up
761
710
  if (e.keyCode == 40 && index < $items.length - 1) index++ // down
762
- if (!~index) index=0
711
+ if (!~index) index = 0
763
712
 
764
713
  $items.eq(index).focus()
765
714
  }
766
715
 
767
- function clearMenus() {
716
+ function clearMenus(e) {
768
717
  $(backdrop).remove()
769
- $(toggle).each(function (e) {
718
+ $(toggle).each(function () {
770
719
  var $parent = getParent($(this))
720
+ var relatedTarget = { relatedTarget: this }
771
721
  if (!$parent.hasClass('open')) return
772
- $parent.trigger(e = $.Event('hide.bs.dropdown'))
722
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
773
723
  if (e.isDefaultPrevented()) return
774
- $parent.removeClass('open').trigger('hidden.bs.dropdown')
724
+ $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
775
725
  })
776
726
  }
777
727
 
@@ -780,7 +730,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
780
730
 
781
731
  if (!selector) {
782
732
  selector = $this.attr('href')
783
- selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
733
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
784
734
  }
785
735
 
786
736
  var $parent = selector && $(selector)
@@ -797,9 +747,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
797
747
  $.fn.dropdown = function (option) {
798
748
  return this.each(function () {
799
749
  var $this = $(this)
800
- var data = $this.data('dropdown')
750
+ var data = $this.data('bs.dropdown')
801
751
 
802
- if (!data) $this.data('dropdown', (data = new Dropdown(this)))
752
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
803
753
  if (typeof option == 'string') data[option].call($this)
804
754
  })
805
755
  }
@@ -822,32 +772,22 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
822
772
  $(document)
823
773
  .on('click.bs.dropdown.data-api', clearMenus)
824
774
  .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
825
- .on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
826
- .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
775
+ .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
776
+ .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown)
827
777
 
828
778
  }(jQuery);
829
779
 
830
780
  /* ========================================================================
831
- * Bootstrap: modal.js v3.0.2
781
+ * Bootstrap: modal.js v3.1.0
832
782
  * http://getbootstrap.com/javascript/#modals
833
783
  * ========================================================================
834
- * Copyright 2013 Twitter, Inc.
835
- *
836
- * Licensed under the Apache License, Version 2.0 (the "License");
837
- * you may not use this file except in compliance with the License.
838
- * You may obtain a copy of the License at
839
- *
840
- * http://www.apache.org/licenses/LICENSE-2.0
841
- *
842
- * Unless required by applicable law or agreed to in writing, software
843
- * distributed under the License is distributed on an "AS IS" BASIS,
844
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
845
- * See the License for the specific language governing permissions and
846
- * limitations under the License.
784
+ * Copyright 2011-2014 Twitter, Inc.
785
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
847
786
  * ======================================================================== */
848
787
 
849
788
 
850
- +function ($) { "use strict";
789
+ +function ($) {
790
+ 'use strict';
851
791
 
852
792
  // MODAL CLASS DEFINITION
853
793
  // ======================
@@ -858,13 +798,19 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
858
798
  this.$backdrop =
859
799
  this.isShown = null
860
800
 
861
- if (this.options.remote) this.$element.load(this.options.remote)
801
+ if (this.options.remote) {
802
+ this.$element
803
+ .find('.modal-content')
804
+ .load(this.options.remote, $.proxy(function () {
805
+ this.$element.trigger('loaded.bs.modal')
806
+ }, this))
807
+ }
862
808
  }
863
809
 
864
810
  Modal.DEFAULTS = {
865
- backdrop: true
866
- , keyboard: true
867
- , show: true
811
+ backdrop: true,
812
+ keyboard: true,
813
+ show: true
868
814
  }
869
815
 
870
816
  Modal.prototype.toggle = function (_relatedTarget) {
@@ -883,7 +829,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
883
829
 
884
830
  this.escape()
885
831
 
886
- this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
832
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
887
833
 
888
834
  this.backdrop(function () {
889
835
  var transition = $.support.transition && that.$element.hasClass('fade')
@@ -892,7 +838,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
892
838
  that.$element.appendTo(document.body) // don't move modals dom position
893
839
  }
894
840
 
895
- that.$element.show()
841
+ that.$element
842
+ .show()
843
+ .scrollTop(0)
896
844
 
897
845
  if (transition) {
898
846
  that.$element[0].offsetWidth // force reflow
@@ -934,7 +882,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
934
882
  this.$element
935
883
  .removeClass('in')
936
884
  .attr('aria-hidden', true)
937
- .off('click.dismiss.modal')
885
+ .off('click.dismiss.bs.modal')
938
886
 
939
887
  $.support.transition && this.$element.hasClass('fade') ?
940
888
  this.$element
@@ -978,7 +926,6 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
978
926
  }
979
927
 
980
928
  Modal.prototype.backdrop = function (callback) {
981
- var that = this
982
929
  var animate = this.$element.hasClass('fade') ? 'fade' : ''
983
930
 
984
931
  if (this.isShown && this.options.backdrop) {
@@ -987,7 +934,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
987
934
  this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
988
935
  .appendTo(document.body)
989
936
 
990
- this.$element.on('click.dismiss.modal', $.proxy(function (e) {
937
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
991
938
  if (e.target !== e.currentTarget) return
992
939
  this.options.backdrop == 'static'
993
940
  ? this.$element[0].focus.call(this.$element[0])
@@ -1009,7 +956,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1009
956
  } else if (!this.isShown && this.$backdrop) {
1010
957
  this.$backdrop.removeClass('in')
1011
958
 
1012
- $.support.transition && this.$element.hasClass('fade')?
959
+ $.support.transition && this.$element.hasClass('fade') ?
1013
960
  this.$backdrop
1014
961
  .one($.support.transition.end, callback)
1015
962
  .emulateTransitionEnd(150) :
@@ -1057,9 +1004,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1057
1004
  var $this = $(this)
1058
1005
  var href = $this.attr('href')
1059
1006
  var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
1060
- var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1007
+ var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1061
1008
 
1062
- e.preventDefault()
1009
+ if ($this.is('a')) e.preventDefault()
1063
1010
 
1064
1011
  $target
1065
1012
  .modal(option, this)
@@ -1069,33 +1016,23 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1069
1016
  })
1070
1017
 
1071
1018
  $(document)
1072
- .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
1019
+ .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
1073
1020
  .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
1074
1021
 
1075
1022
  }(jQuery);
1076
1023
 
1077
1024
  /* ========================================================================
1078
- * Bootstrap: tooltip.js v3.0.2
1025
+ * Bootstrap: tooltip.js v3.1.0
1079
1026
  * http://getbootstrap.com/javascript/#tooltip
1080
1027
  * Inspired by the original jQuery.tipsy by Jason Frame
1081
1028
  * ========================================================================
1082
- * Copyright 2013 Twitter, Inc.
1083
- *
1084
- * Licensed under the Apache License, Version 2.0 (the "License");
1085
- * you may not use this file except in compliance with the License.
1086
- * You may obtain a copy of the License at
1087
- *
1088
- * http://www.apache.org/licenses/LICENSE-2.0
1089
- *
1090
- * Unless required by applicable law or agreed to in writing, software
1091
- * distributed under the License is distributed on an "AS IS" BASIS,
1092
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1093
- * See the License for the specific language governing permissions and
1094
- * limitations under the License.
1029
+ * Copyright 2011-2014 Twitter, Inc.
1030
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1095
1031
  * ======================================================================== */
1096
1032
 
1097
1033
 
1098
- +function ($) { "use strict";
1034
+ +function ($) {
1035
+ 'use strict';
1099
1036
 
1100
1037
  // TOOLTIP PUBLIC CLASS DEFINITION
1101
1038
  // ===============================
@@ -1112,15 +1049,15 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1112
1049
  }
1113
1050
 
1114
1051
  Tooltip.DEFAULTS = {
1115
- animation: true
1116
- , placement: 'top'
1117
- , selector: false
1118
- , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
1119
- , trigger: 'hover focus'
1120
- , title: ''
1121
- , delay: 0
1122
- , html: false
1123
- , container: false
1052
+ animation: true,
1053
+ placement: 'top',
1054
+ selector: false,
1055
+ template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
1056
+ trigger: 'hover focus',
1057
+ title: '',
1058
+ delay: 0,
1059
+ html: false,
1060
+ container: false
1124
1061
  }
1125
1062
 
1126
1063
  Tooltip.prototype.init = function (type, element, options) {
@@ -1137,8 +1074,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1137
1074
  if (trigger == 'click') {
1138
1075
  this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1139
1076
  } else if (trigger != 'manual') {
1140
- var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
1141
- var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
1077
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
1078
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
1142
1079
 
1143
1080
  this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
1144
1081
  this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
@@ -1159,8 +1096,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1159
1096
 
1160
1097
  if (options.delay && typeof options.delay == 'number') {
1161
1098
  options.delay = {
1162
- show: options.delay
1163
- , hide: options.delay
1099
+ show: options.delay,
1100
+ hide: options.delay
1164
1101
  }
1165
1102
  }
1166
1103
 
@@ -1209,12 +1146,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1209
1146
  }
1210
1147
 
1211
1148
  Tooltip.prototype.show = function () {
1212
- var e = $.Event('show.bs.'+ this.type)
1149
+ var e = $.Event('show.bs.' + this.type)
1213
1150
 
1214
1151
  if (this.hasContent() && this.enabled) {
1215
1152
  this.$element.trigger(e)
1216
1153
 
1217
1154
  if (e.isDefaultPrevented()) return
1155
+ var that = this;
1218
1156
 
1219
1157
  var $tip = this.tip()
1220
1158
 
@@ -1264,11 +1202,21 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1264
1202
  var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
1265
1203
 
1266
1204
  this.applyPlacement(calculatedOffset, placement)
1267
- this.$element.trigger('shown.bs.' + this.type)
1205
+ this.hoverState = null
1206
+
1207
+ var complete = function() {
1208
+ that.$element.trigger('shown.bs.' + that.type)
1209
+ }
1210
+
1211
+ $.support.transition && this.$tip.hasClass('fade') ?
1212
+ $tip
1213
+ .one($.support.transition.end, complete)
1214
+ .emulateTransitionEnd(150) :
1215
+ complete()
1268
1216
  }
1269
1217
  }
1270
1218
 
1271
- Tooltip.prototype.applyPlacement = function(offset, placement) {
1219
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
1272
1220
  var replace
1273
1221
  var $tip = this.tip()
1274
1222
  var width = $tip[0].offsetWidth
@@ -1285,9 +1233,18 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1285
1233
  offset.top = offset.top + marginTop
1286
1234
  offset.left = offset.left + marginLeft
1287
1235
 
1288
- $tip
1289
- .offset(offset)
1290
- .addClass('in')
1236
+ // $.fn.offset doesn't round pixel values
1237
+ // so we use setOffset directly with our own function B-0
1238
+ $.offset.setOffset($tip[0], $.extend({
1239
+ using: function (props) {
1240
+ $tip.css({
1241
+ top: Math.round(props.top),
1242
+ left: Math.round(props.left)
1243
+ })
1244
+ }
1245
+ }, offset), 0)
1246
+
1247
+ $tip.addClass('in')
1291
1248
 
1292
1249
  // check to see if placing tip in new offset caused the tip to resize itself
1293
1250
  var actualWidth = $tip[0].offsetWidth
@@ -1319,8 +1276,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1319
1276
  if (replace) $tip.offset(offset)
1320
1277
  }
1321
1278
 
1322
- Tooltip.prototype.replaceArrow = function(delta, dimension, position) {
1323
- this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
1279
+ Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
1280
+ this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
1324
1281
  }
1325
1282
 
1326
1283
  Tooltip.prototype.setContent = function () {
@@ -1338,6 +1295,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1338
1295
 
1339
1296
  function complete() {
1340
1297
  if (that.hoverState != 'in') $tip.detach()
1298
+ that.$element.trigger('hidden.bs.' + that.type)
1341
1299
  }
1342
1300
 
1343
1301
  this.$element.trigger(e)
@@ -1352,7 +1310,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1352
1310
  .emulateTransitionEnd(150) :
1353
1311
  complete()
1354
1312
 
1355
- this.$element.trigger('hidden.bs.' + this.type)
1313
+ this.hoverState = null
1356
1314
 
1357
1315
  return this
1358
1316
  }
@@ -1371,8 +1329,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1371
1329
  Tooltip.prototype.getPosition = function () {
1372
1330
  var el = this.$element[0]
1373
1331
  return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
1374
- width: el.offsetWidth
1375
- , height: el.offsetHeight
1332
+ width: el.offsetWidth,
1333
+ height: el.offsetHeight
1376
1334
  }, this.$element.offset())
1377
1335
  }
1378
1336
 
@@ -1428,6 +1386,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1428
1386
  }
1429
1387
 
1430
1388
  Tooltip.prototype.destroy = function () {
1389
+ clearTimeout(this.timeout)
1431
1390
  this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
1432
1391
  }
1433
1392
 
@@ -1443,6 +1402,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1443
1402
  var data = $this.data('bs.tooltip')
1444
1403
  var options = typeof option == 'object' && option
1445
1404
 
1405
+ if (!data && option == 'destroy') return
1446
1406
  if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1447
1407
  if (typeof option == 'string') data[option]()
1448
1408
  })
@@ -1462,26 +1422,16 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1462
1422
  }(jQuery);
1463
1423
 
1464
1424
  /* ========================================================================
1465
- * Bootstrap: popover.js v3.0.2
1425
+ * Bootstrap: popover.js v3.1.0
1466
1426
  * http://getbootstrap.com/javascript/#popovers
1467
1427
  * ========================================================================
1468
- * Copyright 2013 Twitter, Inc.
1469
- *
1470
- * Licensed under the Apache License, Version 2.0 (the "License");
1471
- * you may not use this file except in compliance with the License.
1472
- * You may obtain a copy of the License at
1473
- *
1474
- * http://www.apache.org/licenses/LICENSE-2.0
1475
- *
1476
- * Unless required by applicable law or agreed to in writing, software
1477
- * distributed under the License is distributed on an "AS IS" BASIS,
1478
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1479
- * See the License for the specific language governing permissions and
1480
- * limitations under the License.
1428
+ * Copyright 2011-2014 Twitter, Inc.
1429
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1481
1430
  * ======================================================================== */
1482
1431
 
1483
1432
 
1484
- +function ($) { "use strict";
1433
+ +function ($) {
1434
+ 'use strict';
1485
1435
 
1486
1436
  // POPOVER PUBLIC CLASS DEFINITION
1487
1437
  // ===============================
@@ -1492,11 +1442,11 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1492
1442
 
1493
1443
  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1494
1444
 
1495
- Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
1496
- placement: 'right'
1497
- , trigger: 'click'
1498
- , content: ''
1499
- , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1445
+ Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
1446
+ placement: 'right',
1447
+ trigger: 'click',
1448
+ content: '',
1449
+ template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1500
1450
  })
1501
1451
 
1502
1452
 
@@ -1517,7 +1467,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1517
1467
  var content = this.getContent()
1518
1468
 
1519
1469
  $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1520
- $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
1470
+ $tip.find('.popover-content')[ // we use append for html objects to maintain js events
1471
+ this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
1472
+ ](content)
1521
1473
 
1522
1474
  $tip.removeClass('fade top bottom left right in')
1523
1475
 
@@ -1561,6 +1513,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1561
1513
  var data = $this.data('bs.popover')
1562
1514
  var options = typeof option == 'object' && option
1563
1515
 
1516
+ if (!data && option == 'destroy') return
1564
1517
  if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1565
1518
  if (typeof option == 'string') data[option]()
1566
1519
  })
@@ -1580,26 +1533,16 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1580
1533
  }(jQuery);
1581
1534
 
1582
1535
  /* ========================================================================
1583
- * Bootstrap: scrollspy.js v3.0.2
1536
+ * Bootstrap: scrollspy.js v3.1.0
1584
1537
  * http://getbootstrap.com/javascript/#scrollspy
1585
1538
  * ========================================================================
1586
- * Copyright 2013 Twitter, Inc.
1587
- *
1588
- * Licensed under the Apache License, Version 2.0 (the "License");
1589
- * you may not use this file except in compliance with the License.
1590
- * You may obtain a copy of the License at
1591
- *
1592
- * http://www.apache.org/licenses/LICENSE-2.0
1593
- *
1594
- * Unless required by applicable law or agreed to in writing, software
1595
- * distributed under the License is distributed on an "AS IS" BASIS,
1596
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1597
- * See the License for the specific language governing permissions and
1598
- * limitations under the License.
1539
+ * Copyright 2011-2014 Twitter, Inc.
1540
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1599
1541
  * ======================================================================== */
1600
1542
 
1601
1543
 
1602
- +function ($) { "use strict";
1544
+ +function ($) {
1545
+ 'use strict';
1603
1546
 
1604
1547
  // SCROLLSPY CLASS DEFINITION
1605
1548
  // ==========================
@@ -1639,10 +1582,11 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1639
1582
  .map(function () {
1640
1583
  var $el = $(this)
1641
1584
  var href = $el.data('target') || $el.attr('href')
1642
- var $href = /^#\w/.test(href) && $(href)
1585
+ var $href = /^#./.test(href) && $(href)
1643
1586
 
1644
1587
  return ($href
1645
1588
  && $href.length
1589
+ && $href.is(':visible')
1646
1590
  && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
1647
1591
  })
1648
1592
  .sort(function (a, b) { return a[0] - b[0] })
@@ -1665,6 +1609,10 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1665
1609
  return activeTarget != (i = targets.last()[0]) && this.activate(i)
1666
1610
  }
1667
1611
 
1612
+ if (activeTarget && scrollTop <= offsets[0]) {
1613
+ return activeTarget != (i = targets[0]) && this.activate(i)
1614
+ }
1615
+
1668
1616
  for (i = offsets.length; i--;) {
1669
1617
  activeTarget != targets[i]
1670
1618
  && scrollTop >= offsets[i]
@@ -1677,24 +1625,24 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1677
1625
  this.activeTarget = target
1678
1626
 
1679
1627
  $(this.selector)
1680
- .parents('.active')
1628
+ .parentsUntil(this.options.target, '.active')
1681
1629
  .removeClass('active')
1682
1630
 
1683
- var selector = this.selector
1684
- + '[data-target="' + target + '"],'
1685
- + this.selector + '[href="' + target + '"]'
1631
+ var selector = this.selector +
1632
+ '[data-target="' + target + '"],' +
1633
+ this.selector + '[href="' + target + '"]'
1686
1634
 
1687
1635
  var active = $(selector)
1688
1636
  .parents('li')
1689
1637
  .addClass('active')
1690
1638
 
1691
- if (active.parent('.dropdown-menu').length) {
1639
+ if (active.parent('.dropdown-menu').length) {
1692
1640
  active = active
1693
1641
  .closest('li.dropdown')
1694
1642
  .addClass('active')
1695
1643
  }
1696
1644
 
1697
- active.trigger('activate')
1645
+ active.trigger('activate.bs.scrollspy')
1698
1646
  }
1699
1647
 
1700
1648
 
@@ -1739,26 +1687,16 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1739
1687
  }(jQuery);
1740
1688
 
1741
1689
  /* ========================================================================
1742
- * Bootstrap: tab.js v3.0.2
1690
+ * Bootstrap: tab.js v3.1.0
1743
1691
  * http://getbootstrap.com/javascript/#tabs
1744
1692
  * ========================================================================
1745
- * Copyright 2013 Twitter, Inc.
1746
- *
1747
- * Licensed under the Apache License, Version 2.0 (the "License");
1748
- * you may not use this file except in compliance with the License.
1749
- * You may obtain a copy of the License at
1750
- *
1751
- * http://www.apache.org/licenses/LICENSE-2.0
1752
- *
1753
- * Unless required by applicable law or agreed to in writing, software
1754
- * distributed under the License is distributed on an "AS IS" BASIS,
1755
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1756
- * See the License for the specific language governing permissions and
1757
- * limitations under the License.
1693
+ * Copyright 2011-2014 Twitter, Inc.
1694
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1758
1695
  * ======================================================================== */
1759
1696
 
1760
1697
 
1761
- +function ($) { "use strict";
1698
+ +function ($) {
1699
+ 'use strict';
1762
1700
 
1763
1701
  // TAB CLASS DEFINITION
1764
1702
  // ====================
@@ -1793,8 +1731,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1793
1731
  this.activate($this.parent('li'), $ul)
1794
1732
  this.activate($target, $target.parent(), function () {
1795
1733
  $this.trigger({
1796
- type: 'shown.bs.tab'
1797
- , relatedTarget: previous
1734
+ type: 'shown.bs.tab',
1735
+ relatedTarget: previous
1798
1736
  })
1799
1737
  })
1800
1738
  }
@@ -1875,26 +1813,16 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1875
1813
  }(jQuery);
1876
1814
 
1877
1815
  /* ========================================================================
1878
- * Bootstrap: affix.js v3.0.2
1816
+ * Bootstrap: affix.js v3.1.0
1879
1817
  * http://getbootstrap.com/javascript/#affix
1880
1818
  * ========================================================================
1881
- * Copyright 2013 Twitter, Inc.
1882
- *
1883
- * Licensed under the Apache License, Version 2.0 (the "License");
1884
- * you may not use this file except in compliance with the License.
1885
- * You may obtain a copy of the License at
1886
- *
1887
- * http://www.apache.org/licenses/LICENSE-2.0
1888
- *
1889
- * Unless required by applicable law or agreed to in writing, software
1890
- * distributed under the License is distributed on an "AS IS" BASIS,
1891
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1892
- * See the License for the specific language governing permissions and
1893
- * limitations under the License.
1819
+ * Copyright 2011-2014 Twitter, Inc.
1820
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1894
1821
  * ======================================================================== */
1895
1822
 
1896
1823
 
1897
- +function ($) { "use strict";
1824
+ +function ($) {
1825
+ 'use strict';
1898
1826
 
1899
1827
  // AFFIX CLASS DEFINITION
1900
1828
  // ======================
@@ -1905,9 +1833,10 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1905
1833
  .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
1906
1834
  .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
1907
1835
 
1908
- this.$element = $(element)
1909
- this.affixed =
1910
- this.unpin = null
1836
+ this.$element = $(element)
1837
+ this.affixed =
1838
+ this.unpin =
1839
+ this.pinnedOffset = null
1911
1840
 
1912
1841
  this.checkPosition()
1913
1842
  }
@@ -1918,6 +1847,14 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1918
1847
  offset: 0
1919
1848
  }
1920
1849
 
1850
+ Affix.prototype.getPinnedOffset = function () {
1851
+ if (this.pinnedOffset) return this.pinnedOffset
1852
+ this.$element.removeClass(Affix.RESET).addClass('affix')
1853
+ var scrollTop = this.$window.scrollTop()
1854
+ var position = this.$element.offset()
1855
+ return (this.pinnedOffset = position.top - scrollTop)
1856
+ }
1857
+
1921
1858
  Affix.prototype.checkPositionWithEventLoop = function () {
1922
1859
  setTimeout($.proxy(this.checkPosition, this), 1)
1923
1860
  }
@@ -1932,9 +1869,11 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1932
1869
  var offsetTop = offset.top
1933
1870
  var offsetBottom = offset.bottom
1934
1871
 
1872
+ if (this.affixed == 'top') position.top += scrollTop
1873
+
1935
1874
  if (typeof offset != 'object') offsetBottom = offsetTop = offset
1936
- if (typeof offsetTop == 'function') offsetTop = offset.top()
1937
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
1875
+ if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
1876
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
1938
1877
 
1939
1878
  var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
1940
1879
  offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
@@ -1943,13 +1882,23 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
1943
1882
  if (this.affixed === affix) return
1944
1883
  if (this.unpin) this.$element.css('top', '')
1945
1884
 
1885
+ var affixType = 'affix' + (affix ? '-' + affix : '')
1886
+ var e = $.Event(affixType + '.bs.affix')
1887
+
1888
+ this.$element.trigger(e)
1889
+
1890
+ if (e.isDefaultPrevented()) return
1891
+
1946
1892
  this.affixed = affix
1947
- this.unpin = affix == 'bottom' ? position.top - scrollTop : null
1893
+ this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
1948
1894
 
1949
- this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
1895
+ this.$element
1896
+ .removeClass(Affix.RESET)
1897
+ .addClass(affixType)
1898
+ .trigger($.Event(affixType.replace('affix', 'affixed')))
1950
1899
 
1951
1900
  if (affix == 'bottom') {
1952
- this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })
1901
+ this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
1953
1902
  }
1954
1903
  }
1955
1904