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
@@ -14,14 +14,14 @@
14
14
 
15
15
  <% attributes.each do |attribute| -%>
16
16
  <div class="form-group">
17
- <%%= f.label :<%= attribute.name %>, :class => "col-lg-2 control-label" %>
18
- <div class="col-lg-10">
17
+ <%%= f.label :<%= attribute.name %>, :class => "col-sm-2 control-label" %>
18
+ <div class="col-sm-10">
19
19
  <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :class => "form-control" %>
20
20
  </div>
21
21
  </div>
22
22
  <% end -%>
23
23
  <div class="form-group">
24
- <div class="col-lg-offset-2 col-lg-10">
24
+ <div class="col-sm-offset-2 col-sm-10">
25
25
  <%%= f.submit :class => "btn btn-primary" %>
26
26
  </div>
27
27
  </div>
@@ -10,10 +10,10 @@
10
10
 
11
11
  <% for attribute in attributes -%>
12
12
  .form-group
13
- = f.label :<%= attribute.name %>, :class => 'col-lg-2 control-label'
14
- .col-lg-10
13
+ = f.label :<%= attribute.name %>, :class => 'col-sm-2 control-label'
14
+ .col-sm-10
15
15
  = f.<%= attribute.field_type %> :<%= attribute.name %>, :class => 'form-control'
16
16
  <% end -%>
17
17
  .form-group
18
- .col-lg-offset-2.col-lg-10
18
+ .col-sm-offset-2.col-sm-10
19
19
  = f.submit :class => 'btn btn-primary'
@@ -9,10 +9,10 @@
9
9
  li= msg
10
10
  <%- attributes.each do |attribute| -%>
11
11
  .form-group
12
- = f.label :<%= attribute.name %>, :class => "col-lg-2 control-label"
13
- .col-lg-10
12
+ = f.label :<%= attribute.name %>, :class => "col-sm-2 control-label"
13
+ .col-sm-10
14
14
  = f.<%= attribute.field_type %> :<%= attribute.name %>, :class => "form-control"
15
15
  <%- end -%>
16
16
  .form-group
17
- .col-lg-offset-2.col-lg-10
17
+ .col-sm-offset-2.col-sm-10
18
18
  = f.submit :class => "btn btn-primary"
@@ -21,6 +21,7 @@
21
21
  <div class="container">
22
22
  <div class="navbar-header">
23
23
  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
24
+ <span class="sr-only">Toggle navigation</span>
24
25
  <span class="icon-bar"></span>
25
26
  <span class="icon-bar"></span>
26
27
  <span class="icon-bar"></span>
@@ -19,6 +19,7 @@
19
19
  .container
20
20
  .navbar-header
21
21
  %button.navbar-toggle{:type => "button", :data => {:toggle => "collapse", :target => ".navbar-collapse"} }
22
+ %span.sr-only Toggle navigation
22
23
  %span.icon-bar
23
24
  %span.icon-bar
24
25
  %span.icon-bar
@@ -18,6 +18,8 @@ html
18
18
  .container
19
19
  .navbar-header
20
20
  button.navbar-toggle type="button" data-toggle="collapse" data-target=".navbar-collapse"
21
+ span.sr-only
22
+ | Toggle navigation
21
23
  span.icon-bar
22
24
  span.icon-bar
23
25
  span.icon-bar
@@ -64,6 +64,9 @@ Supported template engines:
64
64
 
65
65
  * ERB
66
66
  * Haml
67
+ * Slim
68
+
69
+ ##### Haml
67
70
 
68
71
  Add the dependency on your Gemfile:
69
72
 
@@ -73,6 +76,17 @@ And then run:
73
76
 
74
77
  rails generate bootstrap:install --template-engine=haml
75
78
 
79
+ ##### Slim
80
+
81
+ Add the dependency on your Gemfile:
82
+
83
+ gem 'slim-rails'
84
+
85
+ And then run:
86
+
87
+ rails generate bootstrap:install --template-engine=slim
88
+
89
+
76
90
  #### Stylesheet engines
77
91
 
78
92
  Supported stylesheet engines:
