bootstrap-generators 2.1.1 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/README.md +48 -3
  2. data/lib/bootstrap/generators/version.rb +1 -1
  3. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.css.scss +25 -2
  4. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +23 -1
  5. data/lib/generators/bootstrap/install/templates/assets/stylesheets/fluid.css.scss +1 -1
  6. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.scss +1 -1
  7. data/vendor/assets/javascripts/bootstrap-affix.js +4 -2
  8. data/vendor/assets/javascripts/bootstrap-alert.js +2 -4
  9. data/vendor/assets/javascripts/bootstrap-button.js +5 -7
  10. data/vendor/assets/javascripts/bootstrap-carousel.js +12 -12
  11. data/vendor/assets/javascripts/bootstrap-collapse.js +9 -11
  12. data/vendor/assets/javascripts/bootstrap-dropdown.js +9 -11
  13. data/vendor/assets/javascripts/bootstrap-modal.js +20 -25
  14. data/vendor/assets/javascripts/bootstrap-popover.js +1 -1
  15. data/vendor/assets/javascripts/bootstrap-scrollspy.js +1 -1
  16. data/vendor/assets/javascripts/bootstrap-tab.js +5 -7
  17. data/vendor/assets/javascripts/bootstrap-tooltip.js +12 -11
  18. data/vendor/assets/javascripts/bootstrap-transition.js +5 -5
  19. data/vendor/assets/javascripts/bootstrap-typeahead.js +19 -9
  20. data/vendor/twitter/bootstrap/less/accordion.less +1 -1
  21. data/vendor/twitter/bootstrap/less/alerts.less +1 -1
  22. data/vendor/twitter/bootstrap/less/bootstrap.less +2 -1
  23. data/vendor/twitter/bootstrap/less/breadcrumbs.less +1 -1
  24. data/vendor/twitter/bootstrap/less/button-groups.less +5 -8
  25. data/vendor/twitter/bootstrap/less/buttons.less +17 -16
  26. data/vendor/twitter/bootstrap/less/code.less +1 -1
  27. data/vendor/twitter/bootstrap/less/dropdowns.less +32 -5
  28. data/vendor/twitter/bootstrap/less/forms.less +47 -14
  29. data/vendor/twitter/bootstrap/less/hero-unit.less +6 -5
  30. data/vendor/twitter/bootstrap/less/labels-badges.less +4 -2
  31. data/vendor/twitter/bootstrap/less/media.less +55 -0
  32. data/vendor/twitter/bootstrap/less/mixins.less +15 -10
  33. data/vendor/twitter/bootstrap/less/modals.less +7 -11
  34. data/vendor/twitter/bootstrap/less/navbar.less +6 -6
  35. data/vendor/twitter/bootstrap/less/navs.less +3 -2
  36. data/vendor/twitter/bootstrap/less/pager.less +10 -9
  37. data/vendor/twitter/bootstrap/less/pagination.less +69 -12
  38. data/vendor/twitter/bootstrap/less/popovers.less +2 -2
  39. data/vendor/twitter/bootstrap/less/progress-bars.less +2 -2
  40. data/vendor/twitter/bootstrap/less/reset.less +5 -4
  41. data/vendor/twitter/bootstrap/less/responsive-767px-max.less +20 -1
  42. data/vendor/twitter/bootstrap/less/responsive-navbar.less +12 -4
  43. data/vendor/twitter/bootstrap/less/responsive.less +1 -1
  44. data/vendor/twitter/bootstrap/less/sprites.less +3 -3
  45. data/vendor/twitter/bootstrap/less/tables.less +20 -29
  46. data/vendor/twitter/bootstrap/less/thumbnails.less +1 -1
  47. data/vendor/twitter/bootstrap/less/tooltip.less +1 -1
  48. data/vendor/twitter/bootstrap/less/type.less +30 -24
  49. data/vendor/twitter/bootstrap/less/variables.less +23 -1
  50. data/vendor/twitter/bootstrap/less/wells.less +3 -3
  51. data/vendor/twitter/bootstrap/sass/_accordion.scss +1 -1
  52. data/vendor/twitter/bootstrap/sass/_alerts.scss +1 -1
  53. data/vendor/twitter/bootstrap/sass/_breadcrumbs.scss +1 -1
  54. data/vendor/twitter/bootstrap/sass/_button-groups.scss +5 -8
  55. data/vendor/twitter/bootstrap/sass/_buttons.scss +18 -17
  56. data/vendor/twitter/bootstrap/sass/_code.scss +1 -1
  57. data/vendor/twitter/bootstrap/sass/_component-animations.scss +2 -2
  58. data/vendor/twitter/bootstrap/sass/_dropdowns.scss +32 -5
  59. data/vendor/twitter/bootstrap/sass/_forms.scss +46 -14
  60. data/vendor/twitter/bootstrap/sass/_hero-unit.scss +6 -5
  61. data/vendor/twitter/bootstrap/sass/_labels-badges.scss +4 -2
  62. data/vendor/twitter/bootstrap/sass/_media.scss +55 -0
  63. data/vendor/twitter/bootstrap/sass/_mixins.scss +12 -7
  64. data/vendor/twitter/bootstrap/sass/_modals.scss +8 -11
  65. data/vendor/twitter/bootstrap/sass/_navbar.scss +8 -10
  66. data/vendor/twitter/bootstrap/sass/_navs.scss +5 -4
  67. data/vendor/twitter/bootstrap/sass/_pager.scss +10 -9
  68. data/vendor/twitter/bootstrap/sass/_pagination.scss +69 -12
  69. data/vendor/twitter/bootstrap/sass/_popovers.scss +2 -2
  70. data/vendor/twitter/bootstrap/sass/_progress-bars.scss +2 -2
  71. data/vendor/twitter/bootstrap/sass/_reset.scss +6 -4
  72. data/vendor/twitter/bootstrap/sass/_responsive-767px-max.scss +20 -1
  73. data/vendor/twitter/bootstrap/sass/_responsive-navbar.scss +12 -4
  74. data/vendor/twitter/bootstrap/sass/_scaffolding.scss +1 -3
  75. data/vendor/twitter/bootstrap/sass/_sprites.scss +3 -3
  76. data/vendor/twitter/bootstrap/sass/_tables.scss +12 -8
  77. data/vendor/twitter/bootstrap/sass/_thumbnails.scss +1 -1
  78. data/vendor/twitter/bootstrap/sass/_tooltip.scss +1 -1
  79. data/vendor/twitter/bootstrap/sass/_type.scss +30 -24
  80. data/vendor/twitter/bootstrap/sass/_variables.scss +25 -2
  81. data/vendor/twitter/bootstrap/sass/_wells.scss +3 -3
  82. data/vendor/twitter/bootstrap/sass/bootstrap.scss +2 -1
  83. data/vendor/twitter/bootstrap/sass/responsive.scss +1 -1
  84. metadata +12 -10
