twbs_sass_rails 0.6.4 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Rakefile +10 -3
  4. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  5. data/app/assets/fonts/fontawesome-webfont.svg +469 -379
  6. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  7. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  8. data/gemfiles/Gemfile.rails-4.0.x +1 -1
  9. data/gemfiles/Gemfile.rails-4.1.x +1 -1
  10. data/lib/twbs_sass_rails/version.rb +1 -1
  11. data/vendor/assets/javascripts/twbs/bootstrap/affix.js +19 -14
  12. data/vendor/assets/javascripts/twbs/bootstrap/alert.js +10 -6
  13. data/vendor/assets/javascripts/twbs/bootstrap/button.js +11 -8
  14. data/vendor/assets/javascripts/twbs/bootstrap/carousel.js +49 -31
  15. data/vendor/assets/javascripts/twbs/bootstrap/collapse.js +22 -22
  16. data/vendor/assets/javascripts/twbs/bootstrap/dropdown.js +17 -13
  17. data/vendor/assets/javascripts/twbs/bootstrap/modal.js +66 -29
  18. data/vendor/assets/javascripts/twbs/bootstrap/popover.js +10 -7
  19. data/vendor/assets/javascripts/twbs/bootstrap/scrollspy.js +40 -23
  20. data/vendor/assets/javascripts/twbs/bootstrap/tab.js +11 -8
  21. data/vendor/assets/javascripts/twbs/bootstrap/tooltip.js +115 -57
  22. data/vendor/assets/javascripts/twbs/bootstrap/transition.js +18 -7
  23. data/vendor/assets/javascripts/twbs/bootstrap.js +12 -12
  24. data/vendor/assets/stylesheets/fontawesome/_icons.scss +97 -3
  25. data/vendor/assets/stylesheets/fontawesome/_mixins.scss +2 -2
  26. data/vendor/assets/stylesheets/fontawesome/_spinning.scss +8 -6
  27. data/vendor/assets/stylesheets/fontawesome/_variables.scss +464 -330
  28. data/vendor/assets/stylesheets/fontawesome/font-awesome.scss +1 -1
  29. data/vendor/assets/stylesheets/twbs/bootstrap/_alerts.scss +4 -3
  30. data/vendor/assets/stylesheets/twbs/bootstrap/_badges.scss +13 -11
  31. data/vendor/assets/stylesheets/twbs/bootstrap/_button-groups.scss +16 -2
  32. data/vendor/assets/stylesheets/twbs/bootstrap/_buttons.scss +0 -2
  33. data/vendor/assets/stylesheets/twbs/bootstrap/_carousel.scss +15 -4
  34. data/vendor/assets/stylesheets/twbs/bootstrap/_code.scss +6 -1
  35. data/vendor/assets/stylesheets/twbs/bootstrap/_component-animations.scss +10 -4
  36. data/vendor/assets/stylesheets/twbs/bootstrap/_dropdowns.scss +2 -0
  37. data/vendor/assets/stylesheets/twbs/bootstrap/_forms.scss +144 -42
  38. data/vendor/assets/stylesheets/twbs/bootstrap/_input-groups.scss +6 -2
  39. data/vendor/assets/stylesheets/twbs/bootstrap/_jumbotron.scss +4 -0
  40. data/vendor/assets/stylesheets/twbs/bootstrap/_labels.scss +11 -9
  41. data/vendor/assets/stylesheets/twbs/bootstrap/_list-group.scss +22 -1
  42. data/vendor/assets/stylesheets/twbs/bootstrap/_mixins.scss +35 -943
  43. data/vendor/assets/stylesheets/twbs/bootstrap/_modals.scss +18 -7
  44. data/vendor/assets/stylesheets/twbs/bootstrap/_navbar.scss +41 -2
  45. data/vendor/assets/stylesheets/twbs/bootstrap/_navs.scss +1 -1
  46. data/vendor/assets/stylesheets/twbs/bootstrap/_normalize.scss +21 -19
  47. data/vendor/assets/stylesheets/twbs/bootstrap/_panels.scss +8 -6
  48. data/vendor/assets/stylesheets/twbs/bootstrap/_popovers.scss +1 -1
  49. data/vendor/assets/stylesheets/twbs/bootstrap/_progress-bars.scss +27 -2
  50. data/vendor/assets/stylesheets/twbs/bootstrap/_responsive-embed.scss +34 -0
  51. data/vendor/assets/stylesheets/twbs/bootstrap/_responsive-utilities.scss +101 -1
  52. data/vendor/assets/stylesheets/twbs/bootstrap/_scaffolding.scss +17 -1
  53. data/vendor/assets/stylesheets/twbs/bootstrap/_tables.scss +4 -4
  54. data/vendor/assets/stylesheets/twbs/bootstrap/_theme.scss +11 -0
  55. data/vendor/assets/stylesheets/twbs/bootstrap/_type.scss +32 -12
  56. data/vendor/assets/stylesheets/twbs/bootstrap/_utilities.scss +1 -0
  57. data/vendor/assets/stylesheets/twbs/bootstrap/_variables.scss +41 -24
  58. data/vendor/assets/stylesheets/twbs/bootstrap/bootstrap.scss +2 -1
  59. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_alerts.scss +14 -0
  60. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_background-variant.scss +11 -0
  61. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_border-radius.scss +18 -0
  62. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_buttons.scss +50 -0
  63. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_center-block.scss +7 -0
  64. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_clearfix.scss +22 -0
  65. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_forms.scss +84 -0
  66. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_gradients.scss +58 -0
  67. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_grid-framework.scss +81 -0
  68. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_grid.scss +122 -0
  69. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_hide-text.scss +21 -0
  70. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_image.scss +34 -0
  71. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_labels.scss +12 -0
  72. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_list-group.scss +31 -0
  73. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_nav-divider.scss +10 -0
  74. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  75. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_opacity.scss +8 -0
  76. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_pagination.scss +23 -0
  77. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_panels.scss +24 -0
  78. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_progress-bar.scss +10 -0
  79. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_reset-filter.scss +8 -0
  80. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_resize.scss +6 -0
  81. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_responsive-visibility.scss +21 -0
  82. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_size.scss +10 -0
  83. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_tab-focus.scss +9 -0
  84. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_table-row.scss +28 -0
  85. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_text-emphasis.scss +11 -0
  86. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_text-overflow.scss +8 -0
  87. data/vendor/assets/stylesheets/twbs/bootstrap/mixins/_vendor-prefixes.scss +219 -0
  88. metadata +32 -2
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: modal.js v3.1.1
2
+ * Bootstrap: modal.js v3.2.0
3
3
  * http://getbootstrap.com/javascript/#modals
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -14,10 +14,12 @@
14
14
  // ======================
