bootstrap-sass 3.1.1.1 → 3.2.0.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bootstrap-sass might be problematic. Click here for more details.

Files changed (143) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.travis.yml +6 -2
  4. data/CHANGELOG.md +19 -0
  5. data/Gemfile +5 -10
  6. data/README.md +140 -75
  7. data/Rakefile +4 -5
  8. data/{vendor/assets → assets}/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  9. data/{vendor/assets → assets}/fonts/bootstrap/glyphicons-halflings-regular.svg +0 -0
  10. data/{vendor/assets → assets}/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  11. data/{vendor/assets → assets}/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  12. data/assets/images/.keep +0 -0
  13. data/assets/javascripts/bootstrap-sprockets.js +12 -0
  14. data/assets/javascripts/bootstrap.js +2107 -0
  15. data/{vendor/assets → assets}/javascripts/bootstrap/affix.js +18 -11
  16. data/{vendor/assets → assets}/javascripts/bootstrap/alert.js +10 -6
  17. data/{vendor/assets → assets}/javascripts/bootstrap/button.js +11 -8
  18. data/{vendor/assets → assets}/javascripts/bootstrap/carousel.js +49 -31
  19. data/{vendor/assets → assets}/javascripts/bootstrap/collapse.js +19 -24
  20. data/{vendor/assets → assets}/javascripts/bootstrap/dropdown.js +9 -5
  21. data/{vendor/assets → assets}/javascripts/bootstrap/modal.js +25 -16
  22. data/{vendor/assets → assets}/javascripts/bootstrap/popover.js +9 -6
  23. data/{vendor/assets → assets}/javascripts/bootstrap/scrollspy.js +37 -21
  24. data/{vendor/assets → assets}/javascripts/bootstrap/tab.js +11 -8
  25. data/{vendor/assets → assets}/javascripts/bootstrap/tooltip.js +52 -17
  26. data/{vendor/assets → assets}/javascripts/bootstrap/transition.js +14 -3
  27. data/assets/stylesheets/_bootstrap-compass.scss +7 -0
  28. data/{vendor/assets → assets}/stylesheets/_bootstrap-mincer.scss +0 -0
  29. data/assets/stylesheets/_bootstrap-sprockets.scss +7 -0
  30. data/{vendor/assets/stylesheets/bootstrap.scss → assets/stylesheets/_bootstrap.scss} +0 -0
  31. data/{vendor/assets → assets}/stylesheets/bootstrap/_alerts.scss +4 -3
  32. data/{vendor/assets → assets}/stylesheets/bootstrap/_badges.scss +0 -0
  33. data/{vendor/assets → assets}/stylesheets/bootstrap/_breadcrumbs.scss +0 -0
  34. data/{vendor/assets → assets}/stylesheets/bootstrap/_button-groups.scss +5 -1
  35. data/{vendor/assets → assets}/stylesheets/bootstrap/_buttons.scss +0 -2
  36. data/{vendor/assets → assets}/stylesheets/bootstrap/_carousel.scss +3 -1
  37. data/{vendor/assets → assets}/stylesheets/bootstrap/_close.scss +0 -0
  38. data/{vendor/assets → assets}/stylesheets/bootstrap/_code.scss +6 -0
  39. data/{vendor/assets → assets}/stylesheets/bootstrap/_component-animations.scss +0 -0
  40. data/{vendor/assets → assets}/stylesheets/bootstrap/_dropdowns.scss +1 -0
  41. data/{vendor/assets → assets}/stylesheets/bootstrap/_forms.scss +82 -22
  42. data/{vendor/assets → assets}/stylesheets/bootstrap/_glyphicons.scss +4 -4
  43. data/{vendor/assets → assets}/stylesheets/bootstrap/_grid.scss +0 -0
  44. data/{vendor/assets → assets}/stylesheets/bootstrap/_input-groups.scss +6 -2
  45. data/{vendor/assets → assets}/stylesheets/bootstrap/_jumbotron.scss +0 -0
  46. data/{vendor/assets → assets}/stylesheets/bootstrap/_labels.scss +0 -0
  47. data/{vendor/assets → assets}/stylesheets/bootstrap/_list-group.scss +3 -1
  48. data/{vendor/assets → assets}/stylesheets/bootstrap/_media.scss +0 -0
  49. data/{vendor/assets → assets}/stylesheets/bootstrap/_mixins.scss +0 -0
  50. data/{vendor/assets → assets}/stylesheets/bootstrap/_modals.scss +7 -4
  51. data/{vendor/assets → assets}/stylesheets/bootstrap/_navbar.scss +1 -0
  52. data/{vendor/assets → assets}/stylesheets/bootstrap/_navs.scss +1 -1
  53. data/{vendor/assets → assets}/stylesheets/bootstrap/_normalize.scss +0 -0
  54. data/{vendor/assets → assets}/stylesheets/bootstrap/_pager.scss +0 -0
  55. data/{vendor/assets → assets}/stylesheets/bootstrap/_pagination.scss +0 -0
  56. data/{vendor/assets → assets}/stylesheets/bootstrap/_panels.scss +6 -3
  57. data/{vendor/assets → assets}/stylesheets/bootstrap/_popovers.scss +0 -0
  58. data/{vendor/assets → assets}/stylesheets/bootstrap/_print.scss +0 -0
  59. data/{vendor/assets → assets}/stylesheets/bootstrap/_progress-bars.scss +18 -2
  60. data/{vendor/assets → assets}/stylesheets/bootstrap/_responsive-embed.scss +0 -0
  61. data/{vendor/assets → assets}/stylesheets/bootstrap/_responsive-utilities.scss +2 -1
  62. data/{vendor/assets → assets}/stylesheets/bootstrap/_scaffolding.scss +1 -1
  63. data/{vendor/assets → assets}/stylesheets/bootstrap/_tables.scss +2 -2
  64. data/{vendor/assets → assets}/stylesheets/bootstrap/_theme.scss +11 -0
  65. data/{vendor/assets → assets}/stylesheets/bootstrap/_thumbnails.scss +0 -0
  66. data/{vendor/assets → assets}/stylesheets/bootstrap/_tooltip.scss +0 -0
  67. data/{vendor/assets → assets}/stylesheets/bootstrap/_type.scss +16 -6
  68. data/{vendor/assets → assets}/stylesheets/bootstrap/_utilities.scss +1 -0
  69. data/{vendor/assets → assets}/stylesheets/bootstrap/_variables.scss +25 -20
  70. data/{vendor/assets → assets}/stylesheets/bootstrap/_wells.scss +0 -0
  71. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_alerts.scss +0 -0
  72. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_background-variant.scss +0 -0
  73. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_border-radius.scss +0 -0
  74. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_buttons.scss +0 -0
  75. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_center-block.scss +0 -0
  76. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_clearfix.scss +0 -0
  77. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_forms.scss +0 -0
  78. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_gradients.scss +1 -1
  79. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_grid-framework.scss +2 -8
  80. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_grid.scss +3 -3
  81. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_hide-text.scss +0 -0
  82. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_image.scss +1 -0
  83. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_labels.scss +0 -0
  84. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_list-group.scss +0 -0
  85. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -0
  86. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +0 -0
  87. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_opacity.scss +0 -0
  88. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_pagination.scss +0 -0
  89. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_panels.scss +4 -0
  90. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_progress-bar.scss +2 -0
  91. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -0
  92. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  93. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -0
  94. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_size.scss +0 -0
  95. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -0
  96. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_table-row.scss +0 -0
  97. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -0
  98. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_text-overflow.scss +0 -0
  99. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +5 -10
  100. data/bootstrap-sass.gemspec +11 -6
  101. data/bower.json +22 -90
  102. data/composer.json +1 -1
  103. data/lib/bootstrap-sass.rb +3 -2
  104. data/lib/bootstrap-sass/engine.rb +4 -1
  105. data/lib/bootstrap-sass/version.rb +2 -2
  106. data/package.json +6 -1
  107. data/sache.json +5 -0
  108. data/tasks/bower.rake +6 -5
  109. data/tasks/converter.rb +3 -3
  110. data/tasks/converter/js_conversion.rb +11 -5
  111. data/tasks/converter/less_conversion.rb +30 -21
  112. data/tasks/converter/logger.rb +1 -0
  113. data/tasks/converter/network.rb +14 -16
  114. data/templates/project/{_variables.sass.erb → _bootstrap-variables.sass.erb} +0 -2
  115. data/templates/project/manifest.rb +17 -16
  116. data/templates/project/styles.sass +2 -2
  117. data/test/compass_test.rb +5 -4
  118. data/test/compilation_test.rb +10 -9
  119. data/test/dummy_node_mincer/manifest.js +2 -2
  120. data/test/dummy_rails/README.rdoc +1 -1
  121. data/test/dummy_rails/app/assets/javascripts/application.js +1 -1
  122. data/test/dummy_rails/app/assets/stylesheets/application.css.sass +2 -1
  123. data/test/dummy_rails/app/views/pages/root.html.slim +1 -1
  124. data/test/dummy_rails/config/application.rb +19 -3
  125. data/test/dummy_sass_only/compile.rb +4 -4
  126. data/test/gemfiles/sass_3_2.gemfile +1 -11
  127. data/test/gemfiles/sass_3_3.gemfile +2 -13
  128. data/test/gemfiles/sass_3_4.gemfile +7 -0
  129. data/test/gemfiles/sass_head.gemfile +2 -13
  130. data/test/node_mincer_test.rb +6 -5
  131. data/test/node_sass_test.rb +7 -6
  132. data/test/pages_test.rb +3 -3
  133. data/test/sass_test.rb +9 -6
  134. data/test/sprockets_rails_test.rb +11 -5
  135. data/test/support/dummy_rails_integration.rb +22 -0
  136. data/test/support/integration_test.rb +4 -11
  137. data/test/support/reporting.rb +17 -0
  138. data/test/test_helper.rb +22 -18
  139. data/test/test_helper_rails.rb +6 -0
  140. metadata +231 -151
  141. data/lib/bootstrap-sass/sass_functions.rb +0 -50
  142. data/vendor/assets/javascripts/bootstrap.js +0 -12
  143. data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +0 -50
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: affix.js v3.1.1
2
+ * Bootstrap: affix.js v3.2.0
3
3
  * http://getbootstrap.com/javascript/#affix
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -15,7 +15,8 @@
15
15
 