data/README.md CHANGED
@@ -205,6 +205,24 @@ LESS version:
205
205
  @headingsFontWeight: bold; // instead of browser default, bold
206
206
  @headingsColor: inherit; // empty to use BS default, @textColor
207
207
 
208
+
209
+ // Component sizing
210
+ // -------------------------
211
+ // Based on 14px font-size and 20px line-height
212
+
213
+ @fontSizeLarge: @baseFontSize * 1.25; // ~18px
214
+ @fontSizeSmall: @baseFontSize * 0.85; // ~12px
215
+ @fontSizeMini: @baseFontSize * 0.75; // ~11px
216
+
217
+ @paddingLarge: 11px 19px; // 44px
218
+ @paddingSmall: 2px 10px; // 26px
219
+ @paddingMini: 1px 6px; // 24px
220
+
221
+ @baseBorderRadius: 4px;
222
+ @borderRadiusLarge: 6px;
223
+ @borderRadiusSmall: 3px;
224
+
225
+
208
226
  // Tables
209
227
  // -------------------------
210
228
  @tableBackground: transparent; // overall background-color
@@ -241,9 +259,11 @@ LESS version:
241
259
  // -------------------------
242
260
  @inputBackground: @white;
243
261
  @inputBorder: #ccc;
244
- @inputBorderRadius: 3px;
262
+ @inputBorderRadius: @baseBorderRadius;
245
263
  @inputDisabledBackground: @grayLighter;