15
15
 
16
16
  var Modal = function (element, options) {
17
- this.options = options
18
- this.$element = $(element)
19
- this.$backdrop =
20
- this.isShown = null
17
+ this.options = options
18
+ this.$body = $(document.body)
19
+ this.$element = $(element)
20
+ this.$backdrop =
21
+ this.isShown = null
22
+ this.scrollbarWidth = 0
21
23
 
22
24
  if (this.options.remote) {
23
25
  this.$element
@@ -28,6 +30,8 @@
28
30
  }
29
31
  }
30
32
 
33
+ Modal.VERSION = '3.2.0'
34
+
31
35
  Modal.DEFAULTS = {
32
36
  backdrop: true,
33
37
  keyboard: true,
@@ -35,7 +39,7 @@
35
39
  }
36
40
 
37
41
  Modal.prototype.toggle = function (_relatedTarget) {
38
- return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
42
+ return this.isShown ? this.hide() : this.show(_relatedTarget)
39
43
  }
40
44
 
41
45
  Modal.prototype.show = function (_relatedTarget) {
@@ -48,6 +52,10 @@
48
52
 
49
53
  this.isShown = true
50
54
 
55
+ this.checkScrollbar()
56
+ this.$body.addClass('modal-open')
57
+
58
+ this.setScrollbar()
51
59
  this.escape()
52
60
 
53
61
  this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
@@ -56,7 +64,7 @@
56
64
  var transition = $.support.transition && that.$element.hasClass('fade')
57
65
 
58
66
  if (!that.$element.parent().length) {
59
- that.$element.appendTo(document.body) // don't move modals dom position
67
+ that.$element.appendTo(that.$body) // don't move modals dom position
60
68
  }
61
69
 
62
70
  that.$element
@@ -77,11 +85,11 @@
77
85
 
78
86
  transition ?
79
87
  that.$element.find('.modal-dialog') // wait for modal to slide in
80
- .one($.support.transition.end, function () {
81
- that.$element.focus().trigger(e)
88
+ .one('bsTransitionEnd', function () {
89
+ that.$element.trigger('focus').trigger(e)
82
90
  })
83
91
  .emulateTransitionEnd(300) :
84
- that.$element.focus().trigger(e)
92
+ that.$element.trigger('focus').trigger(e)
85
93
  })
86
94
  }
