twitter-bootstrap-rails 2.0.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 twitter-bootstrap-rails might be problematic. Click here for more details.

Files changed (58) hide show
  1. data/README.md +22 -2
  2. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +2 -0
  3. data/lib/generators/bootstrap/layout/templates/layout.html.erb +6 -12
  4. data/lib/generators/bootstrap/layout/templates/layout.html.haml +0 -5
  5. data/lib/generators/bootstrap/layout/templates/layout.html.slim +1 -6
  6. data/lib/generators/bootstrap/themed/templates/_form.html.erb +1 -1
  7. data/lib/generators/bootstrap/themed/templates/_form.html.haml +13 -11
  8. data/lib/generators/bootstrap/themed/templates/edit.html.haml +1 -2
  9. data/lib/generators/bootstrap/themed/templates/edit.html.slim +1 -1
  10. data/lib/generators/bootstrap/themed/templates/index.html.haml +3 -3
  11. data/lib/generators/bootstrap/themed/templates/new.html.haml +1 -1
  12. data/lib/generators/bootstrap/themed/templates/new.html.slim +1 -1
  13. data/lib/generators/bootstrap/themed/templates/show.html.haml +1 -1
  14. data/lib/generators/bootstrap/themed/themed_generator.rb +4 -4
  15. data/lib/twitter/bootstrap/rails/engine.rb +9 -3
  16. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +25 -0
  17. data/lib/twitter/bootstrap/rails/version.rb +1 -1
  18. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +1 -1
  19. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +4 -2
  20. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +7 -3
  21. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +4 -2
  22. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +1 -1
  23. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +1 -1
  24. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +1 -1
  25. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +1 -1
  26. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +1 -1
  27. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +2 -2
  28. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +1 -1
  29. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +7 -7
  30. data/vendor/toolkit/twitter/bootstrap/alerts.less +2 -14
  31. data/vendor/toolkit/twitter/bootstrap/badges.less +36 -0
  32. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +2 -1
  33. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +2 -0
  34. data/vendor/toolkit/twitter/bootstrap/button-groups.less +31 -7
  35. data/vendor/toolkit/twitter/bootstrap/buttons.less +17 -13
  36. data/vendor/toolkit/twitter/bootstrap/code.less +2 -2
  37. data/vendor/toolkit/twitter/bootstrap/component-animations.less +4 -2
  38. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +45 -27
  39. data/vendor/toolkit/twitter/bootstrap/forms.less +78 -45
  40. data/vendor/toolkit/twitter/bootstrap/grid.less +2 -5
  41. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +3 -1
  42. data/vendor/toolkit/twitter/bootstrap/labels.less +8 -2
  43. data/vendor/toolkit/twitter/bootstrap/mixins.less +190 -166
  44. data/vendor/toolkit/twitter/bootstrap/modals.less +12 -5
  45. data/vendor/toolkit/twitter/bootstrap/navbar.less +77 -35
  46. data/vendor/toolkit/twitter/bootstrap/navs.less +19 -9
  47. data/vendor/toolkit/twitter/bootstrap/pager.less +6 -0
  48. data/vendor/toolkit/twitter/bootstrap/pagination.less +1 -0
  49. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +15 -1
  50. data/vendor/toolkit/twitter/bootstrap/reset.less +1 -1
  51. data/vendor/toolkit/twitter/bootstrap/responsive.less +72 -28
  52. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +4 -4
  53. data/vendor/toolkit/twitter/bootstrap/sprites.less +1 -1
  54. data/vendor/toolkit/twitter/bootstrap/tables.less +26 -17
  55. data/vendor/toolkit/twitter/bootstrap/type.less +22 -6
  56. data/vendor/toolkit/twitter/bootstrap/variables.less +100 -6
  57. data/vendor/toolkit/twitter/bootstrap/wells.less +10 -0
  58. metadata +13 -11