16
16
  var Affix = function (element, options) {
17
17
  this.options = $.extend({}, Affix.DEFAULTS, options)
18
- this.$window = $(window)
18
+
19
+ this.$target = $(this.options.target)
19
20
  .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
20
21
  .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
21
22
 
@@ -27,16 +28,19 @@
27
28
  this.checkPosition()
28
29
  }
29
30
 
30
- Affix.RESET = 'affix affix-top affix-bottom'
31
+ Affix.VERSION = '3.2.0'
32
+
33
+ Affix.RESET = 'affix affix-top affix-bottom'
31
34
 
32
35
  Affix.DEFAULTS = {
33
- offset: 0
36
+ offset: 0,
37
+ target: window
34
38
  }
35
39
 
36
40
  Affix.prototype.getPinnedOffset = function () {
37
41
  if (this.pinnedOffset) return this.pinnedOffset
38
42
  this.$element.removeClass(Affix.RESET).addClass('affix')
39
- var scrollTop = this.$window.scrollTop()
43
+ var scrollTop = this.$target.scrollTop()
40
44
  var position = this.$element.offset()
41
45
  return (this.pinnedOffset = position.top - scrollTop)
42
46
  }
@@ -49,7 +53,7 @@
49
53
  if (!this.$element.is(':visible')) return
