twitter-bootswatch-rails 3.1.1.1 → 3.2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/twitter/bootstrap/affix.js +19 -14
  3. data/app/assets/javascripts/twitter/bootstrap/alert.js +10 -6
  4. data/app/assets/javascripts/twitter/bootstrap/button.js +11 -8
  5. data/app/assets/javascripts/twitter/bootstrap/carousel.js +49 -31
  6. data/app/assets/javascripts/twitter/bootstrap/collapse.js +22 -22
  7. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +17 -13
  8. data/app/assets/javascripts/twitter/bootstrap/modal.js +66 -29
  9. data/app/assets/javascripts/twitter/bootstrap/popover.js +10 -7
  10. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +40 -23
  11. data/app/assets/javascripts/twitter/bootstrap/tab.js +11 -8
  12. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +115 -57
  13. data/app/assets/javascripts/twitter/bootstrap/transition.js +18 -7
  14. data/lib/generators/bootswatch/install/install_generator.rb +16 -5
  15. data/lib/generators/bootswatch/install/templates/bootstrap.less +3 -2
  16. data/lib/generators/bootswatch/install/templates/mixins.less.tt +35 -925
  17. data/lib/generators/bootswatch/install/templates/variables.less.tt +40 -23
  18. data/lib/twitter/bootswatch/rails/version.rb +1 -1
  19. data/vendor/toolkit/twitter/bootstrap/alerts.less +4 -3
  20. data/vendor/toolkit/twitter/bootstrap/badges.less +18 -18
  21. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +3 -2
  22. data/vendor/toolkit/twitter/bootstrap/button-groups.less +16 -2
  23. data/vendor/toolkit/twitter/bootstrap/buttons.less +0 -2
  24. data/vendor/toolkit/twitter/bootstrap/carousel.less +15 -4
  25. data/vendor/toolkit/twitter/bootstrap/code.less +6 -1
  26. data/vendor/toolkit/twitter/bootstrap/component-animations.less +6 -4
  27. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +2 -0
  28. data/vendor/toolkit/twitter/bootstrap/forms.less +144 -42
  29. data/vendor/toolkit/twitter/bootstrap/input-groups.less +6 -2
  30. data/vendor/toolkit/twitter/bootstrap/jumbotron.less +4 -0
  31. data/vendor/toolkit/twitter/bootstrap/labels.less +1 -1
  32. data/vendor/toolkit/twitter/bootstrap/list-group.less +22 -1
  33. data/vendor/toolkit/twitter/bootstrap/mixins.less +35 -925
  34. data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +14 -0
  35. data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +8 -0
  36. data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +18 -0
  37. data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +50 -0
  38. data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +7 -0
  39. data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +22 -0
  40. data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +81 -0
  41. data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +59 -0
  42. data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +91 -0
  43. data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +122 -0
  44. data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +21 -0
  45. data/vendor/toolkit/twitter/bootstrap/mixins/image.less +34 -0
  46. data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +12 -0
  47. data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +29 -0
  48. data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +10 -0
  49. data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +9 -0
  50. data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +8 -0
  51. data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +23 -0
  52. data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +24 -0
  53. data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +10 -0
  54. data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +8 -0
  55. data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +6 -0
  56. data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +15 -0
  57. data/vendor/toolkit/twitter/bootstrap/mixins/size.less +10 -0
  58. data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +9 -0
  59. data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +28 -0
  60. data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +8 -0
  61. data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +8 -0
  62. data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +224 -0
  63. data/vendor/toolkit/twitter/bootstrap/modals.less +18 -7
  64. data/vendor/toolkit/twitter/bootstrap/navbar.less +41 -2
  65. data/vendor/toolkit/twitter/bootstrap/navs.less +1 -1
  66. data/vendor/toolkit/twitter/bootstrap/normalize.less +21 -19
  67. data/vendor/toolkit/twitter/bootstrap/panels.less +8 -6
  68. data/vendor/toolkit/twitter/bootstrap/popovers.less +1 -1
  69. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +27 -2
  70. data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +34 -0
  71. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +103 -1
  72. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +17 -1
  73. data/vendor/toolkit/twitter/bootstrap/tables.less +4 -4
  74. data/vendor/toolkit/twitter/bootstrap/theme.less +11 -0
  75. data/vendor/toolkit/twitter/bootstrap/type.less +32 -12
  76. data/vendor/toolkit/twitter/bootstrap/utilities.less +1 -0
  77. data/vendor/toolkit/twitter/bootstrap/variables.less +40 -23
  78. metadata +35 -5