87
95
 
@@ -96,6 +104,9 @@
96
104
 
97
105
  this.isShown = false
98
106
 
107
+ this.$body.removeClass('modal-open')
108
+
109
+ this.resetScrollbar()
99
110
  this.escape()
100
111
 
101
112
  $(document).off('focusin.bs.modal')
@@ -107,7 +118,7 @@
107
118
 
108
119
  $.support.transition && this.$element.hasClass('fade') ?
109
120
  this.$element
110
- .one($.support.transition.end, $.proxy(this.hideModal, this))
121
+ .one('bsTransitionEnd', $.proxy(this.hideModal, this))
111
122
  .emulateTransitionEnd(300) :
112
123
  this.hideModal()
113
124
  }
@@ -117,7 +128,7 @@
117
128
  .off('focusin.bs.modal') // guard against infinite focus loop
118
129
  .on('focusin.bs.modal', $.proxy(function (e) {
119
130
  if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
120
- this.$element.focus()
131
+ this.$element.trigger('focus')
121
132
  }
122
133
  }, this))
123
134
  }
@@ -136,7 +147,6 @@
136
147
  var that = this
137
148
  this.$element.hide()
138
149
  this.backdrop(function () {
139
- that.removeBackdrop()
140
150
  that.$element.trigger('hidden.bs.modal')
141
151
  })
142
152
  }
@@ -147,13 +157,14 @@
147
157
  }
148
158
 
149
159
  Modal.prototype.backdrop = function (callback) {
160
+ var that = this
150
161
  var animate = this.$element.hasClass('fade') ? 'fade' : ''
151
162
 
152
163
  if (this.isShown && this.options.backdrop) {
153
164
  var doAnimate = $.support.transition && animate
154
165
 
155
166
  this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
156
- .appendTo(document.body)
167
+ .appendTo(this.$body)
157
168
 
158
169
  this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
159
170
  if (e.target !== e.currentTarget) return
@@ -170,31 +181,56 @@
170
181
 
171
182
  doAnimate ?
172
183
  this.$backdrop
173
- .one($.support.transition.end, callback)
184
+ .one('bsTransitionEnd', callback)
174
185
  .emulateTransitionEnd(150) :
175
186
  callback()
176
187
 
177
188
  } else if (!this.isShown && this.$backdrop) {
178
189
  this.$backdrop.removeClass('in')
179
190
 
191
+ var callbackRemove = function () {
192
+ that.removeBackdrop()
193
+ callback && callback()
194
+ }
180
195
  $.support.transition && this.$element.hasClass('fade') ?
181
196
  this.$backdrop
182
- .one($.support.transition.end, callback)
197
+ .one('bsTransitionEnd', callbackRemove)
183
198
  .emulateTransitionEnd(150) :
184
- callback()
199
+ callbackRemove()
185
200
 
186
201
  } else if (callback) {
187
202
  callback()
188
203
  }
189
204
  }
