weaver 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/data/weaver/css/bootstrap.css +647 -205
  3. data/data/weaver/css/bootstrap.css.map +1 -0
  4. data/data/weaver/css/bootstrap.min.css +3 -3
  5. data/data/weaver/css/crossfade_style.css +19 -0
  6. data/data/weaver/css/patterns/1.png +0 -0
  7. data/data/weaver/css/patterns/2.png +0 -0
  8. data/data/weaver/css/patterns/3.png +0 -0
  9. data/data/weaver/css/patterns/4.png +0 -0
  10. data/data/weaver/css/patterns/5.png +0 -0
  11. data/data/weaver/css/patterns/6.png +0 -0
  12. data/data/weaver/css/patterns/7.png +0 -0
  13. data/data/weaver/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css +251 -0
  14. data/data/weaver/css/plugins/chartist/chartist.min.css +773 -0
  15. data/data/weaver/css/plugins/clockpicker/clockpicker.css +168 -0
  16. data/data/weaver/css/plugins/dataTables/dataTables.bootstrap.css +118 -190
  17. data/data/weaver/css/plugins/dataTables/dataTables.tableTools.min.css +1 -1
  18. data/data/weaver/css/plugins/daterangepicker/daterangepicker-bs3.css +335 -0
  19. data/data/weaver/css/plugins/footable/fonts/footable.eot +0 -0
  20. data/data/weaver/css/plugins/footable/fonts/footable.svg +78 -0
  21. data/data/weaver/css/plugins/footable/fonts/footable.ttf +0 -0
  22. data/data/weaver/css/plugins/footable/fonts/footable.woff +0 -0
  23. data/data/weaver/css/plugins/footable/footable.core.css +178 -0
  24. data/data/weaver/css/plugins/select2/select2.min.css +1 -0
  25. data/data/weaver/css/plugins/slick/ajax-loader.gif +0 -0
  26. data/data/weaver/css/plugins/slick/fonts/slick.eot +0 -0
  27. data/data/weaver/css/plugins/slick/fonts/slick.svg +14 -0
  28. data/data/weaver/css/plugins/slick/fonts/slick.ttf +0 -0
  29. data/data/weaver/css/plugins/slick/fonts/slick.woff +0 -0
  30. data/data/weaver/css/plugins/slick/slick-theme.css +201 -0
  31. data/data/weaver/css/plugins/slick/slick.css +119 -0
  32. data/data/weaver/css/plugins/sweetalert/sweetalert.css +715 -0
  33. data/data/weaver/css/style.css +4352 -1310
  34. data/data/weaver/css/style.min.css +1 -1
  35. data/data/weaver/fonts/glyphicons-halflings-regular.eot +0 -0
  36. data/data/weaver/fonts/glyphicons-halflings-regular.svg +273 -214
  37. data/data/weaver/fonts/glyphicons-halflings-regular.ttf +0 -0
  38. data/data/weaver/fonts/glyphicons-halflings-regular.woff +0 -0
  39. data/data/weaver/fonts/glyphicons-halflings-regular.woff2 +0 -0
  40. data/data/weaver/js/bootstrap.js +299 -212
  41. data/data/weaver/js/bootstrap.min.js +5 -5
  42. data/data/weaver/js/inspinia.js +184 -42
  43. data/data/weaver/js/plugins/chartist/chartist.min.js +9 -0
  44. data/data/weaver/js/plugins/chartist/chartist.min.js.map +1 -0
  45. data/data/weaver/js/plugins/clockpicker/clockpicker.js +729 -0
  46. data/data/weaver/js/plugins/dataTables/dataTables.bootstrap.js +195 -234
  47. data/data/weaver/js/plugins/dataTables/dataTables.tableTools.min.js +46 -45
  48. data/data/weaver/js/plugins/dataTables/jquery.dataTables.js +628 -373
  49. data/data/weaver/js/plugins/dataTables/swf/copy_csv_xls.swf +0 -0
  50. data/data/weaver/js/plugins/dataTables/swf/copy_csv_xls_pdf.swf +0 -0
  51. data/data/weaver/js/plugins/daterangepicker/daterangepicker.js +1304 -0
  52. data/data/weaver/js/plugins/diff_match_patch/COPYING +177 -0
  53. data/data/weaver/js/plugins/diff_match_patch/README.txt +43 -0
  54. data/data/weaver/js/plugins/diff_match_patch/javascript/diff_match_patch.js +49 -0
  55. data/data/weaver/js/plugins/footable/footable.all.min.js +14 -0
  56. data/data/weaver/js/plugins/fullcalendar/moment.min.js +3 -3
  57. data/data/weaver/js/plugins/idle-timer/idle-timer.min.js +2 -0
  58. data/data/weaver/js/plugins/jvectormap/jquery-jvectormap-2.0.2.css +130 -0
  59. data/data/weaver/js/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js +3328 -0
  60. data/data/weaver/js/plugins/masonary/masonry.pkgd.min.js +9 -0
  61. data/data/weaver/js/plugins/metisMenu/jquery.metisMenu.js +3 -113
  62. data/data/weaver/js/plugins/morris/morris.js +27 -23
  63. data/data/weaver/js/plugins/pace/pace.min.js +2 -2
  64. data/data/weaver/js/plugins/preetyTextDiff/jquery.pretty-text-diff.min.js +76 -0
  65. data/data/weaver/js/plugins/select2/select2.full.min.js +3 -0
  66. data/data/weaver/js/plugins/slick/slick.min.js +18 -0
  67. data/data/weaver/js/plugins/slimscroll/jquery.slimscroll.js +96 -90
  68. data/data/weaver/js/plugins/slimscroll/jquery.slimscroll.min.js +10 -10
  69. data/data/weaver/js/plugins/sweetalert/sweetalert.min.js +1 -0
  70. data/data/weaver/js/plugins/tinycon/tinycon.min.js +8 -0
  71. data/data/weaver/js/plugins/wow/wow.min.js +2 -0
  72. data/{bin → exe}/weaver +3 -2
  73. data/lib/weaver.rb +236 -53
  74. data/lib/weaver/version.rb +1 -1
  75. data/weaver.gemspec +2 -2
  76. metadata +50 -7
  77. data/data/weaver/js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js +0 -8
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * Bootstrap v3.3.0 (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.5 (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,6 +9,7 @@ if (typeof jQuery === 'undefined') {
9
9
  }
10
10
 
11
11
  +function ($) {
12
+ 'use strict';
12
13
  var version = $.fn.jquery.split(' ')[0].split('.')
13
14
  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
14
15
  throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
@@ -16,10 +17,10 @@ if (typeof jQuery === 'undefined') {
16
17
  }(jQuery);
17
18
 
18
19
  /* ========================================================================
19
- * Bootstrap: transition.js v3.3.0
20
+ * Bootstrap: transition.js v3.3.5
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.0
80
+ * Bootstrap: alert.js v3.3.5
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.0'
99
+ Alert.VERSION = '3.3.5'
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.0
175
+ * Bootstrap: button.js v3.3.5
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.0'
195
+ Button.VERSION = '3.3.5'
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,19 +284,19 @@ 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
- $(e.target).closest('.btn').toggleClass('focus', e.type == 'focus')
290
+ $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
286
291
  })
287
292
 
288
293
  }(jQuery);
289
294
 
290
295
  /* ========================================================================
291
- * Bootstrap: carousel.js v3.3.0
296
+ * Bootstrap: carousel.js v3.3.5
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.0'
327
+ Carousel.VERSION = '3.3.5'
323
328
 
324
329
  Carousel.TRANSITION_DURATION = 600
325
330
 
@@ -331,6 +336,7 @@ if (typeof jQuery === 'undefined') {
331
336
  }
332
337
 
333
338
  Carousel.prototype.keydown = function (e) {
339
+ if (/input|textarea/i.test(e.target.tagName)) return
334
340
  switch (e.which) {
335
341
  case 37: this.prev(); break
336
342
  case 39: this.next(); break
@@ -358,8 +364,11 @@ if (typeof jQuery === 'undefined') {
358
364
  }
359
365
 
360
366
  Carousel.prototype.getItemForDirection = function (direction, active) {
361
- var delta = direction == 'prev' ? -1 : 1
362
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
363
372
  var itemIndex = (activeIndex + delta) % this.$items.length
364
373
  return this.$items.eq(itemIndex)
365
374
  }
@@ -404,14 +413,8 @@ if (typeof jQuery === 'undefined') {
404
413
  var $next = next || this.getItemForDirection(type, $active)
405
414
  var isCycling = this.interval
406
415
  var direction = type == 'next' ? 'left' : 'right'
407
- var fallback = type == 'next' ? 'first' : 'last'
408
416
  var that = this
409
417
 
410
- if (!$next.length) {
411
- if (!this.options.wrap) return
412
- $next = this.$element.find('.item')[fallback]()
413
- }
414
-
415
418
  if ($next.hasClass('active')) return (this.sliding = false)
416
419
 
417
420
  var relatedTarget = $next[0]
@@ -528,10 +531,10 @@ if (typeof jQuery === 'undefined') {
528
531
  }(jQuery);
529
532
 
530
533
  /* ========================================================================
531
- * Bootstrap: collapse.js v3.3.0
534
+ * Bootstrap: collapse.js v3.3.5
532
535
  * http://getbootstrap.com/javascript/#collapse
533
536
  * ========================================================================
534
- * Copyright 2011-2014 Twitter, Inc.
537
+ * Copyright 2011-2015 Twitter, Inc.
535
538
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
536
539
  * ======================================================================== */
537
540
 
@@ -545,7 +548,8 @@ if (typeof jQuery === 'undefined') {
545
548
  var Collapse = function (element, options) {
546
549
  this.$element = $(element)
547
550
  this.options = $.extend({}, Collapse.DEFAULTS, options)
548
- 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 + '"]')
549
553
  this.transitioning = null
550
554
 
551
555
  if (this.options.parent) {
@@ -557,13 +561,12 @@ if (typeof jQuery === 'undefined') {
557
561
  if (this.options.toggle) this.toggle()
558
562
  }
559
563
 
560
- Collapse.VERSION = '3.3.0'
564
+ Collapse.VERSION = '3.3.5'
561
565
 
562
566
  Collapse.TRANSITION_DURATION = 350
563
567
 
564
568
  Collapse.DEFAULTS = {
565
- toggle: true,
566
- trigger: '[data-toggle="collapse"]'
569
+ toggle: true
567
570
  }
568
571
 
569
572
  Collapse.prototype.dimension = function () {
@@ -575,7 +578,7 @@ if (typeof jQuery === 'undefined') {
575
578
  if (this.transitioning || this.$element.hasClass('in')) return
576
579
 
577
580
  var activesData
578
- var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing')
581
+ var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
579
582
 
580
583
  if (actives && actives.length) {
581
584
  activesData = actives.data('bs.collapse')
@@ -701,7 +704,7 @@ if (typeof jQuery === 'undefined') {
701
704
  var data = $this.data('bs.collapse')
702
705
  var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
703
706
 
704
- if (!data && options.toggle && option == 'show') options.toggle = false
707
+ if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
705
708
  if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
706
709
  if (typeof option == 'string') data[option]()
707
710
  })
@@ -732,7 +735,7 @@ if (typeof jQuery === 'undefined') {
732
735
 
733
736
  var $target = getTargetFromTrigger($this)
734
737
  var data = $target.data('bs.collapse')
735
- var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
738
+ var option = data ? 'toggle' : $this.data()
736
739
 
737
740
  Plugin.call($target, option)
738
741
  })
@@ -740,10 +743,10 @@ if (typeof jQuery === 'undefined') {
740
743
  }(jQuery);
741
744
 
742
745
  /* ========================================================================
743
- * Bootstrap: dropdown.js v3.3.0
746
+ * Bootstrap: dropdown.js v3.3.5
744
747
  * http://getbootstrap.com/javascript/#dropdowns
745
748
  * ========================================================================
746
- * Copyright 2011-2014 Twitter, Inc.
749
+ * Copyright 2011-2015 Twitter, Inc.
747
750
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
748
751
  * ======================================================================== */
749
752
 
@@ -760,7 +763,41 @@ if (typeof jQuery === 'undefined') {
760
763
  $(element).on('click.bs.dropdown', this.toggle)
761
764
  }
762
765
 
763
- Dropdown.VERSION = '3.3.0'
766
+ Dropdown.VERSION = '3.3.5'
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('hidden.bs.dropdown', relatedTarget)
799
+ })
800
+ }
764
801
 
765
802
  Dropdown.prototype.toggle = function (e) {
766
803
  var $this = $(this)
@@ -775,7 +812,10 @@ if (typeof jQuery === 'undefined') {
775
812
  if (!isActive) {
776
813
  if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
777
814
  // if mobile we use a backdrop because click events don't delegate
778
- $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
815
+ $(document.createElement('div'))
816
+ .addClass('dropdown-backdrop')
817
+ .insertAfter($(this))
818
+ .on('click', clearMenus)
779
819
  }
780
820
 
781
821
  var relatedTarget = { relatedTarget: this }
@@ -796,7 +836,7 @@ if (typeof jQuery === 'undefined') {
796
836
  }
797
837
 
798
838
  Dropdown.prototype.keydown = function (e) {
799
- if (!/(38|40|27|32)/.test(e.which)) return
839
+ if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
800
840
 
801
841
  var $this = $(this)
802
842
 
@@ -808,57 +848,25 @@ if (typeof jQuery === 'undefined') {
808
848
  var $parent = getParent($this)
809
849
  var isActive = $parent.hasClass('open')
810
850
 
811
- if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
851
+ if (!isActive && e.which != 27 || isActive && e.which == 27) {
812
852
  if (e.which == 27) $parent.find(toggle).trigger('focus')
813
853
  return $this.trigger('click')
814
854
  }
815
855
 
816
- var desc = ' li:not(.divider):visible a'
817
- 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)
818
858
 
819
859
  if (!$items.length) return
820
860
 
821
861
  var index = $items.index(e.target)
822
862
 
823
- if (e.which == 38 && index > 0) index-- // up
824
- if (e.which == 40 && index < $items.length - 1) index++ // down
825
- 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
826
866
 
827
867
  $items.eq(index).trigger('focus')
828
868
  }
829
869
 
830
- function clearMenus(e) {
831
- if (e && e.which === 3) return
832
- $(backdrop).remove()
833
- $(toggle).each(function () {
834
- var $this = $(this)
835
- var $parent = getParent($this)
836
- var relatedTarget = { relatedTarget: this }
837
-
838
- if (!$parent.hasClass('open')) return
839
-
840
- $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
841
-
842
- if (e.isDefaultPrevented()) return
843
-
844
- $this.attr('aria-expanded', 'false')
845
- $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
846
- })
847
- }
848
-
849
- function getParent($this) {
850
- var selector = $this.attr('data-target')
851
-
852
- if (!selector) {
853
- selector = $this.attr('href')
854
- selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
855
- }
856
-
857
- var $parent = selector && $(selector)
858
-
859
- return $parent && $parent.length ? $parent : $this.parent()
860
- }
861
-
862
870
 
863
871
  // DROPDOWN PLUGIN DEFINITION
864
872
  // ==========================
@@ -896,16 +904,15 @@ if (typeof jQuery === 'undefined') {
896
904
  .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
897
905
  .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
898
906
  .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
899
- .on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
900
- .on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
907
+ .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
901
908
 
902
909
  }(jQuery);
903
910
 
904
911
  /* ========================================================================
905
- * Bootstrap: modal.js v3.3.0
912
+ * Bootstrap: modal.js v3.3.5
906
913
  * http://getbootstrap.com/javascript/#modals
907
914
  * ========================================================================
908
- * Copyright 2011-2014 Twitter, Inc.
915
+ * Copyright 2011-2015 Twitter, Inc.
909
916
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
910
917
  * ======================================================================== */
911
918
 
@@ -917,12 +924,15 @@ if (typeof jQuery === 'undefined') {
917
924
  // ======================
918
925
 
919
926
  var Modal = function (element, options) {
920
- this.options = options
921
- this.$body = $(document.body)
922
- this.$element = $(element)
923
- this.$backdrop =
924
- this.isShown = null
925
- 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
926
936
 
927
937
  if (this.options.remote) {
928
938
  this.$element
@@ -933,7 +943,7 @@ if (typeof jQuery === 'undefined') {
933
943
  }
934
944
  }
935
945
 
936
- Modal.VERSION = '3.3.0'
946
+ Modal.VERSION = '3.3.5'
937
947
 
938
948
  Modal.TRANSITION_DURATION = 300
939
949
  Modal.BACKDROP_TRANSITION_DURATION = 150
@@ -959,13 +969,20 @@ if (typeof jQuery === 'undefined') {
959
969
  this.isShown = true
960
970
 
961
971
  this.checkScrollbar()
972
+ this.setScrollbar()
962
973
  this.$body.addClass('modal-open')
963
974
 
964
- this.setScrollbar()
965
975
  this.escape()
976
+ this.resize()
966
977
 
967
978
  this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
968
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
+
969
986
  this.backdrop(function () {
970
987
  var transition = $.support.transition && that.$element.hasClass('fade')
971
988
 
@@ -977,20 +994,20 @@ if (typeof jQuery === 'undefined') {
977
994
  .show()
978
995
  .scrollTop(0)
979
996
 
997
+ that.adjustDialog()
998
+
980
999
  if (transition) {
981
1000
  that.$element[0].offsetWidth // force reflow
982
1001
  }
983
1002
 
984
- that.$element
985
- .addClass('in')
986
- .attr('aria-hidden', false)
1003
+ that.$element.addClass('in')
987
1004
 
988
1005
  that.enforceFocus()
989
1006
 
990
1007
  var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
991
1008
 
992
1009
  transition ?
993
- that.$element.find('.modal-dialog') // wait for modal to slide in
1010
+ that.$dialog // wait for modal to slide in
994
1011
  .one('bsTransitionEnd', function () {
995
1012
  that.$element.trigger('focus').trigger(e)
996
1013
  })
@@ -1011,13 +1028,16 @@ if (typeof jQuery === 'undefined') {
1011
1028
  this.isShown = false
1012
1029
 
1013
1030
  this.escape()
1031
+ this.resize()
1014
1032
 
1015
1033
  $(document).off('focusin.bs.modal')
1016
1034
 
1017
1035
  this.$element
1018
1036
  .removeClass('in')
1019
- .attr('aria-hidden', true)
1020
1037
  .off('click.dismiss.bs.modal')
1038
+ .off('mouseup.dismiss.bs.modal')
1039
+
1040
+ this.$dialog.off('mousedown.dismiss.bs.modal')
1021
1041
 
1022
1042
  $.support.transition && this.$element.hasClass('fade') ?
1023
1043
  this.$element
@@ -1046,11 +1066,20 @@ if (typeof jQuery === 'undefined') {
1046
1066
  }
1047
1067
  }
1048
1068
 
1069
+ Modal.prototype.resize = function () {
1070
+ if (this.isShown) {
1071
+ $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
1072
+ } else {
1073
+ $(window).off('resize.bs.modal')
1074
+ }
1075
+ }
1076
+
1049
1077
  Modal.prototype.hideModal = function () {
1050
1078
  var that = this
1051
1079
  this.$element.hide()
1052
1080
  this.backdrop(function () {
1053
1081
  that.$body.removeClass('modal-open')
1082
+ that.resetAdjustments()
1054
1083
  that.resetScrollbar()
1055
1084
  that.$element.trigger('hidden.bs.modal')
1056
1085
  })
@@ -1068,14 +1097,20 @@ if (typeof jQuery === 'undefined') {
1068
1097
  if (this.isShown && this.options.backdrop) {
1069
1098
  var doAnimate = $.support.transition && animate
1070
1099
 
1071
- this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
1072
- .prependTo(this.$element)
1073
- .on('click.dismiss.bs.modal', $.proxy(function (e) {
1074
- if (e.target !== e.currentTarget) return
1075
- this.options.backdrop == 'static'
1076
- ? this.$element[0].focus.call(this.$element[0])
1077
- : this.hide.call(this)
1078
- }, 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))
1079
1114
 
1080
1115
  if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1081
1116
 
@@ -1107,21 +1142,49 @@ if (typeof jQuery === 'undefined') {
1107
1142
  }
1108
1143
  }
1109
1144
 
1145
+ // these following methods are used to handle overflowing modals
1146
+
1147
+ Modal.prototype.handleUpdate = function () {
1148
+ this.adjustDialog()
1149
+ }
1150
+
1151
+ Modal.prototype.adjustDialog = function () {
1152
+ var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
1153
+
1154
+ this.$element.css({
1155
+ paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
1156
+ paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
1157
+ })
1158
+ }
1159
+
1160
+ Modal.prototype.resetAdjustments = function () {
1161
+ this.$element.css({
1162
+ paddingLeft: '',
1163
+ paddingRight: ''
1164
+ })
1165
+ }
1166
+
1110
1167
  Modal.prototype.checkScrollbar = function () {
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
1111
1174
  this.scrollbarWidth = this.measureScrollbar()
1112
1175
  }
1113
1176
 
1114
1177
  Modal.prototype.setScrollbar = function () {
1115
1178
  var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
1116
- if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1179
+ this.originalBodyPad = document.body.style.paddingRight || ''
1180
+ if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1117
1181
  }
1118
1182
 
1119
1183
  Modal.prototype.resetScrollbar = function () {
1120
- this.$body.css('padding-right', '')
1184
+ this.$body.css('padding-right', this.originalBodyPad)
1121
1185
  }
1122
1186
 
1123
1187
  Modal.prototype.measureScrollbar = function () { // thx walsh
1124
- if (document.body.clientWidth >= window.innerWidth) return 0
1125
1188
  var scrollDiv = document.createElement('div')
1126
1189
  scrollDiv.className = 'modal-scrollbar-measure'
1127
1190
  this.$body.append(scrollDiv)
@@ -1184,11 +1247,11 @@ if (typeof jQuery === 'undefined') {
1184
1247
  }(jQuery);
1185
1248
 
1186
1249
  /* ========================================================================
1187
- * Bootstrap: tooltip.js v3.3.0
1250
+ * Bootstrap: tooltip.js v3.3.5
1188
1251
  * http://getbootstrap.com/javascript/#tooltip
1189
1252
  * Inspired by the original jQuery.tipsy by Jason Frame
1190
1253
  * ========================================================================
1191
- * Copyright 2011-2014 Twitter, Inc.
1254
+ * Copyright 2011-2015 Twitter, Inc.
1192
1255
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1193
1256
  * ======================================================================== */
1194
1257
 
@@ -1200,17 +1263,18 @@ if (typeof jQuery === 'undefined') {
1200
1263
  // ===============================
1201
1264
 
1202
1265
  var Tooltip = function (element, options) {
1203
- this.type =
1204
- this.options =
1205
- this.enabled =
1206
- this.timeout =
1207
- this.hoverState =
1266
+ this.type = null
1267
+ this.options = null
1268
+ this.enabled = null
1269
+ this.timeout = null
1270
+ this.hoverState = null
1208
1271
  this.$element = null
1272
+ this.inState = null
1209
1273
 
1210
1274
  this.init('tooltip', element, options)
1211
1275
  }
1212
1276
 
1213
- Tooltip.VERSION = '3.3.0'
1277
+ Tooltip.VERSION = '3.3.5'
1214
1278
 
1215
1279
  Tooltip.TRANSITION_DURATION = 150
1216
1280
 
@@ -1235,7 +1299,12 @@ if (typeof jQuery === 'undefined') {
1235
1299
  this.type = type
1236
1300
  this.$element = $(element)
1237
1301
  this.options = this.getOptions(options)
1238
- 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
+ }
1239
1308
 
1240
1309
  var triggers = this.options.trigger.split(' ')
1241
1310
 
@@ -1290,16 +1359,20 @@ if (typeof jQuery === 'undefined') {
1290
1359
  var self = obj instanceof this.constructor ?
1291
1360
  obj : $(obj.currentTarget).data('bs.' + this.type)
1292
1361
 
1293
- if (self && self.$tip && self.$tip.is(':visible')) {
1294
- self.hoverState = 'in'
1295
- return
1296
- }
1297
-
1298
1362
  if (!self) {
1299
1363
  self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1300
1364
  $(obj.currentTarget).data('bs.' + this.type, self)
1301
1365
  }
1302
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
+
1303
1376
  clearTimeout(self.timeout)
1304
1377
 
1305
1378
  self.hoverState = 'in'
@@ -1311,6 +1384,14 @@ if (typeof jQuery === 'undefined') {
1311
1384
  }, self.options.delay.show)
1312
1385
  }
1313
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
+
1314
1395
  Tooltip.prototype.leave = function (obj) {
1315
1396
  var self = obj instanceof this.constructor ?
1316
1397
  obj : $(obj.currentTarget).data('bs.' + this.type)
@@ -1320,6 +1401,12 @@ if (typeof jQuery === 'undefined') {
1320
1401
  $(obj.currentTarget).data('bs.' + this.type, self)
1321
1402
  }
1322
1403
 
1404
+ if (obj instanceof $.Event) {
1405
+ self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
1406
+ }
1407
+
1408
+ if (self.isInStateTrue()) return
1409
+
1323
1410
  clearTimeout(self.timeout)
1324
1411
 
1325
1412
  self.hoverState = 'out'
@@ -1366,6 +1453,7 @@ if (typeof jQuery === 'undefined') {
1366
1453
  .data('bs.' + this.type, this)
1367
1454
 
1368
1455
  this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
1456
+ this.$element.trigger('inserted.bs.' + this.type)
1369
1457
 
1370
1458
  var pos = this.getPosition()
1371
1459
  var actualWidth = $tip[0].offsetWidth
@@ -1373,13 +1461,12 @@ if (typeof jQuery === 'undefined') {
1373
1461
 
1374
1462
  if (autoPlace) {
1375
1463
  var orgPlacement = placement
1376
- var $container = this.options.container ? $(this.options.container) : this.$element.parent()
1377
- var containerDim = this.getPosition($container)
1464
+ var viewportDim = this.getPosition(this.$viewport)
1378
1465
 
1379
- placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
1380
- placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
1381
- placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
1382
- 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' :
1383
1470
  placement
1384
1471
 
1385
1472
  $tip
@@ -1420,8 +1507,8 @@ if (typeof jQuery === 'undefined') {
1420
1507
  if (isNaN(marginTop)) marginTop = 0
1421
1508
  if (isNaN(marginLeft)) marginLeft = 0
1422
1509
 
1423
- offset.top = offset.top + marginTop
1424
- offset.left = offset.left + marginLeft
1510
+ offset.top += marginTop
1511
+ offset.left += marginLeft
1425
1512
 
1426
1513
  // $.fn.offset doesn't round pixel values
1427
1514
  // so we use setOffset directly with our own function B-0
@@ -1457,10 +1544,10 @@ if (typeof jQuery === 'undefined') {
1457
1544
  this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
1458
1545
  }
1459
1546
 
1460
- Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
1547
+ Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
1461
1548
  this.arrow()
1462
- .css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
1463
- .css(isHorizontal ? 'top' : 'left', '')
1549
+ .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
1550
+ .css(isVertical ? 'top' : 'left', '')
1464
1551
  }
1465
1552
 
1466
1553
  Tooltip.prototype.setContent = function () {
@@ -1473,7 +1560,7 @@ if (typeof jQuery === 'undefined') {
1473
1560
 
1474
1561
  Tooltip.prototype.hide = function (callback) {
1475
1562
  var that = this
1476
- var $tip = this.tip()
1563
+ var $tip = $(this.$tip)
1477
1564
  var e = $.Event('hide.bs.' + this.type)
1478
1565
 
1479
1566
  function complete() {
@@ -1490,7 +1577,7 @@ if (typeof jQuery === 'undefined') {
1490
1577
 
1491
1578
  $tip.removeClass('in')
1492
1579
 
1493
- $.support.transition && this.$tip.hasClass('fade') ?
1580
+ $.support.transition && $tip.hasClass('fade') ?
1494
1581
  $tip
1495
1582
  .one('bsTransitionEnd', complete)
1496
1583
  .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
@@ -1503,7 +1590,7 @@ if (typeof jQuery === 'undefined') {
1503
1590
 
1504
1591
  Tooltip.prototype.fixTitle = function () {
1505
1592
  var $e = this.$element
1506
- if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
1593
+ if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
1507
1594
  $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1508
1595
  }
1509
1596
  }
@@ -1531,10 +1618,10 @@ if (typeof jQuery === 'undefined') {
1531
1618
  }
1532
1619
 
1533
1620
  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1534
- return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1535
- 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 } :
1536
1623
  placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1537
- /* 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 }
1538
1625
 
1539
1626
  }
1540
1627
 
@@ -1558,7 +1645,7 @@ if (typeof jQuery === 'undefined') {
1558
1645
  var rightEdgeOffset = pos.left + viewportPadding + actualWidth
1559
1646
  if (leftEdgeOffset < viewportDimensions.left) { // left overflow
1560
1647
  delta.left = viewportDimensions.left - leftEdgeOffset
1561
- } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
1648
+ } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
1562
1649
  delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
1563
1650
  }
1564
1651
  }
@@ -1584,7 +1671,13 @@ if (typeof jQuery === 'undefined') {
1584
1671
  }
1585
1672
 
1586
1673
  Tooltip.prototype.tip = function () {
1587
- 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
1588
1681
  }
1589
1682
 
1590
1683
  Tooltip.prototype.arrow = function () {
@@ -1613,7 +1706,13 @@ if (typeof jQuery === 'undefined') {
1613
1706
  }
1614
1707
  }
1615
1708
 
1616
- 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
+ }
1617
1716
  }
1618
1717
 
1619
1718
  Tooltip.prototype.destroy = function () {
@@ -1621,6 +1720,12 @@ if (typeof jQuery === 'undefined') {
1621
1720
  clearTimeout(this.timeout)
1622
1721
  this.hide(function () {
1623
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
1624
1729
  })
1625
1730
  }
1626
1731
 
@@ -1630,18 +1735,12 @@ if (typeof jQuery === 'undefined') {
1630
1735
 
1631
1736
  function Plugin(option) {
1632
1737
  return this.each(function () {
1633
- var $this = $(this)
1634
- var data = $this.data('bs.tooltip')
1635
- var options = typeof option == 'object' && option
1636
- var selector = options && options.selector
1637
-
1638
- if (!data && option == 'destroy') return
1639
- if (selector) {
1640
- if (!data) $this.data('bs.tooltip', (data = {}))
1641
- if (!data[selector]) data[selector] = new Tooltip(this, options)
1642
- } else {
1643
- if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1644
- }
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)))
1645
1744
  if (typeof option == 'string') data[option]()
1646
1745
  })
1647
1746
  }
@@ -1663,10 +1762,10 @@ if (typeof jQuery === 'undefined') {
1663
1762
  }(jQuery);
1664
1763
 
1665
1764
  /* ========================================================================
1666
- * Bootstrap: popover.js v3.3.0
1765
+ * Bootstrap: popover.js v3.3.5
1667
1766
  * http://getbootstrap.com/javascript/#popovers
1668
1767
  * ========================================================================
1669
- * Copyright 2011-2014 Twitter, Inc.
1768
+ * Copyright 2011-2015 Twitter, Inc.
1670
1769
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1671
1770
  * ======================================================================== */
1672
1771
 
@@ -1683,7 +1782,7 @@ if (typeof jQuery === 'undefined') {
1683
1782
 
1684
1783
  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1685
1784
 
1686
- Popover.VERSION = '3.3.0'
1785
+ Popover.VERSION = '3.3.5'
1687
1786
 
1688
1787
  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
1689
1788
  placement: 'right',
@@ -1739,29 +1838,18 @@ if (typeof jQuery === 'undefined') {
1739
1838
  return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
1740
1839
  }
1741
1840
 
1742
- Popover.prototype.tip = function () {
1743
- if (!this.$tip) this.$tip = $(this.options.template)
1744
- return this.$tip
1745
- }
1746
-
1747
1841
 
1748
1842
  // POPOVER PLUGIN DEFINITION
1749
1843
  // =========================
1750
1844
 
1751
1845
  function Plugin(option) {
1752
1846
  return this.each(function () {
1753
- var $this = $(this)
1754
- var data = $this.data('bs.popover')
1755
- var options = typeof option == 'object' && option
1756
- var selector = options && options.selector
1757
-
1758
- if (!data && option == 'destroy') return
1759
- if (selector) {
1760
- if (!data) $this.data('bs.popover', (data = {}))
1761
- if (!data[selector]) data[selector] = new Popover(this, options)
1762
- } else {
1763
- if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1764
- }
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)))
1765
1853
  if (typeof option == 'string') data[option]()
1766
1854
  })
1767
1855
  }
@@ -1783,10 +1871,10 @@ if (typeof jQuery === 'undefined') {
1783
1871
  }(jQuery);
1784
1872
 
1785
1873
  /* ========================================================================
1786
- * Bootstrap: scrollspy.js v3.3.0
1874
+ * Bootstrap: scrollspy.js v3.3.5
1787
1875
  * http://getbootstrap.com/javascript/#scrollspy
1788
1876
  * ========================================================================
1789
- * Copyright 2011-2014 Twitter, Inc.
1877
+ * Copyright 2011-2015 Twitter, Inc.
1790
1878
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1791
1879
  * ======================================================================== */
1792
1880
 
@@ -1798,10 +1886,8 @@ if (typeof jQuery === 'undefined') {
1798
1886
  // ==========================
1799
1887
 
1800
1888
  function ScrollSpy(element, options) {
1801
- var process = $.proxy(this.process, this)
1802
-
1803
- this.$body = $('body')
1804
- this.$scrollElement = $(element).is('body') ? $(window) : $(element)
1889
+ this.$body = $(document.body)
1890
+ this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
1805
1891
  this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
1806
1892
  this.selector = (this.options.target || '') + ' .nav li > a'
1807
1893
  this.offsets = []
@@ -1809,12 +1895,12 @@ if (typeof jQuery === 'undefined') {
1809
1895
  this.activeTarget = null
1810
1896
  this.scrollHeight = 0
1811
1897
 
1812
- this.$scrollElement.on('scroll.bs.scrollspy', process)
1898
+ this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
1813
1899
  this.refresh()
1814
1900
  this.process()
1815
1901
  }
1816
1902
 
1817
- ScrollSpy.VERSION = '3.3.0'
1903
+ ScrollSpy.VERSION = '3.3.5'
1818
1904
 
1819
1905
  ScrollSpy.DEFAULTS = {
1820
1906
  offset: 10
@@ -1825,20 +1911,19 @@ if (typeof jQuery === 'undefined') {
1825
1911
  }
1826
1912
 
1827
1913
  ScrollSpy.prototype.refresh = function () {
1828
- var offsetMethod = 'offset'
1829
- 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()
1830
1921
 
1831
1922
  if (!$.isWindow(this.$scrollElement[0])) {
1832
1923
  offsetMethod = 'position'
1833
1924
  offsetBase = this.$scrollElement.scrollTop()
1834
1925
  }
1835
1926
 
1836
- this.offsets = []
1837
- this.targets = []
1838
- this.scrollHeight = this.getScrollHeight()
1839
-
1840
- var self = this
1841
-
1842
1927
  this.$body
1843
1928
  .find(this.selector)
1844
1929
  .map(function () {
@@ -1853,8 +1938,8 @@ if (typeof jQuery === 'undefined') {
1853
1938
  })
1854
1939
  .sort(function (a, b) { return a[0] - b[0] })
1855
1940
  .each(function () {
1856
- self.offsets.push(this[0])
1857
- self.targets.push(this[1])
1941
+ that.offsets.push(this[0])
1942
+ that.targets.push(this[1])
1858
1943
  })
1859
1944
  }
1860
1945
 
@@ -1883,7 +1968,7 @@ if (typeof jQuery === 'undefined') {
1883
1968
  for (i = offsets.length; i--;) {
1884
1969
  activeTarget != targets[i]
1885
1970
  && scrollTop >= offsets[i]
1886
- && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
1971
+ && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
1887
1972
  && this.activate(targets[i])
1888
1973
  }
1889
1974
  }
@@ -1894,8 +1979,8 @@ if (typeof jQuery === 'undefined') {
1894
1979
  this.clear()
1895
1980
 
1896
1981
  var selector = this.selector +
1897
- '[data-target="' + target + '"],' +
1898
- this.selector + '[href="' + target + '"]'
1982
+ '[data-target="' + target + '"],' +
1983
+ this.selector + '[href="' + target + '"]'
1899
1984
 
1900
1985
  var active = $(selector)
1901
1986
  .parents('li')
@@ -1959,10 +2044,10 @@ if (typeof jQuery === 'undefined') {
1959
2044
  }(jQuery);
1960
2045
 
1961
2046
  /* ========================================================================
1962
- * Bootstrap: tab.js v3.3.0
2047
+ * Bootstrap: tab.js v3.3.5
1963
2048
  * http://getbootstrap.com/javascript/#tabs
1964
2049
  * ========================================================================
1965
- * Copyright 2011-2014 Twitter, Inc.
2050
+ * Copyright 2011-2015 Twitter, Inc.
1966
2051
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1967
2052
  * ======================================================================== */
1968
2053
 
@@ -1974,10 +2059,12 @@ if (typeof jQuery === 'undefined') {
1974
2059
  // ====================
1975
2060
 
1976
2061
  var Tab = function (element) {
2062
+ // jscs:disable requireDollarBeforejQueryAssignment
1977
2063
  this.element = $(element)
2064
+ // jscs:enable requireDollarBeforejQueryAssignment
1978
2065
  }
1979
2066
 
1980
- Tab.VERSION = '3.3.0'
2067
+ Tab.VERSION = '3.3.5'
1981
2068
 
1982
2069
  Tab.TRANSITION_DURATION = 150
1983
2070
 
@@ -2025,7 +2112,7 @@ if (typeof jQuery === 'undefined') {
2025
2112
  var $active = container.find('> .active')
2026
2113
  var transition = callback
2027
2114
  && $.support.transition
2028
- && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
2115
+ && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
2029
2116
 
2030
2117
  function next() {
2031
2118
  $active
@@ -2048,7 +2135,7 @@ if (typeof jQuery === 'undefined') {
2048
2135
  element.removeClass('fade')
2049
2136
  }
2050
2137
 
2051
- if (element.parent('.dropdown-menu')) {
2138
+ if (element.parent('.dropdown-menu').length) {
2052
2139
  element
2053
2140
  .closest('li.dropdown')
2054
2141
  .addClass('active')
@@ -2113,10 +2200,10 @@ if (typeof jQuery === 'undefined') {
2113
2200
  }(jQuery);
2114
2201
 
2115
2202
  /* ========================================================================
2116
- * Bootstrap: affix.js v3.3.0
2203
+ * Bootstrap: affix.js v3.3.5
2117
2204
  * http://getbootstrap.com/javascript/#affix
2118
2205
  * ========================================================================
2119
- * Copyright 2011-2014 Twitter, Inc.
2206
+ * Copyright 2011-2015 Twitter, Inc.
2120
2207
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2121
2208
  * ======================================================================== */
2122
2209
 
@@ -2135,14 +2222,14 @@ if (typeof jQuery === 'undefined') {
2135
2222
  .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
2136
2223
 
2137
2224
  this.$element = $(element)
2138
- this.affixed =
2139
- this.unpin =
2225
+ this.affixed = null
2226
+ this.unpin = null
2140
2227
  this.pinnedOffset = null
2141
2228
 
2142
2229
  this.checkPosition()
2143
2230
  }
2144
2231
 
2145
- Affix.VERSION = '3.3.0'
2232
+ Affix.VERSION = '3.3.5'
2146
2233
 
2147
2234
  Affix.RESET = 'affix affix-top affix-bottom'
2148
2235
 
@@ -2167,7 +2254,7 @@ if (typeof jQuery === 'undefined') {
2167
2254
  var colliderTop = initializing ? scrollTop : position.top
2168
2255
  var colliderHeight = initializing ? targetHeight : height
2169
2256
 
2170
- if (offsetTop != null && colliderTop <= offsetTop) return 'top'
2257
+ if (offsetTop != null && scrollTop <= offsetTop) return 'top'
2171
2258
  if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
2172
2259
 
2173
2260
  return false
@@ -2192,7 +2279,7 @@ if (typeof jQuery === 'undefined') {
2192
2279
  var offset = this.options.offset
2193
2280
  var offsetTop = offset.top
2194
2281
  var offsetBottom = offset.bottom
2195
- var scrollHeight = $('body').height()
2282
+ var scrollHeight = Math.max($(document).height(), $(document.body).height())
2196
2283
 
2197
2284
  if (typeof offset != 'object') offsetBottom = offsetTop = offset
2198
2285
  if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)