@@ -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);
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tooltip.js v3.1.1
2
+ * Bootstrap: tooltip.js v3.2.0
3
3
  * http://getbootstrap.com/javascript/#tooltip
4
4
  * Inspired by the original jQuery.tipsy by Jason Frame
5
5
  * ========================================================================
@@ -25,23 +25,30 @@
25
25
  this.init('tooltip', element, options)
26
26
  }
27
27
 
28
+ Tooltip.VERSION = '3.2.0'
29
+
28
30
  Tooltip.DEFAULTS = {
29
31
  animation: true,
30
32
  placement: 'top',
31
33
  selector: false,
32
- template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
34
+ template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
33
35
  trigger: 'hover focus',
34
36
  title: '',
35
37
  delay: 0,
36
38
  html: false,
37
- container: false
39
+ container: false,
40
+ viewport: {
41
+ selector: 'body',
42
+ padding: 0
43
+ }
38
44
  }
39
45
 
40
46
  Tooltip.prototype.init = function (type, element, options) {
41
- this.enabled = true
42
- this.type = type
43
- this.$element = $(element)
44
- this.options = this.getOptions(options)
47
+ this.enabled = true
48
+ this.type = type
49
+ this.$element = $(element)
50
+ this.options = this.getOptions(options)
51
+ this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
45
52
 
46
53
  var triggers = this.options.trigger.split(' ')
47
54
 
@@ -94,7 +101,12 @@
94
101
 
95
102
  Tooltip.prototype.enter = function (obj) {
96
103
  var self = obj instanceof this.constructor ?
97
- obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
104
+ obj : $(obj.currentTarget).data('bs.' + this.type)
105
+
106
+ if (!self) {
107
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
108
+ $(obj.currentTarget).data('bs.' + this.type, self)
109
+ }
98
110
 
99
111
  clearTimeout(self.timeout)
100
112
 
@@ -109,7 +121,12 @@
109
121
 
110
122
  Tooltip.prototype.leave = function (obj) {
111
123
  var self = obj instanceof this.constructor ?
112
- obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
124
+ obj : $(obj.currentTarget).data('bs.' + this.type)
125
+
126
+ if (!self) {
127
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
128
+ $(obj.currentTarget).data('bs.' + this.type, self)
129
+ }
113
130
 
114
131
  clearTimeout(self.timeout)
115
132
 
@@ -128,12 +145,17 @@
128
145
  if (this.hasContent() && this.enabled) {
129
146
  this.$element.trigger(e)
130
147
 
131
- if (e.isDefaultPrevented()) return
132
- var that = this;
148
+ var inDom = $.contains(document.documentElement, this.$element[0])
149
+ if (e.isDefaultPrevented() || !inDom) return
150
+ var that = this
133
151
 
134
152
  var $tip = this.tip()
135
153
 
154
+ var tipId = this.getUID(this.type)
155
+
136
156
  this.setContent()
157
+ $tip.attr('id', tipId)
158
+ this.$element.attr('aria-describedby', tipId)
137
159
 
138
160
  if (this.options.animation) $tip.addClass('fade')
139
161
 
@@ -149,6 +171,7 @@
149
171
  .detach()
150
172
  .css({ top: 0, left: 0, display: 'block' })
151
173
  .addClass(placement)
174
+ .data('bs.' + this.type, this)
152
175
 
153
176
  this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
154
177
 
@@ -157,18 +180,14 @@
157
180
  var actualHeight = $tip[0].offsetHeight
158
181
 
159
182
  if (autoPlace) {
160
- var $parent = this.$element.parent()
161
-
162
183
  var orgPlacement = placement
163
- var docScroll = document.documentElement.scrollTop || document.body.scrollTop
164
- var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
165
- var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
166
- var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left
167
-
168
- placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' :
169
- placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' :
170
- placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' :
171
- placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' :
184
+ var $parent = this.$element.parent()
185
+ var parentDim = this.getPosition($parent)
186
+
187
+ placement = placement == 'bottom' && pos.top + pos.height + actualHeight - parentDim.scroll > parentDim.height ? 'top' :
188
+ placement == 'top' && pos.top - parentDim.scroll - actualHeight < 0 ? 'bottom' :
189
+ placement == 'right' && pos.right + actualWidth > parentDim.width ? 'left' :
190
+ placement == 'left' && pos.left - actualWidth < parentDim.left ? 'right' :
172
191
  placement
173
192
 
174
193
  $tip
@@ -179,22 +198,21 @@
179
198
  var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
180
199
 
181
200
  this.applyPlacement(calculatedOffset, placement)
182
- this.hoverState = null
183
201
 
184
- var complete = function() {
202
+ var complete = function () {
185
203
  that.$element.trigger('shown.bs.' + that.type)
204
+ that.hoverState = null
186
205
  }
187
206
 
188
207
  $.support.transition && this.$tip.hasClass('fade') ?
189
208
  $tip
190
- .one($.support.transition.end, complete)
209
+ .one('bsTransitionEnd', complete)
191
210
  .emulateTransitionEnd(150) :
192
211
  complete()
193
212
  }
194
213
  }
195
214
 
196
215
  Tooltip.prototype.applyPlacement = function (offset, placement) {
197
- var replace
198
216
  var $tip = this.tip()
199
217
  var width = $tip[0].offsetWidth
200
218
  var height = $tip[0].offsetHeight
@@ -228,29 +246,20 @@
228
246
  var actualHeight = $tip[0].offsetHeight
229
247
 
230
248
  if (placement == 'top' && actualHeight != height) {
231
- replace = true
232
249
  offset.top = offset.top + height - actualHeight
233
250
  }
234
251
 
235
- if (/bottom|top/.test(placement)) {
236
- var delta = 0
252
+ var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
237
253
 
238
- if (offset.left < 0) {
239
- delta = offset.left * -2
240
- offset.left = 0
254
+ if (delta.left) offset.left += delta.left
255
+ else offset.top += delta.top
241
256
 
242
- $tip.offset(offset)
257
+ var arrowDelta = delta.left ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
258
+ var arrowPosition = delta.left ? 'left' : 'top'
259
+ var arrowOffsetPosition = delta.left ? 'offsetWidth' : 'offsetHeight'
243
260
 
244
- actualWidth = $tip[0].offsetWidth
245
- actualHeight = $tip[0].offsetHeight
246
- }
247
-
248
- this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
249
- } else {
250
- this.replaceArrow(actualHeight - height, actualHeight, 'top')
251
- }
252
-
253
- if (replace) $tip.offset(offset)
261
+ $tip.offset(offset)
262
+ this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)
254
263
  }
255
264
 
256
265
  Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
@@ -270,6 +279,8 @@
270
279
  var $tip = this.tip()
271
280
  var e = $.Event('hide.bs.' + this.type)
272
281
 
282
+ this.$element.removeAttr('aria-describedby')
283
+
273
284
  function complete() {
274
285
  if (that.hoverState != 'in') $tip.detach()
275
286
  that.$element.trigger('hidden.bs.' + that.type)
@@ -283,7 +294,7 @@
283
294
 
284
295
  $.support.transition && this.$tip.hasClass('fade') ?
285
296
  $tip
286
- .one($.support.transition.end, complete)
297
+ .one('bsTransitionEnd', complete)
287
298
  .emulateTransitionEnd(150) :
288
299
  complete()
289
300
 
@@ -294,7 +305,7 @@
294
305
 
295
306
  Tooltip.prototype.fixTitle = function () {
296
307
  var $e = this.$element
297
- if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
308
+ if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
298
309
  $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
299
310
  }
300
311
  }
@@ -303,12 +314,15 @@
303
314
  return this.getTitle()
304
315
  }
305
316
 
306
- Tooltip.prototype.getPosition = function () {
307
- var el = this.$element[0]
308
- return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
309
- width: el.offsetWidth,
310
- height: el.offsetHeight
311
- }, this.$element.offset())
317
+ Tooltip.prototype.getPosition = function ($element) {
318
+ $element = $element || this.$element
319
+ var el = $element[0]
320
+ var isBody = el.tagName == 'BODY'
321
+ return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, {
322
+ scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop(),
323
+ width: isBody ? $(window).width() : $element.outerWidth(),
324
+ height: isBody ? $(window).height() : $element.outerHeight()
325
+ }, isBody ? { top: 0, left: 0 } : $element.offset())
312
326
  }