190
205
 
206
+ Modal.prototype.checkScrollbar = function () {
207
+ if (document.body.clientWidth >= window.innerWidth) return
208
+ this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
209
+ }
210
+
211
+ Modal.prototype.setScrollbar = function () {
212
+ var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
213
+ if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
214
+ }
215
+
216
+ Modal.prototype.resetScrollbar = function () {
217
+ this.$body.css('padding-right', '')
218
+ }
219
+
220
+ Modal.prototype.measureScrollbar = function () { // thx walsh
221
+ var scrollDiv = document.createElement('div')
222
+ scrollDiv.className = 'modal-scrollbar-measure'
223
+ this.$body.append(scrollDiv)
224
+ var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
225
+ this.$body[0].removeChild(scrollDiv)
226
+ return scrollbarWidth
227
+ }
228
+
191
229
 
192
230
  // MODAL PLUGIN DEFINITION
193
231
  // =======================
194
232
 
195
- var old = $.fn.modal
196
-
197
- $.fn.modal = function (option, _relatedTarget) {
233
+ function Plugin(option, _relatedTarget) {
198
234
  return this.each(function () {
199
235
  var $this = $(this)
200
236
  var data = $this.data('bs.modal')
@@ -206,6 +242,9 @@
206
242
  })
207
243
  }
208
244
 
245
+ var old = $.fn.modal
246
+
247
+ $.fn.modal = Plugin
209
248
  $.fn.modal.Constructor = Modal
210
249
 
211
250
 
@@ -224,20 +263,18 @@
224
263
  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
225
264
  var $this = $(this)
226
265
  var href = $this.attr('href')
227
- var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
266
+ var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
228
267
  var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
229
268
 
230
269
  if ($this.is('a')) e.preventDefault()
231
270
 
232
- $target
233
- .modal(option, this)
234
- .one('hide', function () {
235
- $this.is(':visible') && $this.focus()
271
+ $target.one('show.bs.modal', function (showEvent) {
272
+ if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
273
+ $target.one('hidden.bs.modal', function () {
274
+ $this.is(':visible') && $this.trigger('focus')
236
275
  })
276
+ })
277
+ Plugin.call($target, option, this)
237
278
  })
238
279
 
239
- $(document)
240
- .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
241
- .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
242
-
243
280
  }(jQuery);
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: popover.js v3.1.1
2
+ * Bootstrap: popover.js v3.2.0
3
3
  * http://getbootstrap.com/javascript/#popovers
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -19,11 +19,13 @@
19
19
 
20
20
  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
21
21
 
22
+ Popover.VERSION = '3.2.0'
23
+
22
24
  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
23
25
  placement: 'right',
24
26
  trigger: 'click',
25
27
  content: '',
26
- template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
28
+ template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
27
29
  })
28
30
 
29
31
 
@@ -44,7 +46,7 @@
44
46
  var content = this.getContent()
45
47
 
46
48
  $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
47
- $tip.find('.popover-content')[ // we use append for html objects to maintain js events
49
+ $tip.find('.popover-content').empty()[ // we use append for html objects to maintain js events
48
50
  this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
49
51
  ](content)
50
52
 
@@ -70,7 +72,7 @@
70
72
  }
71
73
 
72
74
  Popover.prototype.arrow = function () {
73
- return this.$arrow = this.$arrow || this.tip().find('.arrow')
75
+ return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
74
76
  }
75
77
 