246
264
  @formActionsBackground: #f5f5f5;
265
+ @inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border
266
+
247
267
 
248
268
  // Dropdowns
249
269
  // -------------------------
@@ -264,6 +284,7 @@ LESS version:
264
284
  // COMPONENT VARIABLES
265
285
  // --------------------------------------------------
266
286
 
287
+
267
288
  // Z-index master list
268
289
  // -------------------------
269
290
  // Used for a bird's eye view of components dependent on the z-axis
@@ -305,6 +326,7 @@ LESS version:
305
326
  // Navbar
306
327
  // -------------------------
307
328
  @navbarCollapseWidth: 979px;
329
+ @navbarCollapseDesktopWidth: @navbarCollapseWidth + 1;
308
330
 
309
331
  @navbarHeight: 40px;
310
332
  @navbarBackgroundHighlight: #ffffff;
@@ -487,6 +509,24 @@ SCSS version:
487
509
  $headingsFontWeight: bold !default; // instead of browser default, bold
488
510
  $headingsColor: inherit !default; // empty to use BS default, $textColor
489
511
 
512
+
513
+ // Component sizing
514
+ // -------------------------
515
+ // Based on 14px font-size and 20px line-height
516
+
517
+ $fontSizeLarge: $baseFontSize * 1.25; // ~18px
518
+ $fontSizeSmall: $baseFontSize * 0.85; // ~12px
519
+ $fontSizeMini: $baseFontSize * 0.75; // ~11px
520
+
521
+ $paddingLarge: 11px 19px; // 44px
522
+ $paddingSmall: 2px 10px; // 26px
523
+ $paddingMini: 1px 6px; // 24px
524
+
525
+ $baseBorderRadius: 4px;
526
+ $borderRadiusLarge: 6px;
527
+ $borderRadiusSmall: 3px;
528
+
529
+
490
530
  // Tables
491
531
  // -------------------------
492
532
  $tableBackground: transparent !default; // overall background-color
@@ -523,9 +563,11 @@ SCSS version:
523
563
  // -------------------------
524
564
  $inputBackground: $white !default;
525
565
  $inputBorder: #ccc !default;
526
- $inputBorderRadius: 3px !default;
566
+ $inputBorderRadius: $baseBorderRadius !default;
527
567
  $inputDisabledBackground: $grayLighter !default;
528
568
  $formActionsBackground: #f5f5f5 !default;
569
+ $inputHeight: $baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border
570
+
529
571
 
530
572
  // Dropdowns
531
573
  // -------------------------
@@ -546,6 +588,7 @@ SCSS version:
546
588
  // COMPONENT VARIABLES
547
589
  // --------------------------------------------------
548
590
 
591
+
549
592
  // Z-index master list
550
593
  // -------------------------
551
594
  // Used for a bird's eye view of components dependent on the z-axis
@@ -587,6 +630,7 @@ SCSS version:
587
630
  // Navbar
588
631
  // -------------------------
589
632
  $navbarCollapseWidth: 979px !default;
633
+ $navbarCollapseDesktopWidth: $navbarCollapseWidth + 1;
590
634
 
591
635
  $navbarHeight: 40px !default;
592
636
  $navbarBackgroundHighlight: #ffffff !default;
@@ -598,7 +642,7 @@ SCSS version:
598
642
  $navbarLinkColorHover: $grayDark !default;