50
54
 
51
55
  var scrollHeight = $(document).height()
52
- var scrollTop = this.$window.scrollTop()
56
+ var scrollTop = this.$target.scrollTop()
53
57
  var position = this.$element.offset()
54
58
  var offset = this.options.offset
55
59
  var offsetTop = offset.top
@@ -82,7 +86,9 @@
82
86
  .trigger($.Event(affixType.replace('affix', 'affixed')))
83
87
 
84
88
  if (affix == 'bottom') {
85
- this.$element.offset({ top: position.top })
89
+ this.$element.offset({
90
+ top: scrollHeight - this.$element.height() - offsetBottom
91
+ })
86
92
  }
87
93
  }
88
94
 
@@ -90,9 +96,7 @@
90
96
  // AFFIX PLUGIN DEFINITION
91
97
  // =======================
92
98
 
93
- var old = $.fn.affix
94
-
95
- $.fn.affix = function (option) {
99
+ function Plugin(option) {
96
100
  return this.each(function () {
97
101
  var $this = $(this)
98
102
  var data = $this.data('bs.affix')
@@ -103,6 +107,9 @@
103
107
  })
104
108
  }
105
109
 
110
+ var old = $.fn.affix
111
+
112
+ $.fn.affix = Plugin
106
113
  $.fn.affix.Constructor = Affix
107
114
 
108
115
 
@@ -128,7 +135,7 @@
128
135
  if (data.offsetBottom) data.offset.bottom = data.offsetBottom
129
136
  if (data.offsetTop) data.offset.top = data.offsetTop
130
137
 
131
- $spy.affix(data)
138
+ Plugin.call($spy, data)
132
139
  })