313
327
 
314
328
  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
@@ -316,6 +330,35 @@
316
330
  placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
317
331
  placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
318
332
  /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
333
+
334
+ }
335
+
336
+ Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
337
+ var delta = { top: 0, left: 0 }
338
+ if (!this.$viewport) return delta
339
+
340
+ var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
341
+ var viewportDimensions = this.getPosition(this.$viewport)
342
+
343
+ if (/right|left/.test(placement)) {
344
+ var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
345
+ var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
346
+ if (topEdgeOffset < viewportDimensions.top) { // top overflow
347
+ delta.top = viewportDimensions.top - topEdgeOffset
348
+ } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
349
+ delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
350
+ }
351
+ } else {
352
+ var leftEdgeOffset = pos.left - viewportPadding
353
+ var rightEdgeOffset = pos.left + viewportPadding + actualWidth
354
+ if (leftEdgeOffset < viewportDimensions.left) { // left overflow
355
+ delta.left = viewportDimensions.left - leftEdgeOffset
356
+ } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
357
+ delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
358
+ }
359
+ }
360
+
361
+ return delta
319
362
  }
320
363
 
321
364
  Tooltip.prototype.getTitle = function () {
@@ -329,12 +372,18 @@
329
372
  return title
330
373
  }
331
374
 
