bootstrap-generators 3.0.2.2 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/Rakefile +7 -6
  4. data/bootstrap-generators.gemspec +1 -1
  5. data/lib/bootstrap/generators/version.rb +1 -1
  6. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +354 -164
  7. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss +359 -165
  8. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb +3 -3
  9. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml +3 -3
  10. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.slim +3 -3
  11. data/lib/generators/bootstrap/install/templates/layouts/starter.html.erb +1 -0
  12. data/lib/generators/bootstrap/install/templates/layouts/starter.html.haml +1 -0
  13. data/lib/generators/bootstrap/install/templates/layouts/starter.html.slim +2 -0
  14. data/readme-template.md.erb +14 -0
  15. data/vendor/assets/fonts/{glyphicons-halflings-regular.eot → bootstrap/glyphicons-halflings-regular.eot} +0 -0
  16. data/vendor/assets/fonts/{glyphicons-halflings-regular.svg → bootstrap/glyphicons-halflings-regular.svg} +0 -0
  17. data/vendor/assets/fonts/{glyphicons-halflings-regular.ttf → bootstrap/glyphicons-halflings-regular.ttf} +0 -0
  18. data/vendor/assets/fonts/{glyphicons-halflings-regular.woff → bootstrap/glyphicons-halflings-regular.woff} +0 -0
  19. data/vendor/assets/javascripts/bootstrap/affix.js +34 -23
  20. data/vendor/assets/javascripts/bootstrap/alert.js +5 -15
  21. data/vendor/assets/javascripts/bootstrap/button.js +24 -26
  22. data/vendor/assets/javascripts/bootstrap/carousel.js +20 -32
  23. data/vendor/assets/javascripts/bootstrap/collapse.js +7 -16
  24. data/vendor/assets/javascripts/bootstrap/dropdown.js +23 -30
  25. data/vendor/assets/javascripts/bootstrap/modal.js +25 -28
  26. data/vendor/assets/javascripts/bootstrap/popover.js +14 -21
  27. data/vendor/assets/javascripts/bootstrap/scrollspy.js +17 -22
  28. data/vendor/assets/javascripts/bootstrap/tab.js +7 -17
  29. data/vendor/assets/javascripts/bootstrap/tooltip.js +52 -39
  30. data/vendor/assets/javascripts/bootstrap/transition.js +11 -19
  31. data/vendor/assets/stylesheets/bootstrap.css +1209 -2476
  32. data/vendor/twitter/bootstrap/less/badges.less +10 -6
  33. data/vendor/twitter/bootstrap/less/breadcrumbs.less +4 -1
  34. data/vendor/twitter/bootstrap/less/button-groups.less +17 -44
  35. data/vendor/twitter/bootstrap/less/buttons.less +10 -13
  36. data/vendor/twitter/bootstrap/less/carousel.less +1 -0
  37. data/vendor/twitter/bootstrap/less/code.less +10 -0
  38. data/vendor/twitter/bootstrap/less/dropdowns.less +31 -10
  39. data/vendor/twitter/bootstrap/less/forms.less +89 -34
  40. data/vendor/twitter/bootstrap/less/glyphicons.less +5 -9
  41. data/vendor/twitter/bootstrap/less/grid.less +36 -29
  42. data/vendor/twitter/bootstrap/less/input-groups.less +40 -19
  43. data/vendor/twitter/bootstrap/less/jumbotron.less +11 -7
  44. data/vendor/twitter/bootstrap/less/labels.less +6 -0
  45. data/vendor/twitter/bootstrap/less/list-group.less +25 -3
  46. data/vendor/twitter/bootstrap/less/mixins.less +140 -72
  47. data/vendor/twitter/bootstrap/less/modals.less +18 -12
  48. data/vendor/twitter/bootstrap/less/navbar.less +65 -73
  49. data/vendor/twitter/bootstrap/less/navs.less +2 -22
  50. data/vendor/twitter/bootstrap/less/normalize.less +139 -122
  51. data/vendor/twitter/bootstrap/less/pager.less +5 -5
  52. data/vendor/twitter/bootstrap/less/pagination.less +6 -3
  53. data/vendor/twitter/bootstrap/less/panels.less +73 -15
  54. data/vendor/twitter/bootstrap/less/print.less +0 -4
  55. data/vendor/twitter/bootstrap/less/progress-bars.less +0 -12
  56. data/vendor/twitter/bootstrap/less/responsive-utilities.less +13 -129
  57. data/vendor/twitter/bootstrap/less/scaffolding.less +17 -2
  58. data/vendor/twitter/bootstrap/less/tables.less +19 -22
  59. data/vendor/twitter/bootstrap/less/theme.less +1 -1
  60. data/vendor/twitter/bootstrap/less/thumbnails.less +9 -3
  61. data/vendor/twitter/bootstrap/less/tooltip.less +1 -1
  62. data/vendor/twitter/bootstrap/less/type.less +123 -106
  63. data/vendor/twitter/bootstrap/less/variables.less +354 -164
  64. data/vendor/twitter/bootstrap/less/wells.less +1 -1
  65. data/vendor/twitter/bootstrap/sass/_badges.scss +10 -6
  66. data/vendor/twitter/bootstrap/sass/_breadcrumbs.scss +4 -1
  67. data/vendor/twitter/bootstrap/sass/_button-groups.scss +15 -42
  68. data/vendor/twitter/bootstrap/sass/_buttons.scss +10 -13
  69. data/vendor/twitter/bootstrap/sass/_carousel.scss +1 -0
  70. data/vendor/twitter/bootstrap/sass/_code.scss +10 -0
  71. data/vendor/twitter/bootstrap/sass/_dropdowns.scss +31 -11
  72. data/vendor/twitter/bootstrap/sass/_forms.scss +88 -34
  73. data/vendor/twitter/bootstrap/sass/_glyphicons.scss +5 -9
  74. data/vendor/twitter/bootstrap/sass/_grid.scss +36 -29
  75. data/vendor/twitter/bootstrap/sass/_input-groups.scss +40 -19
  76. data/vendor/twitter/bootstrap/sass/_jumbotron.scss +11 -7
  77. data/vendor/twitter/bootstrap/sass/_labels.scss +6 -0
  78. data/vendor/twitter/bootstrap/sass/_list-group.scss +25 -3
  79. data/vendor/twitter/bootstrap/sass/_mixins.scss +135 -65
  80. data/vendor/twitter/bootstrap/sass/_modals.scss +17 -11
  81. data/vendor/twitter/bootstrap/sass/_navbar.scss +62 -70
  82. data/vendor/twitter/bootstrap/sass/_navs.scss +1 -21
  83. data/vendor/twitter/bootstrap/sass/_normalize.scss +139 -122
  84. data/vendor/twitter/bootstrap/sass/_pager.scss +4 -4
  85. data/vendor/twitter/bootstrap/sass/_pagination.scss +6 -3
  86. data/vendor/twitter/bootstrap/sass/_panels.scss +72 -14
  87. data/vendor/twitter/bootstrap/sass/_print.scss +0 -4
  88. data/vendor/twitter/bootstrap/sass/_progress-bars.scss +0 -12
  89. data/vendor/twitter/bootstrap/sass/_responsive-utilities.scss +6 -124
  90. data/vendor/twitter/bootstrap/sass/_scaffolding.scss +17 -2
  91. data/vendor/twitter/bootstrap/sass/_tables.scss +7 -18
  92. data/vendor/twitter/bootstrap/sass/_theme.scss +1 -1
  93. data/vendor/twitter/bootstrap/sass/_thumbnails.scss +13 -7
  94. data/vendor/twitter/bootstrap/sass/_tooltip.scss +1 -1
  95. data/vendor/twitter/bootstrap/sass/_type.scss +122 -105
  96. data/vendor/twitter/bootstrap/sass/_variables.scss +359 -165
  97. data/vendor/twitter/bootstrap/sass/_wells.scss +1 -1
  98. metadata +7 -7