133
140
  })
134
141
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: alert.js v3.1.1
2
+ * Bootstrap: alert.js v3.2.0
3
3
  * http://getbootstrap.com/javascript/#alerts
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -18,6 +18,8 @@
18
18
  $(el).on('click', dismiss, this.close)
19
19
  }
20
20
 
21
+ Alert.VERSION = '3.2.0'
22
+
21
23
  Alert.prototype.close = function (e) {
22
24
  var $this = $(this)
23
25
  var selector = $this.attr('data-target')
@@ -42,12 +44,13 @@
42
44
  $parent.removeClass('in')
43
45
 
44
46
  function removeElement() {
45
- $parent.trigger('closed.bs.alert').remove()
47
+ // detach from parent, fire event then clean up data
48
+ $parent.detach().trigger('closed.bs.alert').remove()
46
49
  }
47
50
 
48
51
  $.support.transition && $parent.hasClass('fade') ?
49
52
  $parent
50
- .one($.support.transition.end, removeElement)
53
+ .one('bsTransitionEnd', removeElement)
51
54
  .emulateTransitionEnd(150) :
52
55
  removeElement()
53
56
  }
@@ -56,9 +59,7 @@
56
59
  // ALERT PLUGIN DEFINITION
57
60
  // =======================
58
61
 
59
- var old = $.fn.alert
60
-
61
- $.fn.alert = function (option) {
62
+ function Plugin(option) {
62
63
  return this.each(function () {
63
64
  var $this = $(this)
64
65
  var data = $this.data('bs.alert')
@@ -68,6 +69,9 @@
68
69
  })
69
70
  }
70
71
 
72
+ var old = $.fn.alert
73
+
74
+ $.fn.alert = Plugin
71
75
  $.fn.alert.Constructor = Alert
72
76
 
73
77
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: button.js v3.1.1
2
+ * Bootstrap: button.js v3.2.0
3
3
  * http://getbootstrap.com/javascript/#buttons
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -19,6 +19,8 @@
19
19
  this.isLoading = false
20
20
  }
21
21
 
22
+ Button.VERSION = '3.2.0'
23
+
22
24
  Button.DEFAULTS = {
23
25
  loadingText: 'loading...'
24
26
  }
@@ -31,9 +33,9 @@
31
33
 
32
34
  state = state + 'Text'
33
35
 
34
- if (!data.resetText) $el.data('resetText', $el[val]())
36
+ if (data.resetText == null) $el.data('resetText', $el[val]())
35
37
 