599
643
  $navbarLinkColorActive: $gray !default;
600
644
  $navbarLinkBackgroundHover: transparent !default;
601
- $navbarLinkBackgroundActive: darken($navbarBackground, 5.25%) !default;
645
+ $navbarLinkBackgroundActive: darken($navbarBackground, 5%) !default;
602
646
 
603
647
  $navbarBrandColor: $navbarLinkColor !default;
604
648
 
@@ -676,6 +720,7 @@ SCSS version:
676
720
  // GRID
677
721
  // --------------------------------------------------
678
722
 
723
+
679
724
  // Default 940px grid
680
725
  // -------------------------
681
726
  $gridColumns: 12 !default;
@@ -1,5 +1,5 @@
1
1
  module Bootstrap
2
2
  module Generators
3
- VERSION = "2.1.1"
3
+ VERSION = "2.2.1"
4
4
  end
5
5
  end
@@ -57,6 +57,24 @@ $headingsFontFamily: inherit !default; // empty to use BS default, $baseFontF
57
57
  $headingsFontWeight: bold !default; // instead of browser default, bold
58
58
  $headingsColor: inherit !default; // empty to use BS default, $textColor
59
59
 
60
+
61
+ // Component sizing
62
+ // -------------------------
63
+ // Based on 14px font-size and 20px line-height
64
+
65
+ $fontSizeLarge: $baseFontSize * 1.25; // ~18px
66
+ $fontSizeSmall: $baseFontSize * 0.85; // ~12px
67
+ $fontSizeMini: $baseFontSize * 0.75; // ~11px
68
+
69
+ $paddingLarge: 11px 19px; // 44px
70
+ $paddingSmall: 2px 10px; // 26px
71
+ $paddingMini: 1px 6px; // 24px
72
+
73
+ $baseBorderRadius: 4px;
74
+ $borderRadiusLarge: 6px;
75
+ $borderRadiusSmall: 3px;
76
+
77
+
60
78
  // Tables
61
79
  // -------------------------
62
80
  $tableBackground: transparent !default; // overall background-color
@@ -93,9 +111,11 @@ $btnInverseBackgroundHighlight: $grayDarker !default;
93
111
  // -------------------------
94
112
  $inputBackground: $white !default;
95
113
  $inputBorder: #ccc !default;
96
- $inputBorderRadius: 3px !default;
114
+ $inputBorderRadius: $baseBorderRadius !default;
97
115
  $inputDisabledBackground: $grayLighter !default;
98
116
  $formActionsBackground: #f5f5f5 !default;
117
+ $inputHeight: $baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border
118
+
99
119
 
100
120
  // Dropdowns
101
121
  // -------------------------
@@ -116,6 +136,7 @@ $dropdownLinkBackgroundHover: $dropdownLinkBackgroundActive !default;
116
136
  // COMPONENT VARIABLES
117
137
  // --------------------------------------------------
118
138
 
139
+
119
140
  // Z-index master list
120
141
  // -------------------------
121
142
  // Used for a bird's eye view of components dependent on the z-axis
@@ -157,6 +178,7 @@ $wellBackground: #f5f5f5 !default;
157
178
  // Navbar
158
179
  // -------------------------
159
180
  $navbarCollapseWidth: 979px !default;
181
+ $navbarCollapseDesktopWidth: $navbarCollapseWidth + 1;
160
182
 
161
183
  $navbarHeight: 40px !default;
162
184
  $navbarBackgroundHighlight: #ffffff !default;
@@ -168,7 +190,7 @@ $navbarLinkColor: #777 !default;
168
190
  $navbarLinkColorHover: $grayDark !default;
169
191
  $navbarLinkColorActive: $gray !default;
170
192
  $navbarLinkBackgroundHover: transparent !default;