375
+ Tooltip.prototype.getUID = function (prefix) {
376
+ do prefix += ~~(Math.random() * 1000000)
377
+ while (document.getElementById(prefix))
378
+ return prefix
379
+ }
380
+
332
381
  Tooltip.prototype.tip = function () {
333
- return this.$tip = this.$tip || $(this.options.template)
382
+ return (this.$tip = this.$tip || $(this.options.template))
334
383
  }
335
384
 
336
385
  Tooltip.prototype.arrow = function () {
337
- return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
386
+ return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
338
387
  }
339
388
 
340
389
  Tooltip.prototype.validate = function () {
@@ -358,7 +407,15 @@
358
407
  }
359
408
 
360
409
  Tooltip.prototype.toggle = function (e) {
361
- var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
410
+ var self = this
411
+ if (e) {
412
+ self = $(e.currentTarget).data('bs.' + this.type)
413
+ if (!self) {
414
+ self = new this.constructor(e.currentTarget, this.getDelegateOptions())
415
+ $(e.currentTarget).data('bs.' + this.type, self)
416
+ }
417
+ }
418
+
362
419
  self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
363
420
  }
364
421
 
@@ -371,9 +428,7 @@
371
428
  // TOOLTIP PLUGIN DEFINITION
372
429
  // =========================
373
430
 