36
- $el[val](data[state] || this.options[state])
38
+ $el[val](data[state] == null ? this.options[state] : data[state])
37
39
 
38
40
  // push to event loop to allow forms to submit
39
41
  setTimeout($.proxy(function () {
@@ -67,9 +69,7 @@
67
69
  // BUTTON PLUGIN DEFINITION
68
70
  // ========================
69
71
 
70
- var old = $.fn.button
71
-
72
- $.fn.button = function (option) {
72
+ function Plugin(option) {
73
73
  return this.each(function () {
74
74
  var $this = $(this)
75
75
  var data = $this.data('bs.button')
@@ -82,6 +82,9 @@
82
82
  })
83
83
  }
84
84
 
85
+ var old = $.fn.button
86
+
87
+ $.fn.button = Plugin
85
88
  $.fn.button.Constructor = Button
86
89
 
87
90
 
@@ -97,10 +100,10 @@
97
100
  // BUTTON DATA-API
98
101
  // ===============
99
102
 
100
- $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
103
+ $(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
101
104
  var $btn = $(e.target)
102
105
  if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
103
- $btn.button('toggle')
106
+ Plugin.call($btn, 'toggle')
104
107
  e.preventDefault()
105
108
  })
106
109
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: carousel.js v3.1.1
2
+ * Bootstrap: carousel.js v3.2.0
3
3
  * http://getbootstrap.com/javascript/#carousel
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -14,7 +14,7 @@
14
14
  // =========================
15
15
 
16
16
  var Carousel = function (element, options) {
17
- this.$element = $(element)
17
+ this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this))
18
18
  this.$indicators = this.$element.find('.carousel-indicators')
19
19
  this.options = options
20
20
  this.paused =
@@ -24,17 +24,29 @@
24
24
  this.$items = null
25
25
 
26
26
  this.options.pause == 'hover' && this.$element
27
- .on('mouseenter', $.proxy(this.pause, this))
28
- .on('mouseleave', $.proxy(this.cycle, this))
27
+ .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
28
+ .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
29
29
  }
30
30
 
31
+ Carousel.VERSION = '3.2.0'
32
+
31
33
  Carousel.DEFAULTS = {
32
34
  interval: 5000,
33
35
  pause: 'hover',
34
36
  wrap: true
35
37
  }
36
38
 
37
- Carousel.prototype.cycle = function (e) {
39
+ Carousel.prototype.keydown = function (e) {
40
+ switch (e.which) {
41
+ case 37: this.prev(); break
42
+ case 39: this.next(); break
43
+ default: return
44
+ }
45
+
46
+ e.preventDefault()
47
+ }
48
+
49
+ Carousel.prototype.cycle = function (e) {
38
50
  e || (this.paused = false)
39
51
 
40
52
  this.interval && clearInterval(this.interval)
@@ -46,20 +58,18 @@
46
58
  return this
47
59
  }
48
60
 
49
- Carousel.prototype.getActiveIndex = function () {
50
- this.$active = this.$element.find('.item.active')
51
- this.$items = this.$active.parent().children('.item')
52
-
53
- return this.$items.index(this.$active)
61
+ Carousel.prototype.getItemIndex = function (item) {
62
+ this.$items = item.parent().children('.item')
63
+ return this.$items.index(item || this.$active)
54
64
  }
55
65
 
56
66
  Carousel.prototype.to = function (pos) {
57
67
  var that = this
58
- var activeIndex = this.getActiveIndex()
68
+ var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
59
69
 
60
70
  if (pos > (this.$items.length - 1) || pos < 0) return
61
71
 
62
- if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid". not a typo. past tense of "to slide".
72
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
63
73
  if (activeIndex == pos) return this.pause().cycle()
64
74
 
65
75
  return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@@ -101,11 +111,15 @@
101
111
  $next = this.$element.find('.item')[fallback]()
102
112
  }
103
113
 
104
- if ($next.hasClass('active')) return this.sliding = false
114
+ if ($next.hasClass('active')) return (this.sliding = false)
105
115
 
106
- var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
107
- this.$element.trigger(e)
108
- if (e.isDefaultPrevented()) return
116
+ var relatedTarget = $next[0]
117
+ var slideEvent = $.Event('slide.bs.carousel', {
118
+ relatedTarget: relatedTarget,
119
+ direction: direction
120
+ })
121
+ this.$element.trigger(slideEvent)
122
+ if (slideEvent.isDefaultPrevented()) return
109
123
 
110
124
  this.sliding = true
111
125
 
@@ -113,30 +127,31 @@
113
127
 
114
128
  if (this.$indicators.length) {
115
129
  this.$indicators.find('.active').removeClass('active')
116
- this.$element.one('slid.bs.carousel', function () { // yes, "slid". not a typo. past tense of "to slide".
117
- var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
118
- $nextIndicator && $nextIndicator.addClass('active')
119
- })
130
+ var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
131
+ $nextIndicator && $nextIndicator.addClass('active')
120
132
  }
121
133
 
134
+ var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
122
135
  if ($.support.transition && this.$element.hasClass('slide')) {
123
136
  $next.addClass(type)
124
137
  $next[0].offsetWidth // force reflow
125
138
  $active.addClass(direction)
126
139
  $next.addClass(direction)
127
140
  $active
128
- .one($.support.transition.end, function () {
141
+ .one('bsTransitionEnd', function () {
129
142
  $next.removeClass([type, direction].join(' ')).addClass('active')
130
143
  $active.removeClass(['active', direction].join(' '))
131
144
  that.sliding = false
132
- setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0) // yes, "slid". not a typo. past tense of "to slide".
145
+ setTimeout(function () {
146
+ that.$element.trigger(slidEvent)
147
+ }, 0)
133
148
  })
134
149
  .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
135
150
  } else {
136
151
  $active.removeClass('active')
137
152
  $next.addClass('active')
138
153
  this.sliding = false
139
- this.$element.trigger('slid.bs.carousel') // yes, "slid". not a typo. past tense of "to slide".
154
+ this.$element.trigger(slidEvent)
140
155
  }
141
156
 
142
157
  isCycling && this.cycle()
@@ -148,9 +163,7 @@
148
163
  // CAROUSEL PLUGIN DEFINITION
149
164
  // ==========================
150
165
 
151
- var old = $.fn.carousel
152
-
153
- $.fn.carousel = function (option) {
166
+ function Plugin(option) {
154
167
  return this.each(function () {
155
168
  var $this = $(this)
156
169
  var data = $this.data('bs.carousel')
@@ -164,6 +177,9 @@
164
177
  })
165
178
  }
166
179
 
180
+ var old = $.fn.carousel
181
+
182
+ $.fn.carousel = Plugin
167
183
  $.fn.carousel.Constructor = Carousel
168
184
 
169
185
 
@@ -180,15 +196,17 @@
180
196
  // =================
181
197
 
182
198
  $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
183
- var $this = $(this), href
184
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
199
+ var href
200
+ var $this = $(this)
201
+ var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
202
+ if (!$target.hasClass('carousel')) return
185
203
  var options = $.extend({}, $target.data(), $this.data())
186
204
  var slideIndex = $this.attr('data-slide-to')
187
205
  if (slideIndex) options.interval = false
188
206
 
189
- $target.carousel(options)
207
+ Plugin.call($target, options)
190
208
 
191
- if (slideIndex = $this.attr('data-slide-to')) {
209
+ if (slideIndex) {
192
210
  $target.data('bs.carousel').to(slideIndex)
193
211
  }
194
212
 
@@ -198,7 +216,7 @@
198
216
  $(window).on('load', function () {
199
217
  $('[data-ride="carousel"]').each(function () {
200
218
  var $carousel = $(this)
201
- $carousel.carousel($carousel.data())
219
+ Plugin.call($carousel, $carousel.data())
202
220
  })
203
221
  })
204
222
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: collapse.js v3.1.1
2
+ * Bootstrap: collapse.js v3.2.0
3
3
  * http://getbootstrap.com/javascript/#collapse
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -22,6 +22,8 @@
22
22
  if (this.options.toggle) this.toggle()
23
23
  }
24
24
 
25
+ Collapse.VERSION = '3.2.0'
26
+
25
27
  Collapse.DEFAULTS = {
26
28
  toggle: true
27
29
  }
@@ -43,7 +45,7 @@
43
45
  if (actives && actives.length) {
44
46
  var hasData = actives.data('bs.collapse')
45
47
  if (hasData && hasData.transitioning) return
46
- actives.collapse('hide')
48
+ Plugin.call(actives, 'hide')
47
49
  hasData || actives.data('bs.collapse', null)
48
50
  }
49
51
 
@@ -55,17 +57,13 @@
55
57
 
56
58
  this.transitioning = 1
57
59
 
58
- var complete = function (e) {
59
- if (e && e.target != this.$element[0]) {
60
- this.$element
61
- .one($.support.transition.end, $.proxy(complete, this))
62
- return
63
- }
60
+ var complete = function () {
64
61
  this.$element
65
62
  .removeClass('collapsing')
66
- .addClass('collapse in')[dimension]('auto')
63
+ .addClass('collapse in')[dimension]('')
67
64
  this.transitioning = 0
68
- this.$element.trigger('shown.bs.collapse')
65
+ this.$element
66
+ .trigger('shown.bs.collapse')
69
67
  }
70
68
 
71
69
  if (!$.support.transition) return complete.call(this)
@@ -73,7 +71,7 @@
73
71
  var scrollSize = $.camelCase(['scroll', dimension].join('-'))
74
72
 
75
73
  this.$element
76
- .one($.support.transition.end, $.proxy(complete, this))
74
+ .one('bsTransitionEnd', $.proxy(complete, this))
77
75
  .emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])
78
76
  }
79
77
 
@@ -95,12 +93,7 @@
95
93
 
96
94
  this.transitioning = 1
97
95
 
98
- var complete = function (e) {
99
- if (e && e.target != this.$element[0]) {
100
- this.$element
101
- .one($.support.transition.end, $.proxy(complete, this))
102
- return
103
- }
96
+ var complete = function () {
104
97
  this.transitioning = 0
105
98
  this.$element
106
99
  .trigger('hidden.bs.collapse')
@@ -112,7 +105,7 @@
112
105
 
113
106
  this.$element
114
107
  [dimension](0)
115
- .one($.support.transition.end, $.proxy(complete, this))
108
+ .one('bsTransitionEnd', $.proxy(complete, this))
116
109
  .emulateTransitionEnd(350)
117
110
  }
118
111
 
@@ -124,9 +117,7 @@
124
117
  // COLLAPSE PLUGIN DEFINITION
125
118
  // ==========================
126
119
 
127
- var old = $.fn.collapse
128
-
129
- $.fn.collapse = function (option) {
120
+ function Plugin(option) {
130
121
  return this.each(function () {
131
122
  var $this = $(this)
132
123
  var data = $this.data('bs.collapse')
@@ -138,6 +129,9 @@
138
129
  })
139
130
  }
140
131
 
132
+ var old = $.fn.collapse
133
+
134
+ $.fn.collapse = Plugin
141
135
  $.fn.collapse.Constructor = Collapse
142
136
 
143
137
 
@@ -154,10 +148,11 @@
154
148
  // =================
155
149
 
156
150
  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
157
- var $this = $(this), href
151
+ var href
152
+ var $this = $(this)
158
153
  var target = $this.attr('data-target')
159
154
  || e.preventDefault()
160
- || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
155
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
161
156
  var $target = $(target)
162
157
  var data = $target.data('bs.collapse')
163
158
  var option = data ? 'toggle' : $this.data()
@@ -169,7 +164,7 @@
169
164
  $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
170
165
  }
171
166
 
172
- $target.collapse(option)
167
+ Plugin.call($target, option)
173
168
  })
174
169
 
175
170
  }(jQuery);