data/README.md CHANGED
@@ -6,6 +6,19 @@ twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 A
6
6
  [![Build Status](https://secure.travis-ci.org/seyhunak/twitter-bootstrap-rails.png)](http://travis-ci.org/seyhunak/twitter-bootstrap-rails)
7
7
  [![Dependency Status](https://gemnasium.com/seyhunak/twitter-bootstrap-rails.png)](https://gemnasium.com/seyhunak/twitter-bootstrap-rails)
8
8
 
9
+
10
+ ## Screencasts
11
+ #### Installing twitter-bootstrap-rails, generators, usage and more
12
+ Screencasts provided by Railscasts (Ryan Bates)
13
+
14
+ [Twitter Bootstrap Basics](http://railscasts.com/episodes/328-twitter-bootstrap-basics "Twitter Bootstrap Basics")
15
+ in this episode you will learn how to include Twitter Bootstrap into Rails application with the twitter-bootstrap-rails gem.
16
+
17
+ [More on Twitter Bootstrap](http://railscasts.com/episodes/329-more-on-twitter-bootstrap "More on Twitter Bootstrap")
18
+ in this episode continues on the Twitter Bootstrap project showing how to display flash messages, add form validations with SimpleForm, customize layout with variables, and switch to using Sass.
19
+ (Note: This episode is pro episode)
20
+
21
+
9
22
  ## Installing Gem
10
23
 
11
24
  Include Bootstrap in Gemfile;
@@ -147,6 +160,7 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
147
160
  <li>Fixes and release 2.0.0</li>
148
161
  <li>Updated to v2.0.1, versioned v2.0.1.0</li>
149
162
  <li>Released gem v.2.0.3</li>
163
+ <li>Released gem v.2.0.4</li>
150
164
  </ul>
151
165
 
152
166
 
@@ -163,6 +177,7 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
163
177
  <li>Masakuni Kato</li>
164
178
  <li>Gudleik Rasch</li>
165
179
  <li>Thomas Volkmar Worm</li>
180
+ <li>Thiago Almeida</li>
166
181
  </ul>
167
182
 
168
183
 
@@ -172,16 +187,21 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
172
187
  <li>Markup Helpers (alert, tabs, pagination, breadcrumbs etc.)</li>
173
188
  </ul>
174
189
 
190
+
175
191
  ## Credits
176
192
  Seyhun Akyürek - seyhunak [at] gmail com
177
193
 
178
- [Visit My Blog](http://www.seyhunakyurek.com/ "Visit My Blog")
179
-
180
194
  [Add Me On Twitter](http://twitter.com/seyhunak "Add Me On Twitter")
195
+
181
196
  [Add Me On Linkedin](http://tr.linkedin.com/in/seyhunak "Add Me On Linkedin")
197
+
182
198
  [Add Me On Facebook](https://www.facebook.com/seyhunak "Add Me On Facebook")
199
+
183
200
  [Add Me On Google+](http://plus.ly/seyhunak "Add Me On Google+")
184
201
 
202
+ [Visit My Blog](http://www.seyhunakyurek.com/ "Visit My Blog")
203
+
204
+
185
205
  ## Thanks
186
206
  Twitter Bootstrap and all twitter-bootstrap-rails contributors
187
207
  http://twitter.github.com/bootstrap
@@ -1,4 +1,6 @@
1
1
  @import "twitter/bootstrap/bootstrap";
2
+ body { padding-top: 60px; }
3
+
2
4
  @import "twitter/bootstrap/responsive";
3
5
 
4
6
  // Set the correct sprite paths
@@ -2,6 +2,7 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
6
  <title><%= app_name %></title>
6
7
  <%%= csrf_meta_tags %>
7
8
 
@@ -11,11 +12,6 @@
11
12
  <![endif]-->
12
13
 
13
14
  <!-- Le styles -->
14
- <style>
15
- body {
16
- padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
17
- }
18
- </style>
19
15
  <%%= stylesheet_link_tag "application", :media => "all" %>
20
16
 
21
17
  <!-- Le fav and touch icons -->
@@ -70,10 +66,9 @@
70
66
  <%- else -%>
71
67
  <div class="content">
72
68
  <div class="row">
73
- <div class="span9">
74
- <%%= yield %>
75
- </div>
76
- <div class="span1">&nbsp;</div>
69
+ <div class="span9">
70
+ <%%= yield %>
71
+ </div>
77
72
  <div class="span3">
78
73
  <div class="well sidebar-nav">
79
74
  <h3>Sidebar</h3>
@@ -83,9 +78,8 @@
83
78
  <li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
84
79
  <%- end -%>
85
80
  </ul>
86
- </div>
87
- </div>
88
- </div>
81
+ </div><!--/.well -->
82
+ </div><!--/span-->
89
83
  </div><!--/row-->
90
84
  </div><!--/content-->
91
85
  <%- end -%>
@@ -8,10 +8,6 @@
8
8
  /[if lt IE 9]
9
9
  = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
10
10
  / Le styles
11
- :css
12
- body {
13
- padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
14
- }
15
11
  = stylesheet_link_tag "application", :media => "all"
16
12
  / Le fav and touch icons
17
13
  %link{:href => "images/favicon.ico", :rel => "shortcut icon"}/
@@ -57,7 +53,6 @@
57
53
  .row
58
54
  .span9
59
55
  = yield
60
- .span1 &nbsp;
61
56
  .span3
62
57
  .well.sidebar-nav
63
58
  %h3 Sidebar
@@ -9,11 +9,7 @@ html lang="en"
9
9
  /[if lt IE 9]
10
10
  = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
11
11
  /! Le styles
12
- css:
13
- body {
14
- padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
15
- }
16
- = stylesheet_link_tag "application", :media => "all"
12
+ = stylesheet_link_tag "application", :media => "all"
17
13
  / Le fav and touch icons
18
14
  link href="images/favicon.ico" rel="shortcut icon"
19
15
  link href="images/apple-touch-icon.png" rel="apple-touch-icon"
@@ -58,7 +54,6 @@ html lang="en"
58
54
  .row
59
55
  .span9
60
56
  = yield
61
- .span1 &nbsp;
62
57
  .span3
63
58
  .well.sidebar-nav
64
59
  h3 Sidebar
@@ -1,4 +1,4 @@
1
- <%%= form_for @<%= model_name.underscore %>, :html => { :class => 'form-horizontal' } do |f| %>
1
+ <%%= form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f| %>
2
2
  <fieldset>
3
3
  <legend><%%= controller.action_name.capitalize %> <%= model_name.titleize %></legend>
4
4
 
@@ -1,11 +1,13 @@
1
- <%- columns.each do |column| -%>
2
- .clearfix
3
- = f.label :<%= column.name %>, t("activerecord.attributes.<%= model_name.underscore %>.<%= column.name %>", :default => "<%= column.name.humanize %>"), :class => :label
4
- .input
5
- = f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>'
6
- <%- end -%>
7
-
8
- .form-actions
9
- %button{:class => "btn primary", :type => "submit"} Save
10
- or
11
- = link_to "Cancel", <%= controller_routing_path %>_path
1
+ %fieldset
2
+ %legend
3
+ = controller.action_name.capitalize
4
+ <%= model_name.titleize %>
5
+ <%- columns.each do |column| -%>
6
+ .control-group
7
+ = f.label :<%= column.name %>, :class => 'control-label'
8
+ .controls
9
+ = f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>'
10
+ <%- end -%>
11
+ .form-actions
12
+ = f.submit nil, :class => 'btn btn-primary'
13
+ = link_to "Cancel", <%= controller_routing_path %>_path, :class => 'btn'
@@ -1,3 +1,2 @@
1
- = form_for @<%= model_name.underscore %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => "edit_<%= model_name.underscore %>", :id => "edit_<%= model_name.underscore %>" } do |f|
2
- %input{:name => "_method", :type => "hidden", :value =>"put"}
1
+ = form_for @<%= resource_name %>, :html => { :class => "edit_<%= resource_name %> form-horizontal", :id => "edit_<%= resource_name %>" } do |f|
3
2
  = render :partial => "form", :locals => {:f => f}
@@ -1,3 +1,3 @@
1
- = form_for @<%= model_name.underscore %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => "edit_<%= model_name.underscore %>", :id => "edit_<%= model_name.underscore %>" } do |f|
1
+ = form_for @<%= resource_name %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => "edit_<%= resource_name %>", :id => "edit_<%= resource_name %>" } do |f|
2
2
  input name="_method" type="hidden" value="put"
3
3
  = render :partial => "form", :locals => {:f => f}
@@ -18,8 +18,8 @@
18
18
  <%- end -%>
19
19
  %td= <%= resource_name %>.created_at
20
20
  %td
21
- = link_to "Show", <%= singular_controller_routing_path %>_path(<%= resource_name %>)
22
- = link_to "Edit", edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>)
23
- = link_to "Destroy", <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}"
21
+ = link_to "Show", <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini'
22
+ = link_to "Edit", edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini'
23
+ = link_to "Destroy", <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}", :class => 'btn btn-mini btn-danger'
24
24
 
25
25
  = link_to "New", new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary'
@@ -1,2 +1,2 @@
1
- = form_for @<%= model_name.underscore %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f|
1
+ = form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f|
2
2
  = render :partial => "form", :locals => {:f => f}
@@ -1,2 +1,2 @@
1
- = form_for @<%= model_name.underscore %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f|
1
+ = form_for @<%= resource_name %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f|
2
2
  = render :partial => "form", :locals => {:f => f}
@@ -6,4 +6,4 @@
6
6
  .form-actions
7
7
  = link_to "Back", <%= controller_routing_path %>_path, :class => 'btn'
8
8
  = link_to "Edit", edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => 'btn'
9
- = link_to "Delete", <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :method => "delete", :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}", :class => 'btn'
9
+ = link_to "Delete", <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :method => "delete", :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}", :class => 'btn btn-danger'
@@ -24,7 +24,7 @@ module Bootstrap
24
24
  def initialize_views_variables
25
25
  @base_name, @controller_class_path, @controller_file_path, @controller_class_nesting, @controller_class_nesting_depth = extract_modules(controller_path)
26
26
  @controller_routing_path = @controller_file_path.gsub(/\//, '_')
27
- @model_name = @base_name.singularize unless @model_name
27
+ @model_name = @controller_class_nesting + "::#{@base_name.singularize}" unless @model_name
28
28
  @model_name = @model_name.camelize
29
29
  end
30
30
 
@@ -45,7 +45,7 @@ module Bootstrap
45
45
  end
46
46
 
47
47
  def resource_name
48
- @model_name.underscore
48
+ @model_name.demodulize.underscore
49
49
  end
50
50
 
51
51
  def plural_resource_name
@@ -55,9 +55,9 @@ module Bootstrap
55
55
  def columns
56
56
  begin
57
57
  excluded_column_names = %w[id created_at updated_at]
58
- Kernel.const_get(@model_name).columns.reject{|c| excluded_column_names.include?(c.name) }.collect{|c| ::Rails::Generators::GeneratedAttribute.new(c.name, c.type)}
58
+ @model_name.constantize.columns.reject{|c| excluded_column_names.include?(c.name) }.collect{|c| ::Rails::Generators::GeneratedAttribute.new(c.name, c.type)}
59
59
  rescue NoMethodError
60
- Kernel.const_get(@model_name).fields.collect{|c| c[1]}.reject{|c| excluded_column_names.include?(c.name) }.collect{|c| ::Rails::Generators::GeneratedAttribute.new(c.name, c.type.to_s)}
60
+ @model_name.constantize.fields.collect{|c| c[1]}.reject{|c| excluded_column_names.include?(c.name) }.collect{|c| ::Rails::Generators::GeneratedAttribute.new(c.name, c.type.to_s)}
61
61
  end
62
62
  end
63
63
 
@@ -1,16 +1,22 @@
1
1
  require 'rails'
2
+ require File.dirname(__FILE__) + '/twitter-bootstrap-breadcrumbs.rb'
2
3
 
3
4
  module Twitter
4
5
  module Bootstrap
5
6
  module Rails
6
7
  class Engine < ::Rails::Engine
7
-
8
+
8
9
  initializer 'twitter-bootstrap-rails.setup',
9
10
  :after => 'less-rails.after.load_config_initializers',
10
11
  :group => :all do |app|
11
- app.config.less.paths << File.join(config.root, 'vendor', 'toolkit')
12
- end
12
+ app.config.less.paths << File.join(config.root, 'vendor', 'toolkit')
13
+ end
13
14
 
15
+ initializer 'twitter-bootstrap-rails.setup_helpers' do |app|
16
+ app.config.to_prepare do
17
+ ActionController::Base.send(:include, BreadCrumbs)
18
+ end
19
+ end
14
20
  end
15
21
  end
16
22
  end
@@ -0,0 +1,25 @@
1
+ module Twitter
2
+ module Bootstrap
3
+ module BreadCrumbs
4
+ def self.included(base)
5
+ base.extend(ClassMethods)
6
+ end
7
+
8
+ module ClassMethods
9
+ def add_breadcrumb name, url, options={}
10
+ before_filter options do |controller|
11
+ controller.send :add_breadcrumb, name, url
12
+ end
13
+ end
14
+ end
15
+
16
+ protected
17
+
18
+ def add_breadcrumb name, url = ''
19
+ @breadcrumbs ||= []
20
+ url = eval(url) if url =~ /_path|_url|@/
21
+ @breadcrumbs << {name => name, url => url}
22
+ end
23
+ end
24
+ end
25
+ end
@@ -1,7 +1,7 @@
1
1
  module Twitter
2
2
  module Bootstrap
3
3
  module Rails
4
- VERSION = "2.0.3"
4
+ VERSION = "2.0.4"
5
5
  end
6
6
  end
7
7
  end
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-alert.js v2.0.1
2
+ * bootstrap-alert.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#alerts
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-button.js v2.0.1
2
+ * bootstrap-button.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#buttons
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -91,7 +91,9 @@
91
91
 
92
92
  $(function () {
93
93
  $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
94
- $(e.currentTarget).button('toggle')
94
+ var $btn = $(e.target)
95
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
96
+ $btn.button('toggle')
95
97
  })
96
98
  })
97
99
 
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-carousel.js v2.0.1
2
+ * bootstrap-carousel.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#carousel
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -29,6 +29,9 @@
29
29
  this.$element = $(element)
30
30
  this.options = $.extend({}, $.fn.carousel.defaults, options)
31
31
  this.options.slide && this.slide(this.options.slide)
32
+ this.options.pause == 'hover' && this.$element
33
+ .on('mouseenter', $.proxy(this.pause, this))
34
+ .on('mouseleave', $.proxy(this.cycle, this))
32
35
  }
33
36
 
34
37
  Carousel.prototype = {
@@ -83,14 +86,14 @@
83
86
  , fallback = type == 'next' ? 'first' : 'last'
84
87
  , that = this
85
88
 
86
- if (!$next.length) return
87
-
88
89
  this.sliding = true
89
90
 
90
91
  isCycling && this.pause()
91
92
 
92
93
  $next = $next.length ? $next : this.$element.find('.item')[fallback]()
93
94
 
95
+ if ($next.hasClass('active')) return
96
+
94
97
  if (!$.support.transition && this.$element.hasClass('slide')) {
95
98
  this.$element.trigger('slide')
96
99
  $active.removeClass('active')
@@ -136,6 +139,7 @@
136
139
 
137
140
  $.fn.carousel.defaults = {
138
141
  interval: 5000
142
+ , pause: 'hover'
139
143
  }
140
144
 
141
145
  $.fn.carousel.Constructor = Carousel
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-collapse.js v2.0.1
2
+ * bootstrap-collapse.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#collapse
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -74,7 +74,9 @@
74
74
  [dimension](size || 'auto')
75
75
  [0].offsetWidth
76
76
 
77
- this.$element.addClass('collapse')
77
+ this.$element[size ? 'addClass' : 'removeClass']('collapse')
78
+
79
+ return this
78
80
  }
79
81
 
80
82
  , transition: function ( method, startEvent, completeEvent ) {
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-dropdown.js v2.0.1
2
+ * bootstrap-dropdown.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#dropdowns
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* =========================================================
2
- * bootstrap-modal.js v2.0.1
2
+ * bootstrap-modal.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#modals
4
4
  * =========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ===========================================================
2
- * bootstrap-popover.js v2.0.1
2
+ * bootstrap-popover.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#popovers
4
4
  * ===========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-scrollspy.js v2.0.1
2
+ * bootstrap-scrollspy.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#scrollspy
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================
2
- * bootstrap-tab.js v2.0.1
2
+ * bootstrap-tab.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#tabs
4
4
  * ========================================================
5
5
  * Copyright 2012 Twitter, Inc.