@@ -1,24 +1,14 @@
1
1
  /* ========================================================================
2
- * Bootstrap: dropdown.js v3.0.2
2
+ * Bootstrap: dropdown.js v3.1.0
3
3
  * http://getbootstrap.com/javascript/#dropdowns
4
4
  * ========================================================================
5
- * Copyright 2013 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
5
+ * Copyright 2011-2014 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
18
7
  * ======================================================================== */
19
8
 
20
9
 
21
- +function ($) { "use strict";
10
+ +function ($) {
11
+ 'use strict';
22
12
 
23
13
  // DROPDOWN CLASS DEFINITION
24
14
  // =========================
@@ -26,7 +16,7 @@
26
16
  var backdrop = '.dropdown-backdrop'
27
17
  var toggle = '[data-toggle=dropdown]'
28
18
  var Dropdown = function (element) {
29
- var $el = $(element).on('click.bs.dropdown', this.toggle)
19
+ $(element).on('click.bs.dropdown', this.toggle)
30
20
  }
31
21
 
32
22
  Dropdown.prototype.toggle = function (e) {
@@ -41,17 +31,18 @@
41
31
 
42
32
  if (!isActive) {
43
33
  if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
44
- // if mobile we we use a backdrop because click events don't delegate
34
+ // if mobile we use a backdrop because click events don't delegate
45
35
  $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
46
36
  }
47
37
 
48
- $parent.trigger(e = $.Event('show.bs.dropdown'))
38
+ var relatedTarget = { relatedTarget: this }
39
+ $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
49
40
 
50
41
  if (e.isDefaultPrevented()) return
51
42
 
52
43
  $parent
53
44
  .toggleClass('open')
54
- .trigger('shown.bs.dropdown')
45
+ .trigger('shown.bs.dropdown', relatedTarget)
55
46
 
56
47
  $this.focus()
57
48
  }
@@ -77,7 +68,8 @@
77
68
  return $this.click()
78
69
  }
79
70
 
80
- var $items = $('[role=menu] li:not(.divider):visible a', $parent)
71
+ var desc = ' li:not(.divider):visible a'
72
+ var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc)
81
73
 