171
- $navbarLinkBackgroundActive: darken($navbarBackground, 5.25%) !default;
193
+ $navbarLinkBackgroundActive: darken($navbarBackground, 5%) !default;
172
194
 
173
195
  $navbarBrandColor: $navbarLinkColor !default;
174
196
 
@@ -246,6 +268,7 @@ $popoverArrowOuterColor: rgba(0,0,0,.25) !default;
246
268
  // GRID
247
269
  // --------------------------------------------------
248
270
 
271
+
249
272
  // Default 940px grid
250
273
  // -------------------------
251
274
  $gridColumns: 12 !default;
@@ -57,6 +57,24 @@
57
57
  @headingsFontWeight: bold; // instead of browser default, bold
58
58
  @headingsColor: inherit; // empty to use BS default, @textColor
59
59
 
60
+
61
+ // Component sizing
62
+ // -------------------------
63
+ // Based on 14px font-size and 20px line-height
64
+
65
+ @fontSizeLarge: @baseFontSize * 1.25; // ~18px
66
+ @fontSizeSmall: @baseFontSize * 0.85; // ~12px
67
+ @fontSizeMini: @baseFontSize * 0.75; // ~11px
68
+
69
+ @paddingLarge: 11px 19px; // 44px
70
+ @paddingSmall: 2px 10px; // 26px
71
+ @paddingMini: 1px 6px; // 24px
72
+
73
+ @baseBorderRadius: 4px;
74
+ @borderRadiusLarge: 6px;
75
+ @borderRadiusSmall: 3px;
76
+
77
+
60
78
  // Tables
61
79
  // -------------------------
62
80
  @tableBackground: transparent; // overall background-color
@@ -93,9 +111,11 @@
93
111
  // -------------------------
94
112
  @inputBackground: @white;
95
113
  @inputBorder: #ccc;
96
- @inputBorderRadius: 3px;
114
+ @inputBorderRadius: @baseBorderRadius;
97
115
  @inputDisabledBackground: @grayLighter;
98
116
  @formActionsBackground: #f5f5f5;
117
+ @inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border
118
+
99
119
 
100
120
  // Dropdowns
101
121
  // -------------------------
@@ -116,6 +136,7 @@
116
136
  // COMPONENT VARIABLES
117
137
  // --------------------------------------------------
118
138
 
139
+
119
140
  // Z-index master list
120
141
  // -------------------------
121
142
  // Used for a bird's eye view of components dependent on the z-axis
@@ -157,6 +178,7 @@
157
178
  // Navbar
158
179
  // -------------------------
159
180
  @navbarCollapseWidth: 979px;
181
+ @navbarCollapseDesktopWidth: @navbarCollapseWidth + 1;
160
182
 
161
183
  @navbarHeight: 40px;
162
184
  @navbarBackgroundHighlight: #ffffff;
@@ -1,5 +1,5 @@
1
1
  @import "bootstrap-variables";
2
- @import "bootstrap";
2
+ @import "bootstrap.scss";
3
3
 
4
4
  body {
5
5
  padding-top: $navbarHeight + 20px;
@@ -1,5 +1,5 @@
1
1
  @import "bootstrap-variables";
2
- @import "bootstrap";
2
+ @import "bootstrap.scss";
3
3
 
4
4
  body {
5
5
  padding-top: $navbarHeight + 20px;
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-affix.js v2.1.1
2
+ * bootstrap-affix.js v2.2.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#affix
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -28,7 +28,9 @@
28
28
 
29
29
  var Affix = function (element, options) {
30
30
  this.options = $.extend({}, $.fn.affix.defaults, options)
31
- this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
31
+ this.$window = $(window)
32
+ .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
33
+ .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
32
34
  this.$element = $(element)
33
35
  this.checkPosition()
34
36
  }
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-alert.js v2.1.1
2
+ * bootstrap-alert.js v2.2.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#alerts
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -83,8 +83,6 @@
83
83
  /* ALERT DATA-API
84
84
  * ============== */
85
85
 
86
- $(function () {
87
- $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
88
- })
86
+ $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
89
87
 
90
88
  }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-button.js v2.1.1
2
+ * bootstrap-button.js v2.2.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#buttons
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -85,12 +85,10 @@
85
85
  /* BUTTON DATA-API
86
86
  * =============== */
87
87
 
88
- $(function () {
89
- $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
90
- var $btn = $(e.target)
91
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
92
- $btn.button('toggle')
93
- })
88
+ $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
89
+ var $btn = $(e.target)
90
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
91
+ $btn.button('toggle')
94
92
  })