76
78
  Popover.prototype.tip = function () {
@@ -82,9 +84,7 @@
82
84
  // POPOVER PLUGIN DEFINITION
83
85
  // =========================
84
86
 
85
- var old = $.fn.popover
86
-
87
- $.fn.popover = function (option) {
87
+ function Plugin(option) {
88
88
  return this.each(function () {
89
89
  var $this = $(this)
90
90
  var data = $this.data('bs.popover')
@@ -96,6 +96,9 @@
96
96
  })
97
97
  }
98
98
 
99
+ var old = $.fn.popover
100
+
101
+ $.fn.popover = Plugin
99
102
  $.fn.popover.Constructor = Popover
100
103
 
101
104
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: scrollspy.js v3.1.1
2
+ * Bootstrap: scrollspy.js v3.2.0
3
3
  * http://getbootstrap.com/javascript/#scrollspy
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -14,36 +14,48 @@
14
14
  // ==========================
15
15
 
16
16
  function ScrollSpy(element, options) {
17
- var href
18
17
  var process = $.proxy(this.process, this)
19
18
 
20
- this.$element = $(element).is('body') ? $(window) : $(element)
21
19
  this.$body = $('body')
22
- this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process)
20
+ this.$scrollElement = $(element).is('body') ? $(window) : $(element)
23
21
  this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
24
- this.selector = (this.options.target
25
- || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
26
- || '') + ' .nav li > a'
27
- this.offsets = $([])
28
- this.targets = $([])
22
+ this.selector = (this.options.target || '') + ' .nav li > a'
23
+ this.offsets = []
24
+ this.targets = []
29
25
  this.activeTarget = null
26
+ this.scrollHeight = 0
30
27
 
28
+ this.$scrollElement.on('scroll.bs.scrollspy', process)
31
29
  this.refresh()
32
30
  this.process()
33
31
  }
34
32
 
33
+ ScrollSpy.VERSION = '3.2.0'
34
+
35
35
  ScrollSpy.DEFAULTS = {
36
36
  offset: 10
37
37
  }
38
38
 
39
+ ScrollSpy.prototype.getScrollHeight = function () {
40
+ return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
41
+ }
42
+
39
43
  ScrollSpy.prototype.refresh = function () {
40
- var offsetMethod = this.$element[0] == window ? 'offset' : 'position'
44
+ var offsetMethod = 'offset'
45
+ var offsetBase = 0
41
46
 
42
- this.offsets = $([])
43
- this.targets = $([])
47
+ if (!$.isWindow(this.$scrollElement[0])) {
48
+ offsetMethod = 'position'
49
+ offsetBase = this.$scrollElement.scrollTop()
50
+ }
51
+
52
+ this.offsets = []
53
+ this.targets = []
54
+ this.scrollHeight = this.getScrollHeight()
44
55
 
45
56
  var self = this
46
- var $targets = this.$body
57
+
58
+ this.$body
47
59
  .find(this.selector)
48
60
  .map(function () {
49
61
  var $el = $(this)
@@ -53,7 +65,7 @@
53
65
  return ($href
54
66
  && $href.length
55
67
  && $href.is(':visible')
56
- && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
68
+ && [[$href[offsetMethod]().top + offsetBase, href]]) || null
57
69
  })
58
70
  .sort(function (a, b) { return a[0] - b[0] })
59
71
  .each(function () {
@@ -64,15 +76,19 @@
64
76
 
65
77
  ScrollSpy.prototype.process = function () {
66
78
  var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
67
- var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
68
- var maxScroll = scrollHeight - this.$scrollElement.height()
79
+ var scrollHeight = this.getScrollHeight()
80
+ var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
69
81
  var offsets = this.offsets
70
82
  var targets = this.targets
71
83
  var activeTarget = this.activeTarget
72
84
  var i
73
85
 
86
+ if (this.scrollHeight != scrollHeight) {
87
+ this.refresh()
88
+ }
89
+
74
90
  if (scrollTop >= maxScroll) {
75
- return activeTarget != (i = targets.last()[0]) && this.activate(i)
91
+ return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
76
92
  }
77
93
 
78
94
  if (activeTarget && scrollTop <= offsets[0]) {
@@ -83,7 +99,7 @@
83
99
  activeTarget != targets[i]
84
100
  && scrollTop >= offsets[i]
85
101
  && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
86
- && this.activate( targets[i] )
102
+ && this.activate(targets[i])
87
103
  }
88
104
  }
89
105
 
@@ -115,9 +131,7 @@
115
131
  // SCROLLSPY PLUGIN DEFINITION
116
132
  // ===========================
117
133
 
118
- var old = $.fn.scrollspy
119
-
120
- $.fn.scrollspy = function (option) {
134
+ function Plugin(option) {
121
135
  return this.each(function () {
122
136
  var $this = $(this)
123
137
  var data = $this.data('bs.scrollspy')
@@ -128,6 +142,9 @@
128
142
  })
129
143
  }
130
144
 
145
+ var old = $.fn.scrollspy
146
+
147
+ $.fn.scrollspy = Plugin
131
148
  $.fn.scrollspy.Constructor = ScrollSpy
132
149
 
133
150
 
@@ -143,10 +160,10 @@
143
160
  // SCROLLSPY DATA-API
144
161
  // ==================
145
162
 
146
- $(window).on('load', function () {
163
+ $(window).on('load.bs.scrollspy.data-api', function () {
147
164
  $('[data-spy="scroll"]').each(function () {
148
165
  var $spy = $(this)
149
- $spy.scrollspy($spy.data())
166
+ Plugin.call($spy, $spy.data())
150
167
  })
151
168
  })
152
169
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tab.js v3.1.1
2
+ * Bootstrap: tab.js v3.2.0
3
3
  * http://getbootstrap.com/javascript/#tabs
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -17,6 +17,8 @@
17
17
  this.element = $(element)
18
18
  }
19
19
 
20
+ Tab.VERSION = '3.2.0'
21
+
20
22
  Tab.prototype.show = function () {
21
23
  var $this = this.element
22
24
  var $ul = $this.closest('ul:not(.dropdown-menu)')
@@ -24,7 +26,7 @@
24
26
 
25
27
  if (!selector) {
26
28
  selector = $this.attr('href')
27
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
29
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
28
30
  }
29
31
 
30
32
  if ($this.parent('li').hasClass('active')) return
@@ -40,7 +42,7 @@
40
42
 
41
43
  var $target = $(selector)
42
44
 
43
- this.activate($this.parent('li'), $ul)
45
+ this.activate($this.closest('li'), $ul)
44
46
  this.activate($target, $target.parent(), function () {
45
47
  $this.trigger({
46
48
  type: 'shown.bs.tab',
@@ -79,7 +81,7 @@
79
81
 
80
82
  transition ?
81
83
  $active
82
- .one($.support.transition.end, next)
84
+ .one('bsTransitionEnd', next)
83
85
  .emulateTransitionEnd(150) :
84
86
  next()
85
87
 
@@ -90,9 +92,7 @@
90
92
  // TAB PLUGIN DEFINITION
91
93
  // =====================
92
94
 
93
- var old = $.fn.tab
94
-
95
- $.fn.tab = function ( option ) {
95
+ function Plugin(option) {
96
96
  return this.each(function () {
97
97
  var $this = $(this)
98
98
  var data = $this.data('bs.tab')
@@ -102,6 +102,9 @@
102
102
  })
103
103
  }
104
104
 
105
+ var old = $.fn.tab
106
+
107
+ $.fn.tab = Plugin
105
108
  $.fn.tab.Constructor = Tab
106
109
 
107
110
 
@@ -119,7 +122,7 @@
119
122
 
120
123
  $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
121
124
  e.preventDefault()
122
- $(this).tab('show')
125
+ Plugin.call($(this), 'show')
123
126
  })
124
127
 
125
128
  }(jQuery);