82
74
  if (!$items.length) return
83
75
 
@@ -85,19 +77,20 @@
85
77
 
86
78
  if (e.keyCode == 38 && index > 0) index-- // up
87
79
  if (e.keyCode == 40 && index < $items.length - 1) index++ // down
88
- if (!~index) index=0
80
+ if (!~index) index = 0
89
81
 
90
82
  $items.eq(index).focus()
91
83
  }
92
84
 
93
- function clearMenus() {
85
+ function clearMenus(e) {
94
86
  $(backdrop).remove()
95
- $(toggle).each(function (e) {
87
+ $(toggle).each(function () {
96
88
  var $parent = getParent($(this))
89
+ var relatedTarget = { relatedTarget: this }
97
90
  if (!$parent.hasClass('open')) return
98
- $parent.trigger(e = $.Event('hide.bs.dropdown'))
91
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
99
92
  if (e.isDefaultPrevented()) return
100
- $parent.removeClass('open').trigger('hidden.bs.dropdown')
93
+ $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
101
94
  })
102
95
  }
103
96
 
@@ -106,7 +99,7 @@
106
99
 
107
100
  if (!selector) {
108
101
  selector = $this.attr('href')
109
- selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
102
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
110
103
  }
111
104
 
112
105
  var $parent = selector && $(selector)
@@ -123,9 +116,9 @@
123
116
  $.fn.dropdown = function (option) {
124
117
  return this.each(function () {
125
118
  var $this = $(this)
126
- var data = $this.data('dropdown')
119
+ var data = $this.data('bs.dropdown')
127
120
 
128
- if (!data) $this.data('dropdown', (data = new Dropdown(this)))
121
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
129
122
  if (typeof option == 'string') data[option].call($this)
130
123
  })
131
124
  }
@@ -148,7 +141,7 @@
148
141
  $(document)
149
142
  .on('click.bs.dropdown.data-api', clearMenus)
150
143
  .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
151
- .on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
152
- .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
144
+ .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
145
+ .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown)
153
146
 
154
147
  }(jQuery);
@@ -1,24 +1,14 @@
1
1
  /* ========================================================================
2
- * Bootstrap: modal.js v3.0.2
2
+ * Bootstrap: modal.js v3.1.0
3
3
  * http://getbootstrap.com/javascript/#modals
4
4
  * ========================================================================
5
- * Copyright 2013 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
5
+ * Copyright 2011-2014 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
18
7
  * ======================================================================== */
19
8
 
20
9
 
21
- +function ($) { "use strict";
10
+ +function ($) {
11
+ 'use strict';
22
12
 
23
13
  // MODAL CLASS DEFINITION
24
14
  // ======================
@@ -29,13 +19,19 @@
29
19
  this.$backdrop =
30
20
  this.isShown = null
31
21
 
32
- if (this.options.remote) this.$element.load(this.options.remote)
22
+ if (this.options.remote) {
23
+ this.$element
24
+ .find('.modal-content')
25
+ .load(this.options.remote, $.proxy(function () {
26
+ this.$element.trigger('loaded.bs.modal')
27
+ }, this))
28
+ }
33
29
  }
34
30
 
35
31
  Modal.DEFAULTS = {
36
- backdrop: true
37
- , keyboard: true
38
- , show: true
32
+ backdrop: true,
33
+ keyboard: true,
34
+ show: true
39
35
  }
40
36
 
41
37
  Modal.prototype.toggle = function (_relatedTarget) {
@@ -54,7 +50,7 @@
54
50
 
55
51
  this.escape()
56
52
 
57
- this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
53
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
58
54
 
59
55
  this.backdrop(function () {
60
56
  var transition = $.support.transition && that.$element.hasClass('fade')
@@ -63,7 +59,9 @@
63
59
  that.$element.appendTo(document.body) // don't move modals dom position
64
60
  }
65
61
 
66
- that.$element.show()
62
+ that.$element
63
+ .show()
64
+ .scrollTop(0)
67
65
 
68
66
  if (transition) {
69
67
  that.$element[0].offsetWidth // force reflow
@@ -105,7 +103,7 @@
105
103
  this.$element
106
104
  .removeClass('in')
107
105
  .attr('aria-hidden', true)
108
- .off('click.dismiss.modal')
106
+ .off('click.dismiss.bs.modal')
109
107
 
110
108
  $.support.transition && this.$element.hasClass('fade') ?
111
109
  this.$element
@@ -149,7 +147,6 @@
149
147
  }
150
148
 
151
149
  Modal.prototype.backdrop = function (callback) {
152
- var that = this
153
150
  var animate = this.$element.hasClass('fade') ? 'fade' : ''
154
151
 
155
152
  if (this.isShown && this.options.backdrop) {
@@ -158,7 +155,7 @@
158
155
  this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
159
156
  .appendTo(document.body)
160
157
 
161
- this.$element.on('click.dismiss.modal', $.proxy(function (e) {
158
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
162
159
  if (e.target !== e.currentTarget) return
163
160
  this.options.backdrop == 'static'
164
161
  ? this.$element[0].focus.call(this.$element[0])
@@ -180,7 +177,7 @@
180
177
  } else if (!this.isShown && this.$backdrop) {
181
178
  this.$backdrop.removeClass('in')
182
179
 
183
- $.support.transition && this.$element.hasClass('fade')?
180
+ $.support.transition && this.$element.hasClass('fade') ?
184
181
  this.$backdrop
185
182
  .one($.support.transition.end, callback)
186
183
  .emulateTransitionEnd(150) :
@@ -228,9 +225,9 @@
228
225
  var $this = $(this)
229
226
  var href = $this.attr('href')
230
227
  var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
231
- var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
228
+ var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
232
229
 
233
- e.preventDefault()
230
+ if ($this.is('a')) e.preventDefault()
234
231
 
235
232
  $target
236
233
  .modal(option, this)
@@ -240,7 +237,7 @@
240
237
  })
241
238
 
242
239
  $(document)
243
- .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
240
+ .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
244
241
  .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
245
242
 
246
243
  }(jQuery);
@@ -1,24 +1,14 @@
1
1
  /* ========================================================================
2
- * Bootstrap: popover.js v3.0.2
2
+ * Bootstrap: popover.js v3.1.0
3
3
  * http://getbootstrap.com/javascript/#popovers
4
4
  * ========================================================================
5
- * Copyright 2013 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
5
+ * Copyright 2011-2014 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
18
7
  * ======================================================================== */
19
8
 
20
9
 
21
- +function ($) { "use strict";
10
+ +function ($) {
11
+ 'use strict';
22
12
 
23
13
  // POPOVER PUBLIC CLASS DEFINITION
24
14
  // ===============================
@@ -29,11 +19,11 @@
29
19
 
30
20
  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
31
21
 
32
- Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
33
- placement: 'right'
34
- , trigger: 'click'
35
- , content: ''
36
- , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
22
+ Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
23
+ placement: 'right',
24
+ trigger: 'click',
25
+ content: '',
26
+ template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
37
27
  })
38
28
 
39
29
 
@@ -54,7 +44,9 @@
54
44
  var content = this.getContent()
55
45
 
56
46
  $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
57
- $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
47
+ $tip.find('.popover-content')[ // we use append for html objects to maintain js events
48
+ this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
49
+ ](content)
58
50
 
59
51
  $tip.removeClass('fade top bottom left right in')
60
52
 
@@ -98,6 +90,7 @@
98
90
  var data = $this.data('bs.popover')
99
91
  var options = typeof option == 'object' && option
100
92
 
93
+ if (!data && option == 'destroy') return
101
94
  if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
102
95
  if (typeof option == 'string') data[option]()
103
96
  })
@@ -1,24 +1,14 @@
1
1
  /* ========================================================================
2
- * Bootstrap: scrollspy.js v3.0.2
2
+ * Bootstrap: scrollspy.js v3.1.0
3
3
  * http://getbootstrap.com/javascript/#scrollspy
4
4
  * ========================================================================
5
- * Copyright 2013 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
5
+ * Copyright 2011-2014 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
18
7
  * ======================================================================== */
19
8
 
20
9
 
21
- +function ($) { "use strict";
10
+ +function ($) {
11
+ 'use strict';
22
12
 
23
13
  // SCROLLSPY CLASS DEFINITION
24
14
  // ==========================
@@ -58,10 +48,11 @@
58
48
  .map(function () {
59
49
  var $el = $(this)
60
50
  var href = $el.data('target') || $el.attr('href')
61
- var $href = /^#\w/.test(href) && $(href)
51
+ var $href = /^#./.test(href) && $(href)
62
52
 
63
53
  return ($href
64
54
  && $href.length
55
+ && $href.is(':visible')
65
56
  && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
66
57
  })
67
58
  .sort(function (a, b) { return a[0] - b[0] })
@@ -84,6 +75,10 @@
84
75
  return activeTarget != (i = targets.last()[0]) && this.activate(i)
85
76
  }
86
77
 
78
+ if (activeTarget && scrollTop <= offsets[0]) {
79
+ return activeTarget != (i = targets[0]) && this.activate(i)
80
+ }
81
+
87
82
  for (i = offsets.length; i--;) {
88
83
  activeTarget != targets[i]
89
84
  && scrollTop >= offsets[i]
@@ -96,24 +91,24 @@
96
91
  this.activeTarget = target
97
92
 
98
93
  $(this.selector)
99
- .parents('.active')
94
+ .parentsUntil(this.options.target, '.active')
100
95
  .removeClass('active')
101
96
 
102
- var selector = this.selector
103
- + '[data-target="' + target + '"],'
104
- + this.selector + '[href="' + target + '"]'
97
+ var selector = this.selector +
98
+ '[data-target="' + target + '"],' +
99
+ this.selector + '[href="' + target + '"]'
105
100
 
106
101
  var active = $(selector)
107
102
  .parents('li')
108
103
  .addClass('active')
109
104
 
110
- if (active.parent('.dropdown-menu').length) {
105
+ if (active.parent('.dropdown-menu').length) {
111
106
  active = active
112
107
  .closest('li.dropdown')
113
108
  .addClass('active')
114
109
  }
115
110
 
116
- active.trigger('activate')
111
+ active.trigger('activate.bs.scrollspy')
117
112
  }
118
113
 
119
114
 
@@ -1,24 +1,14 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tab.js v3.0.2
2
+ * Bootstrap: tab.js v3.1.0
3
3
  * http://getbootstrap.com/javascript/#tabs
4
4
  * ========================================================================
5
- * Copyright 2013 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
5
+ * Copyright 2011-2014 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
18
7
  * ======================================================================== */
19
8
 
20
9
 
21
- +function ($) { "use strict";
10
+ +function ($) {
11
+ 'use strict';
22
12
 
23
13
  // TAB CLASS DEFINITION
24
14
  // ====================
@@ -53,8 +43,8 @@
53
43
  this.activate($this.parent('li'), $ul)
54
44
  this.activate($target, $target.parent(), function () {
55
45
  $this.trigger({
56
- type: 'shown.bs.tab'
57
- , relatedTarget: previous
46
+ type: 'shown.bs.tab',
47
+ relatedTarget: previous
58
48
  })
59
49
  })
60
50
  }
@@ -1,25 +1,15 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tooltip.js v3.0.2
2
+ * Bootstrap: tooltip.js v3.1.0
3
3
  * http://getbootstrap.com/javascript/#tooltip
4
4
  * Inspired by the original jQuery.tipsy by Jason Frame
5
5
  * ========================================================================
6
- * Copyright 2013 Twitter, Inc.
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
6
+ * Copyright 2011-2014 Twitter, Inc.
7
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
19
8
  * ======================================================================== */
20
9
 
21
10
 
22
- +function ($) { "use strict";
11
+ +function ($) {
12
+ 'use strict';
23
13
 
24
14
  // TOOLTIP PUBLIC CLASS DEFINITION
25
15
  // ===============================
@@ -36,15 +26,15 @@
36
26
  }
37
27
 
38
28
  Tooltip.DEFAULTS = {
39
- animation: true
40
- , placement: 'top'
41
- , selector: false
42
- , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
43
- , trigger: 'hover focus'
44
- , title: ''
45
- , delay: 0
46
- , html: false
47
- , container: false
29
+ animation: true,
30
+ placement: 'top',
31
+ selector: false,
32
+ template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
33
+ trigger: 'hover focus',
34
+ title: '',
35
+ delay: 0,
36
+ html: false,
37
+ container: false
48
38
  }
49
39
 
50
40
  Tooltip.prototype.init = function (type, element, options) {
@@ -61,8 +51,8 @@
61
51
  if (trigger == 'click') {
62
52
  this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
63
53
  } else if (trigger != 'manual') {
64
- var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
65
- var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
54
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
55
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
66
56
 
67
57
  this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
68
58
  this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
@@ -83,8 +73,8 @@
83
73
 
84
74
  if (options.delay && typeof options.delay == 'number') {
85
75
  options.delay = {
86
- show: options.delay
87
- , hide: options.delay
76
+ show: options.delay,
77
+ hide: options.delay
88
78
  }
89
79
  }
90
80
 
@@ -133,12 +123,13 @@
133
123
  }
134
124
 
135
125
  Tooltip.prototype.show = function () {
136
- var e = $.Event('show.bs.'+ this.type)
126
+ var e = $.Event('show.bs.' + this.type)
137
127
 
138
128
  if (this.hasContent() && this.enabled) {
139
129
  this.$element.trigger(e)
140
130
 
141
131
  if (e.isDefaultPrevented()) return
132
+ var that = this;
142
133
 
143
134
  var $tip = this.tip()
144
135
 
@@ -188,11 +179,21 @@
188
179
  var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
189
180
 
190
181
  this.applyPlacement(calculatedOffset, placement)
191
- this.$element.trigger('shown.bs.' + this.type)
182
+ this.hoverState = null
183
+
184
+ var complete = function() {
185
+ that.$element.trigger('shown.bs.' + that.type)
186
+ }
187
+
188
+ $.support.transition && this.$tip.hasClass('fade') ?
189
+ $tip
190
+ .one($.support.transition.end, complete)
191
+ .emulateTransitionEnd(150) :
192
+ complete()
192
193
  }
193
194
  }
194
195
 
195
- Tooltip.prototype.applyPlacement = function(offset, placement) {
196
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
196
197
  var replace
197
198
  var $tip = this.tip()
198
199
  var width = $tip[0].offsetWidth
@@ -209,9 +210,18 @@
209
210
  offset.top = offset.top + marginTop
210
211
  offset.left = offset.left + marginLeft
211
212
 
212
- $tip
213
- .offset(offset)
214
- .addClass('in')
213
+ // $.fn.offset doesn't round pixel values
214
+ // so we use setOffset directly with our own function B-0
215
+ $.offset.setOffset($tip[0], $.extend({
216
+ using: function (props) {
217
+ $tip.css({
218
+ top: Math.round(props.top),
219
+ left: Math.round(props.left)
220
+ })
221
+ }
222
+ }, offset), 0)
223
+
224
+ $tip.addClass('in')
215
225
 
216
226
  // check to see if placing tip in new offset caused the tip to resize itself
217
227
  var actualWidth = $tip[0].offsetWidth
@@ -243,8 +253,8 @@
243
253
  if (replace) $tip.offset(offset)
244
254
  }
245
255
 
246
- Tooltip.prototype.replaceArrow = function(delta, dimension, position) {
247
- this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
256
+ Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
257
+ this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
248
258
  }
249
259
 
250
260
  Tooltip.prototype.setContent = function () {
@@ -262,6 +272,7 @@
262
272
 
263
273
  function complete() {
264
274
  if (that.hoverState != 'in') $tip.detach()
275
+ that.$element.trigger('hidden.bs.' + that.type)
265
276
  }
266
277
 
267
278
  this.$element.trigger(e)
@@ -276,7 +287,7 @@
276
287
  .emulateTransitionEnd(150) :
277
288
  complete()
278
289
 
279
- this.$element.trigger('hidden.bs.' + this.type)
290
+ this.hoverState = null
280
291
 
281
292
  return this
282
293
  }
@@ -295,8 +306,8 @@
295
306
  Tooltip.prototype.getPosition = function () {
296
307
  var el = this.$element[0]
297
308
  return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
298
- width: el.offsetWidth
299
- , height: el.offsetHeight
309
+ width: el.offsetWidth,
310
+ height: el.offsetHeight
300
311
  }, this.$element.offset())
301
312
  }
302
313
 
@@ -352,6 +363,7 @@
352
363
  }
353
364
 
354
365
  Tooltip.prototype.destroy = function () {
366
+ clearTimeout(this.timeout)
355
367
  this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
356
368
  }
357
369
 
@@ -367,6 +379,7 @@
367
379
  var data = $this.data('bs.tooltip')
368
380
  var options = typeof option == 'object' && option
369
381
 
382
+ if (!data && option == 'destroy') return
370
383
  if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
371
384
  if (typeof option == 'string') data[option]()
372
385
  })