@@ -1,24 +1,14 @@
1
1
  /* ========================================================================
2
- * Bootstrap: affix.js v3.0.2
2
+ * Bootstrap: affix.js v3.1.0
3
3
  * http://getbootstrap.com/javascript/#affix
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
  // AFFIX CLASS DEFINITION
24
14
  // ======================
@@ -29,9 +19,10 @@
29
19
  .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
30
20
  .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
31
21
 
32
- this.$element = $(element)
33
- this.affixed =
34
- this.unpin = null
22
+ this.$element = $(element)
23
+ this.affixed =
24
+ this.unpin =
25
+ this.pinnedOffset = null
35
26
 
36
27
  this.checkPosition()
37
28
  }
@@ -42,6 +33,14 @@
42
33
  offset: 0
43
34
  }
44
35
 
36
+ Affix.prototype.getPinnedOffset = function () {
37
+ if (this.pinnedOffset) return this.pinnedOffset
38
+ this.$element.removeClass(Affix.RESET).addClass('affix')
39
+ var scrollTop = this.$window.scrollTop()
40
+ var position = this.$element.offset()
41
+ return (this.pinnedOffset = position.top - scrollTop)
42
+ }
43
+
45
44
  Affix.prototype.checkPositionWithEventLoop = function () {
46
45
  setTimeout($.proxy(this.checkPosition, this), 1)
47
46
  }
@@ -56,9 +55,11 @@
56
55
  var offsetTop = offset.top
57
56
  var offsetBottom = offset.bottom
58
57
 
58
+ if (this.affixed == 'top') position.top += scrollTop
59
+
59
60
  if (typeof offset != 'object') offsetBottom = offsetTop = offset
60
- if (typeof offsetTop == 'function') offsetTop = offset.top()
61
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
61
+ if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
62
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
62
63
 
63
64
  var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
64
65
  offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
@@ -67,13 +68,23 @@
67
68
  if (this.affixed === affix) return
68
69
  if (this.unpin) this.$element.css('top', '')
69
70
 
71
+ var affixType = 'affix' + (affix ? '-' + affix : '')
72
+ var e = $.Event(affixType + '.bs.affix')
73
+
74
+ this.$element.trigger(e)
75
+
76
+ if (e.isDefaultPrevented()) return
77
+
70
78
  this.affixed = affix
71
- this.unpin = affix == 'bottom' ? position.top - scrollTop : null
79
+ this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
72
80
 
73
- this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
81
+ this.$element
82
+ .removeClass(Affix.RESET)
83
+ .addClass(affixType)
84
+ .trigger($.Event(affixType.replace('affix', 'affixed')))
74
85
 
75
86
  if (affix == 'bottom') {
76
- this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })
87
+ this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
77
88
  }
78
89
  }
79
90
 
@@ -1,24 +1,14 @@
1
1
  /* ========================================================================
2
- * Bootstrap: alert.js v3.0.2
2
+ * Bootstrap: alert.js v3.1.0
3
3
  * http://getbootstrap.com/javascript/#alerts
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
  // ALERT CLASS DEFINITION
24
14
  // ======================
@@ -1,31 +1,22 @@
1
1
  /* ========================================================================
2
- * Bootstrap: button.js v3.0.2
2
+ * Bootstrap: button.js v3.1.0
3
3
  * http://getbootstrap.com/javascript/#buttons
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
  // BUTTON PUBLIC CLASS DEFINITION
24
14
  // ==============================
25
15
 
26
16
  var Button = function (element, options) {
27
- this.$element = $(element)
28
- this.options = $.extend({}, Button.DEFAULTS, options)
17
+ this.$element = $(element)
18
+ this.options = $.extend({}, Button.DEFAULTS, options)
19
+ this.isLoading = false
29
20
  }
30
21
 
31
22
  Button.DEFAULTS = {
@@ -45,24 +36,31 @@
45
36
  $el[val](data[state] || this.options[state])
46
37
 
47
38
  // push to event loop to allow forms to submit
48
- setTimeout(function () {
49
- state == 'loadingText' ?
50
- $el.addClass(d).attr(d, d) :
51
- $el.removeClass(d).removeAttr(d);
52
- }, 0)
39
+ setTimeout($.proxy(function () {
40
+ if (state == 'loadingText') {
41
+ this.isLoading = true
42
+ $el.addClass(d).attr(d, d)
43
+ } else if (this.isLoading) {
44
+ this.isLoading = false
45
+ $el.removeClass(d).removeAttr(d)
46
+ }
47
+ }, this), 0)
53
48
  }
54
49
 
55
50
  Button.prototype.toggle = function () {
51
+ var changed = true
56
52
  var $parent = this.$element.closest('[data-toggle="buttons"]')
57
53
 
58
54
  if ($parent.length) {
59
55
  var $input = this.$element.find('input')
60
- .prop('checked', !this.$element.hasClass('active'))
61
- .trigger('change')
62
- if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
56
+ if ($input.prop('type') == 'radio') {
57
+ if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
58
+ else $parent.find('.active').removeClass('active')
59
+ }
60
+ if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
63
61
  }
64
62
 
65
- this.$element.toggleClass('active')
63
+ if (changed) this.$element.toggleClass('active')
66
64
  }
67
65
 
68
66
 
@@ -1,24 +1,14 @@
1
1
  /* ========================================================================
2
- * Bootstrap: carousel.js v3.0.2
2
+ * Bootstrap: carousel.js v3.1.0
3
3
  * http://getbootstrap.com/javascript/#carousel
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
  // CAROUSEL CLASS DEFINITION
24
14
  // =========================
@@ -39,9 +29,9 @@
39
29
  }
40
30
 
41
31
  Carousel.DEFAULTS = {
42
- interval: 5000
43
- , pause: 'hover'
44
- , wrap: true
32
+ interval: 5000,
33
+ pause: 'hover',
34
+ wrap: true
45
35
  }
46
36
 
47
37
  Carousel.prototype.cycle = function (e) {
@@ -69,7 +59,7 @@
69
59
 
70
60
  if (pos > (this.$items.length - 1) || pos < 0) return
71
61
 
72
- if (this.sliding) return this.$element.one('slid', function () { that.to(pos) })
62
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
73
63
  if (activeIndex == pos) return this.pause().cycle()
74
64
 
75
65
  return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@@ -78,7 +68,7 @@
78
68
  Carousel.prototype.pause = function (e) {
79
69
  e || (this.paused = true)
80
70
 
81
- if (this.$element.find('.next, .prev').length && $.support.transition.end) {
71
+ if (this.$element.find('.next, .prev').length && $.support.transition) {
82
72
  this.$element.trigger($.support.transition.end)
83
73
  this.cycle(true)
84
74
  }
@@ -111,25 +101,25 @@
111
101
  $next = this.$element.find('.item')[fallback]()
112
102
  }
113
103
 
114
- this.sliding = true
115
-
116
- isCycling && this.pause()
104
+ if ($next.hasClass('active')) return this.sliding = false
117
105
 
118
106
  var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
107
+ this.$element.trigger(e)
108
+ if (e.isDefaultPrevented()) return
119
109
 
120
- if ($next.hasClass('active')) return
110
+ this.sliding = true
111
+
112
+ isCycling && this.pause()
121
113
 
122
114
  if (this.$indicators.length) {
123
115
  this.$indicators.find('.active').removeClass('active')
124
- this.$element.one('slid', function () {
116
+ this.$element.one('slid.bs.carousel', function () {
125
117
  var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
126
118
  $nextIndicator && $nextIndicator.addClass('active')
127
119
  })
128
120
  }
129
121
 
130
122
  if ($.support.transition && this.$element.hasClass('slide')) {
131
- this.$element.trigger(e)
132
- if (e.isDefaultPrevented()) return
133
123
  $next.addClass(type)
134
124
  $next[0].offsetWidth // force reflow
135
125
  $active.addClass(direction)
@@ -139,16 +129,14 @@
139
129
  $next.removeClass([type, direction].join(' ')).addClass('active')
140
130
  $active.removeClass(['active', direction].join(' '))
141
131
  that.sliding = false
142
- setTimeout(function () { that.$element.trigger('slid') }, 0)
132
+ setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
143
133
  })
144
- .emulateTransitionEnd(600)
134
+ .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
145
135
  } else {
146
- this.$element.trigger(e)
147
- if (e.isDefaultPrevented()) return
148
136
  $active.removeClass('active')
149
137
  $next.addClass('active')
150
138
  this.sliding = false
151
- this.$element.trigger('slid')
139
+ this.$element.trigger('slid.bs.carousel')
152
140
  }
153
141
 
154
142
  isCycling && this.cycle()
@@ -1,24 +1,14 @@
1
1
  /* ========================================================================
2
- * Bootstrap: collapse.js v3.0.2
2
+ * Bootstrap: collapse.js v3.1.0
3
3
  * http://getbootstrap.com/javascript/#collapse
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
  // COLLAPSE PUBLIC CLASS DEFINITION
24
14
  // ================================
@@ -69,7 +59,7 @@
69
59
  var complete = function () {
70
60
  this.$element
71
61
  .removeClass('collapsing')
72
- .addClass('in')
62
+ .addClass('collapse in')
73
63
  [dimension]('auto')
74
64
  this.transitioning = 0
75
65
  this.$element.trigger('shown.bs.collapse')
@@ -137,6 +127,7 @@
137
127
  var data = $this.data('bs.collapse')
138
128
  var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
139
129
 
130
+ if (!data && options.toggle && option == 'show') option = !option
140
131
  if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
141
132
  if (typeof option == 'string') data[option]()
142
133
  })