weeler 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * Bootstrap v3.3.1 (http://getbootstrap.com)
3
- * Copyright 2011-2014 Twitter, Inc.
4
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
3
+ * Copyright 2011-2015 Twitter, Inc.
4
+ * Licensed under the MIT license
5
5
  */
6
6
 
7
7
  if (typeof jQuery === 'undefined') {
@@ -9,17 +9,18 @@ if (typeof jQuery === 'undefined') {
9
9
  }
10
10
 
11
11
  +function ($) {
12
+ 'use strict';
12
13
  var version = $.fn.jquery.split(' ')[0].split('.')
13
- if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
14
- throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
14
+ if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
15
+ throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
15
16
  }
16
17
  }(jQuery);
17
18
 
18
19
  /* ========================================================================
19
- * Bootstrap: transition.js v3.3.1
20
+ * Bootstrap: transition.js v3.3.6
20
21
  * http://getbootstrap.com/javascript/#transitions
21
22
  * ========================================================================
22
- * Copyright 2011-2014 Twitter, Inc.
23
+ * Copyright 2011-2015 Twitter, Inc.
23
24
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
24
25
  * ======================================================================== */
25
26
 
@@ -76,10 +77,10 @@ if (typeof jQuery === 'undefined') {
76
77
  }(jQuery);
77
78
 
78
79
  /* ========================================================================
79
- * Bootstrap: alert.js v3.3.1
80
+ * Bootstrap: alert.js v3.3.6
80
81
  * http://getbootstrap.com/javascript/#alerts
81
82
  * ========================================================================
82
- * Copyright 2011-2014 Twitter, Inc.
83
+ * Copyright 2011-2015 Twitter, Inc.
83
84
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
84
85
  * ======================================================================== */
85
86
 
@@ -95,7 +96,7 @@ if (typeof jQuery === 'undefined') {
95
96
  $(el).on('click', dismiss, this.close)
96
97
  }
97
98
 
98
- Alert.VERSION = '3.3.1'
99
+ Alert.VERSION = '3.3.6'
99
100
 
100
101
  Alert.TRANSITION_DURATION = 150
101
102
 
@@ -171,10 +172,10 @@ if (typeof jQuery === 'undefined') {
171
172
  }(jQuery);
172
173
 
173
174
  /* ========================================================================
174
- * Bootstrap: button.js v3.3.1
175
+ * Bootstrap: button.js v3.3.6
175
176
  * http://getbootstrap.com/javascript/#buttons
176
177
  * ========================================================================
177
- * Copyright 2011-2014 Twitter, Inc.
178
+ * Copyright 2011-2015 Twitter, Inc.
178
179
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
179
180
  * ======================================================================== */
180
181
 
@@ -191,7 +192,7 @@ if (typeof jQuery === 'undefined') {
191
192
  this.isLoading = false
192
193
  }
193
194
 
194
- Button.VERSION = '3.3.1'
195
+ Button.VERSION = '3.3.6'
195
196
 
196
197
  Button.DEFAULTS = {
197
198
  loadingText: 'loading...'
@@ -203,7 +204,7 @@ if (typeof jQuery === 'undefined') {
203
204
  var val = $el.is('input') ? 'val' : 'html'
204
205
  var data = $el.data()
205
206
 
206
- state = state + 'Text'
207
+ state += 'Text'
207
208
 
208
209
  if (data.resetText == null) $el.data('resetText', $el[val]())
209
210
 
@@ -228,15 +229,19 @@ if (typeof jQuery === 'undefined') {
228
229
  if ($parent.length) {
229
230
  var $input = this.$element.find('input')
230
231
  if ($input.prop('type') == 'radio') {
231
- if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
232
- else $parent.find('.active').removeClass('active')
232
+ if ($input.prop('checked')) changed = false
233
+ $parent.find('.active').removeClass('active')
234
+ this.$element.addClass('active')
235
+ } else if ($input.prop('type') == 'checkbox') {
236
+ if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
237
+ this.$element.toggleClass('active')
233
238
  }
234
- if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
239
+ $input.prop('checked', this.$element.hasClass('active'))
240
+ if (changed) $input.trigger('change')
235
241
  } else {
236
242
  this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
243
+ this.$element.toggleClass('active')
237
244
  }
238
-
239
- if (changed) this.$element.toggleClass('active')
240
245
  }
241
246
 
242
247
 
@@ -279,7 +284,7 @@ if (typeof jQuery === 'undefined') {
279
284
  var $btn = $(e.target)
280
285
  if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
281
286
  Plugin.call($btn, 'toggle')
282
- e.preventDefault()
287
+ if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
283
288
  })
284
289
  .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
285
290
  $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
@@ -288,10 +293,10 @@ if (typeof jQuery === 'undefined') {
288
293
  }(jQuery);
289
294
 
290
295
  /* ========================================================================
291
- * Bootstrap: carousel.js v3.3.1
296
+ * Bootstrap: carousel.js v3.3.6
292
297
  * http://getbootstrap.com/javascript/#carousel
293
298
  * ========================================================================
294
- * Copyright 2011-2014 Twitter, Inc.
299
+ * Copyright 2011-2015 Twitter, Inc.
295
300
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
296
301
  * ======================================================================== */
297
302
 
@@ -306,10 +311,10 @@ if (typeof jQuery === 'undefined') {
306
311
  this.$element = $(element)
307
312
  this.$indicators = this.$element.find('.carousel-indicators')
308
313
  this.options = options
309
- this.paused =
310
- this.sliding =
311
- this.interval =
312
- this.$active =
314
+ this.paused = null
315
+ this.sliding = null
316
+ this.interval = null
317
+ this.$active = null
313
318
  this.$items = null
314
319
 
315
320
  this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
@@ -319,7 +324,7 @@ if (typeof jQuery === 'undefined') {
319
324
  .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
320
325
  }
321
326
 
322
- Carousel.VERSION = '3.3.1'
327
+ Carousel.VERSION = '3.3.6'
323
328
 
324
329
  Carousel.TRANSITION_DURATION = 600
325
330
 
@@ -359,8 +364,11 @@ if (typeof jQuery === 'undefined') {
359
364
  }
360
365
 
361
366
  Carousel.prototype.getItemForDirection = function (direction, active) {
362
- var delta = direction == 'prev' ? -1 : 1
363
367
  var activeIndex = this.getItemIndex(active)
368
+ var willWrap = (direction == 'prev' && activeIndex === 0)
369
+ || (direction == 'next' && activeIndex == (this.$items.length - 1))
370
+ if (willWrap && !this.options.wrap) return active
371
+ var delta = direction == 'prev' ? -1 : 1
364
372
  var itemIndex = (activeIndex + delta) % this.$items.length
365
373
  return this.$items.eq(itemIndex)
366
374
  }
@@ -405,14 +413,8 @@ if (typeof jQuery === 'undefined') {
405
413
  var $next = next || this.getItemForDirection(type, $active)
406
414
  var isCycling = this.interval
407
415
  var direction = type == 'next' ? 'left' : 'right'
408
- var fallback = type == 'next' ? 'first' : 'last'
409
416
  var that = this
410
417
 
411
- if (!$next.length) {
412
- if (!this.options.wrap) return
413
- $next = this.$element.find('.item')[fallback]()
414
- }
415
-
416
418
  if ($next.hasClass('active')) return (this.sliding = false)
417
419
 
418
420
  var relatedTarget = $next[0]
@@ -529,10 +531,10 @@ if (typeof jQuery === 'undefined') {
529
531
  }(jQuery);
530
532
 
531
533
  /* ========================================================================
532
- * Bootstrap: collapse.js v3.3.1
534
+ * Bootstrap: collapse.js v3.3.6
533
535
  * http://getbootstrap.com/javascript/#collapse
534
536
  * ========================================================================
535
- * Copyright 2011-2014 Twitter, Inc.
537
+ * Copyright 2011-2015 Twitter, Inc.
536
538
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
537
539
  * ======================================================================== */
538
540
 
@@ -546,7 +548,8 @@ if (typeof jQuery === 'undefined') {
546
548
  var Collapse = function (element, options) {
547
549
  this.$element = $(element)
548
550
  this.options = $.extend({}, Collapse.DEFAULTS, options)
549
- this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
551
+ this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
552
+ '[data-toggle="collapse"][data-target="#' + element.id + '"]')
550
553
  this.transitioning = null
551
554
 
552
555
  if (this.options.parent) {
@@ -558,13 +561,12 @@ if (typeof jQuery === 'undefined') {
558
561
  if (this.options.toggle) this.toggle()
559
562
  }
560
563
 
561
- Collapse.VERSION = '3.3.1'
564
+ Collapse.VERSION = '3.3.6'
562
565
 
563
566
  Collapse.TRANSITION_DURATION = 350
564
567
 
565
568
  Collapse.DEFAULTS = {
566
- toggle: true,
567
- trigger: '[data-toggle="collapse"]'
569
+ toggle: true
568
570
  }
569
571
 
570
572
  Collapse.prototype.dimension = function () {
@@ -576,7 +578,7 @@ if (typeof jQuery === 'undefined') {
576
578
  if (this.transitioning || this.$element.hasClass('in')) return
577
579
 
578
580
  var activesData
579
- var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing')
581
+ var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
580
582
 
581
583
  if (actives && actives.length) {
582
584
  activesData = actives.data('bs.collapse')
@@ -702,7 +704,7 @@ if (typeof jQuery === 'undefined') {
702
704
  var data = $this.data('bs.collapse')
703
705
  var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
704
706
 
705
- if (!data && options.toggle && option == 'show') options.toggle = false
707
+ if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
706
708
  if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
707
709
  if (typeof option == 'string') data[option]()
708
710
  })
@@ -733,7 +735,7 @@ if (typeof jQuery === 'undefined') {
733
735
 
734
736
  var $target = getTargetFromTrigger($this)
735
737
  var data = $target.data('bs.collapse')
736
- var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
738
+ var option = data ? 'toggle' : $this.data()
737
739
 
738
740
  Plugin.call($target, option)
739
741
  })
@@ -741,10 +743,10 @@ if (typeof jQuery === 'undefined') {
741
743
  }(jQuery);
742
744
 
743
745
  /* ========================================================================
744
- * Bootstrap: dropdown.js v3.3.1
746
+ * Bootstrap: dropdown.js v3.3.6
745
747
  * http://getbootstrap.com/javascript/#dropdowns
746
748
  * ========================================================================
747
- * Copyright 2011-2014 Twitter, Inc.
749
+ * Copyright 2011-2015 Twitter, Inc.
748
750
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
749
751
  * ======================================================================== */
750
752
 
@@ -761,7 +763,41 @@ if (typeof jQuery === 'undefined') {
761
763
  $(element).on('click.bs.dropdown', this.toggle)
762
764
  }
763
765
 
764
- Dropdown.VERSION = '3.3.1'
766
+ Dropdown.VERSION = '3.3.6'
767
+
768
+ function getParent($this) {
769
+ var selector = $this.attr('data-target')
770
+
771
+ if (!selector) {
772
+ selector = $this.attr('href')
773
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
774
+ }
775
+
776
+ var $parent = selector && $(selector)
777
+
778
+ return $parent && $parent.length ? $parent : $this.parent()
779
+ }
780
+
781
+ function clearMenus(e) {
782
+ if (e && e.which === 3) return
783
+ $(backdrop).remove()
784
+ $(toggle).each(function () {
785
+ var $this = $(this)
786
+ var $parent = getParent($this)
787
+ var relatedTarget = { relatedTarget: this }
788
+
789
+ if (!$parent.hasClass('open')) return
790
+
791
+ if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
792
+
793
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
794
+
795
+ if (e.isDefaultPrevented()) return
796
+
797
+ $this.attr('aria-expanded', 'false')
798
+ $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
799
+ })
800
+ }
765
801
 
766
802
  Dropdown.prototype.toggle = function (e) {
767
803
  var $this = $(this)
@@ -776,7 +812,10 @@ if (typeof jQuery === 'undefined') {
776
812
  if (!isActive) {
777
813
  if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
778
814
  // if mobile we use a backdrop because click events don't delegate
779
- $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
815
+ $(document.createElement('div'))
816
+ .addClass('dropdown-backdrop')
817
+ .insertAfter($(this))
818
+ .on('click', clearMenus)
780
819
  }
781
820
 
782
821
  var relatedTarget = { relatedTarget: this }
@@ -790,7 +829,7 @@ if (typeof jQuery === 'undefined') {
790
829
 
791
830
  $parent
792
831
  .toggleClass('open')
793
- .trigger('shown.bs.dropdown', relatedTarget)
832
+ .trigger($.Event('shown.bs.dropdown', relatedTarget))
794
833
  }
795
834
 
796
835
  return false
@@ -809,57 +848,25 @@ if (typeof jQuery === 'undefined') {
809
848
  var $parent = getParent($this)
810
849
  var isActive = $parent.hasClass('open')
811
850
 
812
- if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
851
+ if (!isActive && e.which != 27 || isActive && e.which == 27) {
813
852
  if (e.which == 27) $parent.find(toggle).trigger('focus')
814
853
  return $this.trigger('click')
815
854
  }
816
855
 
817
- var desc = ' li:not(.divider):visible a'
818
- var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
856
+ var desc = ' li:not(.disabled):visible a'
857
+ var $items = $parent.find('.dropdown-menu' + desc)
819
858
 
820
859
  if (!$items.length) return
821
860
 
822
861
  var index = $items.index(e.target)
823
862
 
824
- if (e.which == 38 && index > 0) index-- // up
825
- if (e.which == 40 && index < $items.length - 1) index++ // down
826
- if (!~index) index = 0
863
+ if (e.which == 38 && index > 0) index-- // up
864
+ if (e.which == 40 && index < $items.length - 1) index++ // down
865
+ if (!~index) index = 0
827
866
 
828
867
  $items.eq(index).trigger('focus')
829
868
  }
830
869
 
831
- function clearMenus(e) {
832
- if (e && e.which === 3) return
833
- $(backdrop).remove()
834
- $(toggle).each(function () {
835
- var $this = $(this)
836
- var $parent = getParent($this)
837
- var relatedTarget = { relatedTarget: this }
838
-
839
- if (!$parent.hasClass('open')) return
840
-
841
- $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
842
-
843
- if (e.isDefaultPrevented()) return
844
-
845
- $this.attr('aria-expanded', 'false')
846
- $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
847
- })
848
- }
849
-
850
- function getParent($this) {
851
- var selector = $this.attr('data-target')
852
-
853
- if (!selector) {
854
- selector = $this.attr('href')
855
- selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
856
- }
857
-
858
- var $parent = selector && $(selector)
859
-
860
- return $parent && $parent.length ? $parent : $this.parent()
861
- }
862
-
863
870
 
864
871
  // DROPDOWN PLUGIN DEFINITION
865
872
  // ==========================
@@ -897,16 +904,15 @@ if (typeof jQuery === 'undefined') {
897
904
  .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
898
905
  .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
899
906
  .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
900
- .on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
901
- .on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
907
+ .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
902
908
 
903
909
  }(jQuery);
904
910
 
905
911
  /* ========================================================================
906
- * Bootstrap: modal.js v3.3.1
912
+ * Bootstrap: modal.js v3.3.6
907
913
  * http://getbootstrap.com/javascript/#modals
908
914
  * ========================================================================
909
- * Copyright 2011-2014 Twitter, Inc.
915
+ * Copyright 2011-2015 Twitter, Inc.
910
916
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
911
917
  * ======================================================================== */
912
918
 
@@ -918,12 +924,15 @@ if (typeof jQuery === 'undefined') {
918
924
  // ======================
919
925
 
920
926
  var Modal = function (element, options) {
921
- this.options = options
922
- this.$body = $(document.body)
923
- this.$element = $(element)
924
- this.$backdrop =
925
- this.isShown = null
926
- this.scrollbarWidth = 0
927
+ this.options = options
928
+ this.$body = $(document.body)
929
+ this.$element = $(element)
930
+ this.$dialog = this.$element.find('.modal-dialog')
931
+ this.$backdrop = null
932
+ this.isShown = null
933
+ this.originalBodyPad = null
934
+ this.scrollbarWidth = 0
935
+ this.ignoreBackdropClick = false
927
936
 
928
937
  if (this.options.remote) {
929
938
  this.$element
@@ -934,7 +943,7 @@ if (typeof jQuery === 'undefined') {
934
943
  }
935
944
  }
936
945
 
937
- Modal.VERSION = '3.3.1'
946
+ Modal.VERSION = '3.3.6'
938
947
 
939
948
  Modal.TRANSITION_DURATION = 300
940
949
  Modal.BACKDROP_TRANSITION_DURATION = 150
@@ -968,6 +977,12 @@ if (typeof jQuery === 'undefined') {
968
977
 
969
978
  this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
970
979
 
980
+ this.$dialog.on('mousedown.dismiss.bs.modal', function () {
981
+ that.$element.one('mouseup.dismiss.bs.modal', function (e) {
982
+ if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
983
+ })
984
+ })
985
+
971
986
  this.backdrop(function () {
972
987
  var transition = $.support.transition && that.$element.hasClass('fade')
973
988
 
@@ -979,23 +994,20 @@ if (typeof jQuery === 'undefined') {
979
994
  .show()
980
995
  .scrollTop(0)
981
996
 
982
- if (that.options.backdrop) that.adjustBackdrop()
983
997
  that.adjustDialog()
984
998
 
985
999
  if (transition) {
986
1000
  that.$element[0].offsetWidth // force reflow
987
1001
  }
988
1002
 
989
- that.$element
990
- .addClass('in')
991
- .attr('aria-hidden', false)
1003
+ that.$element.addClass('in')
992
1004
 
993
1005
  that.enforceFocus()
994
1006
 
995
1007
  var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
996
1008
 
997
1009
  transition ?
998
- that.$element.find('.modal-dialog') // wait for modal to slide in
1010
+ that.$dialog // wait for modal to slide in
999
1011
  .one('bsTransitionEnd', function () {
1000
1012
  that.$element.trigger('focus').trigger(e)
1001
1013
  })
@@ -1022,8 +1034,10 @@ if (typeof jQuery === 'undefined') {
1022
1034
 
1023
1035
  this.$element
1024
1036
  .removeClass('in')
1025
- .attr('aria-hidden', true)
1026
1037
  .off('click.dismiss.bs.modal')
1038
+ .off('mouseup.dismiss.bs.modal')
1039
+
1040
+ this.$dialog.off('mousedown.dismiss.bs.modal')
1027
1041
 
1028
1042
  $.support.transition && this.$element.hasClass('fade') ?
1029
1043
  this.$element
@@ -1083,14 +1097,20 @@ if (typeof jQuery === 'undefined') {
1083
1097
  if (this.isShown && this.options.backdrop) {
1084
1098
  var doAnimate = $.support.transition && animate
1085
1099
 
1086
- this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
1087
- .prependTo(this.$element)
1088
- .on('click.dismiss.bs.modal', $.proxy(function (e) {
1089
- if (e.target !== e.currentTarget) return
1090
- this.options.backdrop == 'static'
1091
- ? this.$element[0].focus.call(this.$element[0])
1092
- : this.hide.call(this)
1093
- }, this))
1100
+ this.$backdrop = $(document.createElement('div'))
1101
+ .addClass('modal-backdrop ' + animate)
1102
+ .appendTo(this.$body)
1103
+
1104
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
1105
+ if (this.ignoreBackdropClick) {
1106
+ this.ignoreBackdropClick = false
1107
+ return
1108
+ }
1109
+ if (e.target !== e.currentTarget) return
1110
+ this.options.backdrop == 'static'
1111
+ ? this.$element[0].focus()
1112
+ : this.hide()
1113
+ }, this))
1094
1114
 
1095
1115
  if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1096
1116
 
@@ -1125,16 +1145,9 @@ if (typeof jQuery === 'undefined') {
1125
1145
  // these following methods are used to handle overflowing modals
1126
1146
 
1127
1147
  Modal.prototype.handleUpdate = function () {
1128
- if (this.options.backdrop) this.adjustBackdrop()
1129
1148
  this.adjustDialog()
1130
1149
  }
1131
1150
 
1132
- Modal.prototype.adjustBackdrop = function () {
1133
- this.$backdrop
1134
- .css('height', 0)
1135
- .css('height', this.$element[0].scrollHeight)
1136
- }
1137
-
1138
1151
  Modal.prototype.adjustDialog = function () {
1139
1152
  var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
1140
1153
 
@@ -1152,17 +1165,23 @@ if (typeof jQuery === 'undefined') {
1152
1165
  }
1153
1166
 
1154
1167
  Modal.prototype.checkScrollbar = function () {
1155
- this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
1168
+ var fullWindowWidth = window.innerWidth
1169
+ if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
1170
+ var documentElementRect = document.documentElement.getBoundingClientRect()
1171
+ fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
1172
+ }
1173
+ this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
1156
1174
  this.scrollbarWidth = this.measureScrollbar()
1157
1175
  }
1158
1176
 
1159
1177
  Modal.prototype.setScrollbar = function () {
1160
1178
  var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
1179
+ this.originalBodyPad = document.body.style.paddingRight || ''
1161
1180
  if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1162
1181
  }
1163
1182
 
1164
1183
  Modal.prototype.resetScrollbar = function () {
1165
- this.$body.css('padding-right', '')
1184
+ this.$body.css('padding-right', this.originalBodyPad)
1166
1185
  }
1167
1186
 
1168
1187
  Modal.prototype.measureScrollbar = function () { // thx walsh
@@ -1228,11 +1247,11 @@ if (typeof jQuery === 'undefined') {
1228
1247
  }(jQuery);
1229
1248
 
1230
1249
  /* ========================================================================
1231
- * Bootstrap: tooltip.js v3.3.1
1250
+ * Bootstrap: tooltip.js v3.3.6
1232
1251
  * http://getbootstrap.com/javascript/#tooltip
1233
1252
  * Inspired by the original jQuery.tipsy by Jason Frame
1234
1253
  * ========================================================================
1235
- * Copyright 2011-2014 Twitter, Inc.
1254
+ * Copyright 2011-2015 Twitter, Inc.
1236
1255
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1237
1256
  * ======================================================================== */
1238
1257
 
@@ -1244,17 +1263,18 @@ if (typeof jQuery === 'undefined') {
1244
1263
  // ===============================
1245
1264
 
1246
1265
  var Tooltip = function (element, options) {
1247
- this.type =
1248
- this.options =
1249
- this.enabled =
1250
- this.timeout =
1251
- this.hoverState =
1266
+ this.type = null
1267
+ this.options = null
1268
+ this.enabled = null
1269
+ this.timeout = null
1270
+ this.hoverState = null
1252
1271
  this.$element = null
1272
+ this.inState = null
1253
1273
 
1254
1274
  this.init('tooltip', element, options)
1255
1275
  }
1256
1276
 
1257
- Tooltip.VERSION = '3.3.1'
1277
+ Tooltip.VERSION = '3.3.6'
1258
1278
 
1259
1279
  Tooltip.TRANSITION_DURATION = 150
1260
1280
 
@@ -1279,7 +1299,12 @@ if (typeof jQuery === 'undefined') {
1279
1299
  this.type = type
1280
1300
  this.$element = $(element)
1281
1301
  this.options = this.getOptions(options)
1282
- this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
1302
+ this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
1303
+ this.inState = { click: false, hover: false, focus: false }
1304
+
1305
+ if (this.$element[0] instanceof document.constructor && !this.options.selector) {
1306
+ throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
1307
+ }
1283
1308
 
1284
1309
  var triggers = this.options.trigger.split(' ')
1285
1310
 
@@ -1334,16 +1359,20 @@ if (typeof jQuery === 'undefined') {
1334
1359
  var self = obj instanceof this.constructor ?
1335
1360
  obj : $(obj.currentTarget).data('bs.' + this.type)
1336
1361
 
1337
- if (self && self.$tip && self.$tip.is(':visible')) {
1338
- self.hoverState = 'in'
1339
- return
1340
- }
1341
-
1342
1362
  if (!self) {
1343
1363
  self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1344
1364
  $(obj.currentTarget).data('bs.' + this.type, self)
1345
1365
  }
1346
1366
 
1367
+ if (obj instanceof $.Event) {
1368
+ self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
1369
+ }
1370
+
1371
+ if (self.tip().hasClass('in') || self.hoverState == 'in') {
1372
+ self.hoverState = 'in'
1373
+ return
1374
+ }
1375
+
1347
1376
  clearTimeout(self.timeout)
1348
1377
 
1349
1378
  self.hoverState = 'in'
@@ -1355,6 +1384,14 @@ if (typeof jQuery === 'undefined') {
1355
1384
  }, self.options.delay.show)
1356
1385
  }
1357
1386
 
1387
+ Tooltip.prototype.isInStateTrue = function () {
1388
+ for (var key in this.inState) {
1389
+ if (this.inState[key]) return true
1390
+ }
1391
+
1392
+ return false
1393
+ }
1394
+
1358
1395
  Tooltip.prototype.leave = function (obj) {
1359
1396
  var self = obj instanceof this.constructor ?
1360
1397
  obj : $(obj.currentTarget).data('bs.' + this.type)
@@ -1364,6 +1401,12 @@ if (typeof jQuery === 'undefined') {
1364
1401
  $(obj.currentTarget).data('bs.' + this.type, self)
1365
1402
  }
1366
1403
 
1404
+ if (obj instanceof $.Event) {
1405
+ self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
1406
+ }
1407
+
1408
+ if (self.isInStateTrue()) return
1409
+
1367
1410
  clearTimeout(self.timeout)
1368
1411
 
1369
1412
  self.hoverState = 'out'
@@ -1410,6 +1453,7 @@ if (typeof jQuery === 'undefined') {
1410
1453
  .data('bs.' + this.type, this)
1411
1454
 
1412
1455
  this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
1456
+ this.$element.trigger('inserted.bs.' + this.type)
1413
1457
 
1414
1458
  var pos = this.getPosition()
1415
1459
  var actualWidth = $tip[0].offsetWidth
@@ -1417,13 +1461,12 @@ if (typeof jQuery === 'undefined') {
1417
1461
 
1418
1462
  if (autoPlace) {
1419
1463
  var orgPlacement = placement
1420
- var $container = this.options.container ? $(this.options.container) : this.$element.parent()
1421
- var containerDim = this.getPosition($container)
1464
+ var viewportDim = this.getPosition(this.$viewport)
1422
1465
 
1423
- placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
1424
- placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
1425
- placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
1426
- placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
1466
+ placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
1467
+ placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
1468
+ placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
1469
+ placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
1427
1470
  placement
1428
1471
 
1429
1472
  $tip
@@ -1464,8 +1507,8 @@ if (typeof jQuery === 'undefined') {
1464
1507
  if (isNaN(marginTop)) marginTop = 0
1465
1508
  if (isNaN(marginLeft)) marginLeft = 0
1466
1509
 
1467
- offset.top = offset.top + marginTop
1468
- offset.left = offset.left + marginLeft
1510
+ offset.top += marginTop
1511
+ offset.left += marginLeft
1469
1512
 
1470
1513
  // $.fn.offset doesn't round pixel values
1471
1514
  // so we use setOffset directly with our own function B-0
@@ -1501,10 +1544,10 @@ if (typeof jQuery === 'undefined') {
1501
1544
  this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
1502
1545
  }
1503
1546
 
1504
- Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
1547
+ Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
1505
1548
  this.arrow()
1506
- .css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
1507
- .css(isHorizontal ? 'top' : 'left', '')
1549
+ .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
1550
+ .css(isVertical ? 'top' : 'left', '')
1508
1551
  }
1509
1552
 
1510
1553
  Tooltip.prototype.setContent = function () {
@@ -1517,7 +1560,7 @@ if (typeof jQuery === 'undefined') {
1517
1560
 
1518
1561
  Tooltip.prototype.hide = function (callback) {
1519
1562
  var that = this
1520
- var $tip = this.tip()
1563
+ var $tip = $(this.$tip)
1521
1564
  var e = $.Event('hide.bs.' + this.type)
1522
1565
 
1523
1566
  function complete() {
@@ -1534,7 +1577,7 @@ if (typeof jQuery === 'undefined') {
1534
1577
 
1535
1578
  $tip.removeClass('in')
1536
1579
 
1537
- $.support.transition && this.$tip.hasClass('fade') ?
1580
+ $.support.transition && $tip.hasClass('fade') ?
1538
1581
  $tip
1539
1582
  .one('bsTransitionEnd', complete)
1540
1583
  .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
@@ -1547,7 +1590,7 @@ if (typeof jQuery === 'undefined') {
1547
1590
 
1548
1591
  Tooltip.prototype.fixTitle = function () {
1549
1592
  var $e = this.$element
1550
- if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
1593
+ if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
1551
1594
  $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1552
1595
  }
1553
1596
  }
@@ -1575,10 +1618,10 @@ if (typeof jQuery === 'undefined') {
1575
1618
  }
1576
1619
 
1577
1620
  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1578
- return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1579
- placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1621
+ return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1622
+ placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1580
1623
  placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1581
- /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
1624
+ /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
1582
1625
 
1583
1626
  }
1584
1627
 
@@ -1602,7 +1645,7 @@ if (typeof jQuery === 'undefined') {
1602
1645
  var rightEdgeOffset = pos.left + viewportPadding + actualWidth
1603
1646
  if (leftEdgeOffset < viewportDimensions.left) { // left overflow
1604
1647
  delta.left = viewportDimensions.left - leftEdgeOffset
1605
- } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
1648
+ } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
1606
1649
  delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
1607
1650
  }
1608
1651
  }
@@ -1628,7 +1671,13 @@ if (typeof jQuery === 'undefined') {
1628
1671
  }
1629
1672
 
1630
1673
  Tooltip.prototype.tip = function () {
1631
- return (this.$tip = this.$tip || $(this.options.template))
1674
+ if (!this.$tip) {
1675
+ this.$tip = $(this.options.template)
1676
+ if (this.$tip.length != 1) {
1677
+ throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
1678
+ }
1679
+ }
1680
+ return this.$tip
1632
1681
  }
1633
1682
 
1634
1683
  Tooltip.prototype.arrow = function () {
@@ -1657,7 +1706,13 @@ if (typeof jQuery === 'undefined') {
1657
1706
  }
1658
1707
  }
1659
1708
 
1660
- self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1709
+ if (e) {
1710
+ self.inState.click = !self.inState.click
1711
+ if (self.isInStateTrue()) self.enter(self)
1712
+ else self.leave(self)
1713
+ } else {
1714
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1715
+ }
1661
1716
  }
1662
1717
 
1663
1718
  Tooltip.prototype.destroy = function () {
@@ -1665,6 +1720,12 @@ if (typeof jQuery === 'undefined') {
1665
1720
  clearTimeout(this.timeout)
1666
1721
  this.hide(function () {
1667
1722
  that.$element.off('.' + that.type).removeData('bs.' + that.type)
1723
+ if (that.$tip) {
1724
+ that.$tip.detach()
1725
+ }
1726
+ that.$tip = null
1727
+ that.$arrow = null
1728
+ that.$viewport = null
1668
1729
  })
1669
1730
  }
1670
1731
 
@@ -1674,18 +1735,12 @@ if (typeof jQuery === 'undefined') {
1674
1735
 
1675
1736
  function Plugin(option) {
1676
1737
  return this.each(function () {
1677
- var $this = $(this)
1678
- var data = $this.data('bs.tooltip')
1679
- var options = typeof option == 'object' && option
1680
- var selector = options && options.selector
1681
-
1682
- if (!data && option == 'destroy') return
1683
- if (selector) {
1684
- if (!data) $this.data('bs.tooltip', (data = {}))
1685
- if (!data[selector]) data[selector] = new Tooltip(this, options)
1686
- } else {
1687
- if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1688
- }
1738
+ var $this = $(this)
1739
+ var data = $this.data('bs.tooltip')
1740
+ var options = typeof option == 'object' && option
1741
+
1742
+ if (!data && /destroy|hide/.test(option)) return
1743
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1689
1744
  if (typeof option == 'string') data[option]()
1690
1745
  })
1691
1746
  }
@@ -1707,10 +1762,10 @@ if (typeof jQuery === 'undefined') {
1707
1762
  }(jQuery);
1708
1763
 
1709
1764
  /* ========================================================================
1710
- * Bootstrap: popover.js v3.3.1
1765
+ * Bootstrap: popover.js v3.3.6
1711
1766
  * http://getbootstrap.com/javascript/#popovers
1712
1767
  * ========================================================================
1713
- * Copyright 2011-2014 Twitter, Inc.
1768
+ * Copyright 2011-2015 Twitter, Inc.
1714
1769
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1715
1770
  * ======================================================================== */
1716
1771
 
@@ -1727,7 +1782,7 @@ if (typeof jQuery === 'undefined') {
1727
1782
 
1728
1783
  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1729
1784
 
1730
- Popover.VERSION = '3.3.1'
1785
+ Popover.VERSION = '3.3.6'
1731
1786
 
1732
1787
  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
1733
1788
  placement: 'right',
@@ -1783,29 +1838,18 @@ if (typeof jQuery === 'undefined') {
1783
1838
  return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
1784
1839
  }
1785
1840
 
1786
- Popover.prototype.tip = function () {
1787
- if (!this.$tip) this.$tip = $(this.options.template)
1788
- return this.$tip
1789
- }
1790
-
1791
1841
 
1792
1842
  // POPOVER PLUGIN DEFINITION
1793
1843
  // =========================
1794
1844
 
1795
1845
  function Plugin(option) {
1796
1846
  return this.each(function () {
1797
- var $this = $(this)
1798
- var data = $this.data('bs.popover')
1799
- var options = typeof option == 'object' && option
1800
- var selector = options && options.selector
1801
-
1802
- if (!data && option == 'destroy') return
1803
- if (selector) {
1804
- if (!data) $this.data('bs.popover', (data = {}))
1805
- if (!data[selector]) data[selector] = new Popover(this, options)
1806
- } else {
1807
- if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1808
- }
1847
+ var $this = $(this)
1848
+ var data = $this.data('bs.popover')
1849
+ var options = typeof option == 'object' && option
1850
+
1851
+ if (!data && /destroy|hide/.test(option)) return
1852
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1809
1853
  if (typeof option == 'string') data[option]()
1810
1854
  })
1811
1855
  }
@@ -1827,10 +1871,10 @@ if (typeof jQuery === 'undefined') {
1827
1871
  }(jQuery);
1828
1872
 
1829
1873
  /* ========================================================================
1830
- * Bootstrap: scrollspy.js v3.3.1
1874
+ * Bootstrap: scrollspy.js v3.3.6
1831
1875
  * http://getbootstrap.com/javascript/#scrollspy
1832
1876
  * ========================================================================
1833
- * Copyright 2011-2014 Twitter, Inc.
1877
+ * Copyright 2011-2015 Twitter, Inc.
1834
1878
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1835
1879
  * ======================================================================== */
1836
1880
 
@@ -1842,10 +1886,8 @@ if (typeof jQuery === 'undefined') {
1842
1886
  // ==========================
1843
1887
 
1844
1888
  function ScrollSpy(element, options) {
1845
- var process = $.proxy(this.process, this)
1846
-
1847
- this.$body = $('body')
1848
- this.$scrollElement = $(element).is('body') ? $(window) : $(element)
1889
+ this.$body = $(document.body)
1890
+ this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
1849
1891
  this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
1850
1892
  this.selector = (this.options.target || '') + ' .nav li > a'
1851
1893
  this.offsets = []
@@ -1853,12 +1895,12 @@ if (typeof jQuery === 'undefined') {
1853
1895
  this.activeTarget = null
1854
1896
  this.scrollHeight = 0
1855
1897
 
1856
- this.$scrollElement.on('scroll.bs.scrollspy', process)
1898
+ this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
1857
1899
  this.refresh()
1858
1900
  this.process()
1859
1901
  }
1860
1902
 
1861
- ScrollSpy.VERSION = '3.3.1'
1903
+ ScrollSpy.VERSION = '3.3.6'
1862
1904
 
1863
1905
  ScrollSpy.DEFAULTS = {
1864
1906
  offset: 10
@@ -1869,20 +1911,19 @@ if (typeof jQuery === 'undefined') {
1869
1911
  }
1870
1912
 
1871
1913
  ScrollSpy.prototype.refresh = function () {
1872
- var offsetMethod = 'offset'
1873
- var offsetBase = 0
1914
+ var that = this
1915
+ var offsetMethod = 'offset'
1916
+ var offsetBase = 0
1917
+
1918
+ this.offsets = []
1919
+ this.targets = []
1920
+ this.scrollHeight = this.getScrollHeight()
1874
1921
 
1875
1922
  if (!$.isWindow(this.$scrollElement[0])) {
1876
1923
  offsetMethod = 'position'
1877
1924
  offsetBase = this.$scrollElement.scrollTop()
1878
1925
  }
1879
1926
 
1880
- this.offsets = []
1881
- this.targets = []
1882
- this.scrollHeight = this.getScrollHeight()
1883
-
1884
- var self = this
1885
-
1886
1927
  this.$body
1887
1928
  .find(this.selector)
1888
1929
  .map(function () {
@@ -1897,8 +1938,8 @@ if (typeof jQuery === 'undefined') {
1897
1938
  })
1898
1939
  .sort(function (a, b) { return a[0] - b[0] })
1899
1940
  .each(function () {
1900
- self.offsets.push(this[0])
1901
- self.targets.push(this[1])
1941
+ that.offsets.push(this[0])
1942
+ that.targets.push(this[1])
1902
1943
  })
1903
1944
  }
1904
1945
 
@@ -1927,7 +1968,7 @@ if (typeof jQuery === 'undefined') {
1927
1968
  for (i = offsets.length; i--;) {
1928
1969
  activeTarget != targets[i]
1929
1970
  && scrollTop >= offsets[i]
1930
- && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
1971
+ && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
1931
1972
  && this.activate(targets[i])
1932
1973
  }
1933
1974
  }
@@ -1938,8 +1979,8 @@ if (typeof jQuery === 'undefined') {
1938
1979
  this.clear()
1939
1980
 
1940
1981
  var selector = this.selector +
1941
- '[data-target="' + target + '"],' +
1942
- this.selector + '[href="' + target + '"]'
1982
+ '[data-target="' + target + '"],' +
1983
+ this.selector + '[href="' + target + '"]'
1943
1984
 
1944
1985
  var active = $(selector)
1945
1986
  .parents('li')
@@ -2003,10 +2044,10 @@ if (typeof jQuery === 'undefined') {
2003
2044
  }(jQuery);
2004
2045
 
2005
2046
  /* ========================================================================
2006
- * Bootstrap: tab.js v3.3.1
2047
+ * Bootstrap: tab.js v3.3.6
2007
2048
  * http://getbootstrap.com/javascript/#tabs
2008
2049
  * ========================================================================
2009
- * Copyright 2011-2014 Twitter, Inc.
2050
+ * Copyright 2011-2015 Twitter, Inc.
2010
2051
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2011
2052
  * ======================================================================== */
2012
2053
 
@@ -2018,10 +2059,12 @@ if (typeof jQuery === 'undefined') {
2018
2059
  // ====================
2019
2060
 
2020
2061
  var Tab = function (element) {
2062
+ // jscs:disable requireDollarBeforejQueryAssignment
2021
2063
  this.element = $(element)
2064
+ // jscs:enable requireDollarBeforejQueryAssignment
2022
2065
  }
2023
2066
 
2024
- Tab.VERSION = '3.3.1'
2067
+ Tab.VERSION = '3.3.6'
2025
2068
 
2026
2069
  Tab.TRANSITION_DURATION = 150
2027
2070
 
@@ -2069,7 +2112,7 @@ if (typeof jQuery === 'undefined') {
2069
2112
  var $active = container.find('> .active')
2070
2113
  var transition = callback
2071
2114
  && $.support.transition
2072
- && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
2115
+ && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
2073
2116
 
2074
2117
  function next() {
2075
2118
  $active
@@ -2092,7 +2135,7 @@ if (typeof jQuery === 'undefined') {
2092
2135
  element.removeClass('fade')
2093
2136
  }
2094
2137
 
2095
- if (element.parent('.dropdown-menu')) {
2138
+ if (element.parent('.dropdown-menu').length) {
2096
2139
  element
2097
2140
  .closest('li.dropdown')
2098
2141
  .addClass('active')
@@ -2157,10 +2200,10 @@ if (typeof jQuery === 'undefined') {
2157
2200
  }(jQuery);
2158
2201
 
2159
2202
  /* ========================================================================
2160
- * Bootstrap: affix.js v3.3.1
2203
+ * Bootstrap: affix.js v3.3.6
2161
2204
  * http://getbootstrap.com/javascript/#affix
2162
2205
  * ========================================================================
2163
- * Copyright 2011-2014 Twitter, Inc.
2206
+ * Copyright 2011-2015 Twitter, Inc.
2164
2207
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2165
2208
  * ======================================================================== */
2166
2209
 
@@ -2179,14 +2222,14 @@ if (typeof jQuery === 'undefined') {
2179
2222
  .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
2180
2223
 
2181
2224
  this.$element = $(element)
2182
- this.affixed =
2183
- this.unpin =
2225
+ this.affixed = null
2226
+ this.unpin = null
2184
2227
  this.pinnedOffset = null
2185
2228
 
2186
2229
  this.checkPosition()
2187
2230
  }
2188
2231
 
2189
- Affix.VERSION = '3.3.1'
2232
+ Affix.VERSION = '3.3.6'
2190
2233
 
2191
2234
  Affix.RESET = 'affix affix-top affix-bottom'
2192
2235
 
@@ -2211,7 +2254,7 @@ if (typeof jQuery === 'undefined') {
2211
2254
  var colliderTop = initializing ? scrollTop : position.top
2212
2255
  var colliderHeight = initializing ? targetHeight : height
2213
2256
 
2214
- if (offsetTop != null && colliderTop <= offsetTop) return 'top'
2257
+ if (offsetTop != null && scrollTop <= offsetTop) return 'top'
2215
2258
  if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
2216
2259
 
2217
2260
  return false
@@ -2236,7 +2279,7 @@ if (typeof jQuery === 'undefined') {
2236
2279
  var offset = this.options.offset
2237
2280
  var offsetTop = offset.top
2238
2281
  var offsetBottom = offset.bottom
2239
- var scrollHeight = $('body').height()
2282
+ var scrollHeight = Math.max($(document).height(), $(document.body).height())
2240
2283
 
2241
2284
  if (typeof offset != 'object') offsetBottom = offsetTop = offset
2242
2285
  if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)