374
- var old = $.fn.tooltip
375
-
376
- $.fn.tooltip = function (option) {
431
+ function Plugin(option) {
377
432
  return this.each(function () {
378
433
  var $this = $(this)
379
434
  var data = $this.data('bs.tooltip')
@@ -385,6 +440,9 @@
385
440
  })
386
441
  }
387
442
 
443
+ var old = $.fn.tooltip
444
+
445
+ $.fn.tooltip = Plugin
388
446
  $.fn.tooltip.Constructor = Tooltip
389
447
 
390
448
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: transition.js v3.1.1
2
+ * Bootstrap: transition.js v3.2.0
3
3
  * http://getbootstrap.com/javascript/#transitions
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -17,10 +17,10 @@
17
17
  var el = document.createElement('bootstrap')
18
18
 
19
19
  var transEndEventNames = {
20
- 'WebkitTransition' : 'webkitTransitionEnd',
21
- 'MozTransition' : 'transitionend',
22
- 'OTransition' : 'oTransitionEnd otransitionend',
23
- 'transition' : 'transitionend'
20
+ WebkitTransition : 'webkitTransitionEnd',
21
+ MozTransition : 'transitionend',
22
+ OTransition : 'oTransitionEnd otransitionend',
23
+ transition : 'transitionend'
24
24
  }
25
25
 
26
26
  for (var name in transEndEventNames) {
@@ -34,8 +34,9 @@
34
34
 
35
35
  // http://blog.alexmaccaw.com/css-transitions
36
36
  $.fn.emulateTransitionEnd = function (duration) {
37
- var called = false, $el = this
38
- $(this).one($.support.transition.end, function () { called = true })
37
+ var called = false
38
+ var $el = this
39
+ $(this).one('bsTransitionEnd', function () { called = true })
39
40
  var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
40
41
  setTimeout(callback, duration)
41
42
  return this
@@ -43,6 +44,16 @@
43
44
 
44
45
  $(function () {
45
46
  $.support.transition = transitionEnd()
47
+
48
+ if (!$.support.transition) return
49
+
50
+ $.event.special.bsTransitionEnd = {
51
+ bindType: $.support.transition.end,
52
+ delegateType: $.support.transition.end,
53
+ handle: function (e) {
54
+ if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
55
+ }
56
+ }
46
57
  })
47
58
 
48
59
  }(jQuery);
@@ -90,22 +90,33 @@ module Bootswatch
90
90
 
91
91
  bootstrap_less_imports = File.read(find_in_source_paths('bootstrap.less')).scan(Less::Rails::ImportProcessor::IMPORT_SCANNER).flatten.compact.uniq
92
92
 
93
- template 'loader.css.less.tt', File.join(stylesheets_dest_path,'loader.css.less'), {less_imports: bootstrap_less_imports, theme_name: theme_name, theme_info: theme_info}
93
+ template 'loader.css.less.tt', File.join(stylesheets_dest_path,'loader.css.less'), {
94
+ less_imports: bootstrap_less_imports,
95
+ theme_name: theme_name,
96
+ theme_info: theme_info}
94
97
 
95
98
  # now variables and mixins
96
99
 
97
- template 'variables.less.tt', File.join(stylesheets_dest_path,'variables.less'), {theme_name: theme_name, theme_info: theme_info}
100
+ template 'variables.less.tt', File.join(stylesheets_dest_path,'variables.less'), {
101
+ theme_name: theme_name,
102
+ theme_info: theme_info}
98
103
 
99
- template 'mixins.less.tt', File.join(stylesheets_dest_path,'mixins.less'), {theme_name: theme_name, theme_info: theme_info}
104
+ template 'mixins.less.tt', File.join(stylesheets_dest_path,'mixins.less'), {
105
+ theme_name: theme_name,
106
+ theme_info: theme_info}
100
107
 
101
108
  # upgrade to new extension to trigger recompile
102
109
  if File.exist?(File.join(stylesheets_dest_path,'bootswatch.less'))
103
110
  File.rename(File.join(stylesheets_dest_path,'bootswatch.less'), File.join(stylesheets_dest_path,'bootswatch.css.less'))
104
111
  end
105
112
 
106
- template 'bootswatch.css.less.tt', File.join(stylesheets_dest_path,'bootswatch.css.less'), {theme_name: theme_name, theme_info: theme_info}
113
+ template 'bootswatch.css.less.tt', File.join(stylesheets_dest_path,'bootswatch.css.less'), {
114
+ theme_name: theme_name,
115
+ theme_info: theme_info}
107
116
 
108
- template 'base.less.tt', File.join(stylesheets_dest_path,'base.less'), {theme_name: theme_name, theme_info: theme_info}
117
+ template 'base.less.tt', File.join(stylesheets_dest_path,'base.less'), {
118
+ theme_name: theme_name,
119
+ theme_info: theme_info}
109
120
 
110
121
  end
111
122