95
93
 
96
94
  }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-carousel.js v2.1.1
2
+ * bootstrap-carousel.js v2.2.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#carousel
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -94,9 +94,7 @@
94
94
  , direction = type == 'next' ? 'left' : 'right'
95
95
  , fallback = type == 'next' ? 'first' : 'last'
96
96
  , that = this
97
- , e = $.Event('slide', {
98
- relatedTarget: $next[0]
99
- })
97
+ , e
100
98
 
101
99
  this.sliding = true
102
100
 
@@ -104,6 +102,10 @@
104
102
 
105
103
  $next = $next.length ? $next : this.$element.find('.item')[fallback]()
106
104
 
105
+ e = $.Event('slide', {
106
+ relatedTarget: $next[0]
107
+ })
108
+
107
109
  if ($next.hasClass('active')) return
108
110
 
109
111
  if ($.support.transition && this.$element.hasClass('slide')) {
@@ -163,14 +165,12 @@
163
165
  /* CAROUSEL DATA-API
164
166
  * ================= */
165
167
 
166
- $(function () {
167
- $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
168
- var $this = $(this), href
169
- , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
170
- , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
171
- $target.carousel(options)
172
- e.preventDefault()
173
- })
168
+ $(document).on('click.carousel.data-api', '[data-slide]', function (e) {
169
+ var $this = $(this), href
170
+ , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
171
+ , options = $.extend({}, $target.data(), $this.data())
172
+ $target.carousel(options)
173
+ e.preventDefault()
174
174
  })
175
175
 
176
176
  }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-collapse.js v2.1.1
2
+ * bootstrap-collapse.js v2.2.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#collapse
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -143,16 +143,14 @@
143
143
  /* COLLAPSIBLE DATA-API
144
144
  * ==================== */
145
145
 
146
- $(function () {
147
- $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
148
- var $this = $(this), href
149
- , target = $this.attr('data-target')
150
- || e.preventDefault()
151
- || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
152
- , option = $(target).data('collapse') ? 'toggle' : $this.data()
153
- $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
154
- $(target).collapse(option)
155
- })
146
+ $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
147
+ var $this = $(this), href
148
+ , target = $this.attr('data-target')
149
+ || e.preventDefault()
150
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
151
+ , option = $(target).data('collapse') ? 'toggle' : $this.data()
152
+ $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
153
+ $(target).collapse(option)
156
154
  })
157
155
 
158
156
  }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-dropdown.js v2.1.1
2
+ * bootstrap-dropdown.js v2.2.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#dropdowns
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -100,8 +100,9 @@
100
100
  }
101
101
 
102
102
  function clearMenus() {
103
- getParent($(toggle))
104
- .removeClass('open')
103
+ $(toggle).each(function () {
104
+ getParent($(this)).removeClass('open')
105
+ })
105
106
  }
106
107
 
107
108
  function getParent($this) {
@@ -138,13 +139,10 @@
138
139
  /* APPLY TO STANDARD DROPDOWN ELEMENTS
139
140
  * =================================== */
140
141
 
141
- $(function () {
142
- $('html')
143
- .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
144
- $('body')
145
- .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
146
- .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
147
- .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
148
- })
142
+ $(document)
143
+ .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
144
+ .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
145
+ .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
146
+ .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
149
147
 
150
148
  }(window.jQuery);