bootstrap-generators 2.2.2 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. data/README.md +14 -14
  2. data/bootstrap-generators.gemspec +1 -1
  3. data/lib/bootstrap-generators.rb +0 -1
  4. data/lib/bootstrap/generators/version.rb +1 -1
  5. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.css.scss +9 -9
  6. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +3 -3
  7. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb +1 -1
  8. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml +1 -1
  9. data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.erb +1 -1
  10. data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.haml +1 -1
  11. data/vendor/assets/javascripts/bootstrap-affix.js +1 -1
  12. data/vendor/assets/javascripts/bootstrap-alert.js +1 -1
  13. data/vendor/assets/javascripts/bootstrap-button.js +1 -1
  14. data/vendor/assets/javascripts/bootstrap-carousel.js +32 -10
  15. data/vendor/assets/javascripts/bootstrap-collapse.js +4 -4
  16. data/vendor/assets/javascripts/bootstrap-dropdown.js +14 -10
  17. data/vendor/assets/javascripts/bootstrap-modal.js +14 -12
  18. data/vendor/assets/javascripts/bootstrap-popover.js +5 -5
  19. data/vendor/assets/javascripts/bootstrap-scrollspy.js +2 -2
  20. data/vendor/assets/javascripts/bootstrap-tab.js +1 -1
  21. data/vendor/assets/javascripts/bootstrap-tooltip.js +104 -30
  22. data/vendor/assets/javascripts/bootstrap-transition.js +1 -1
  23. data/vendor/assets/javascripts/bootstrap-typeahead.js +16 -4
  24. data/vendor/assets/stylesheets/bootstrap-responsive.css +24 -7
  25. data/vendor/assets/stylesheets/bootstrap.css +238 -119
  26. data/vendor/twitter/bootstrap/less/bootstrap.less +4 -4
  27. data/vendor/twitter/bootstrap/less/button-groups.less +4 -2
  28. data/vendor/twitter/bootstrap/less/buttons.less +8 -10
  29. data/vendor/twitter/bootstrap/less/carousel.less +34 -7
  30. data/vendor/twitter/bootstrap/less/close.less +2 -1
  31. data/vendor/twitter/bootstrap/less/dropdowns.less +16 -12
  32. data/vendor/twitter/bootstrap/less/forms.less +5 -2
  33. data/vendor/twitter/bootstrap/less/labels-badges.less +4 -2
  34. data/vendor/twitter/bootstrap/less/media.less +2 -2
  35. data/vendor/twitter/bootstrap/less/mixins.less +24 -8
  36. data/vendor/twitter/bootstrap/less/navbar.less +20 -13
  37. data/vendor/twitter/bootstrap/less/navs.less +39 -21
  38. data/vendor/twitter/bootstrap/less/pager.less +3 -1
  39. data/vendor/twitter/bootstrap/less/pagination.less +3 -1
  40. data/vendor/twitter/bootstrap/less/popovers.less +5 -1
  41. data/vendor/twitter/bootstrap/less/responsive-767px-max.less +2 -2
  42. data/vendor/twitter/bootstrap/less/responsive-navbar.less +6 -2
  43. data/vendor/twitter/bootstrap/less/responsive-utilities.less +16 -0
  44. data/vendor/twitter/bootstrap/less/responsive.less +1 -10
  45. data/vendor/twitter/bootstrap/less/scaffolding.less +2 -1
  46. data/vendor/twitter/bootstrap/less/sprites.less +7 -3
  47. data/vendor/twitter/bootstrap/less/tables.less +24 -17
  48. data/vendor/twitter/bootstrap/less/thumbnails.less +3 -2
  49. data/vendor/twitter/bootstrap/less/tooltip.less +6 -6
  50. data/vendor/twitter/bootstrap/less/type.less +19 -7
  51. data/vendor/twitter/bootstrap/less/variables.less +3 -3
  52. data/vendor/twitter/bootstrap/sass/_button-groups.scss +4 -2
  53. data/vendor/twitter/bootstrap/sass/_buttons.scss +8 -10
  54. data/vendor/twitter/bootstrap/sass/_carousel.scss +33 -6
  55. data/vendor/twitter/bootstrap/sass/_close.scss +2 -1
  56. data/vendor/twitter/bootstrap/sass/_dropdowns.scss +16 -12
  57. data/vendor/twitter/bootstrap/sass/_forms.scss +5 -2
  58. data/vendor/twitter/bootstrap/sass/_labels-badges.scss +4 -2
  59. data/vendor/twitter/bootstrap/sass/_media.scss +2 -2
  60. data/vendor/twitter/bootstrap/sass/_mixins.scss +8 -2
  61. data/vendor/twitter/bootstrap/sass/_modals.scss +3 -3
  62. data/vendor/twitter/bootstrap/sass/_navbar.scss +18 -11
  63. data/vendor/twitter/bootstrap/sass/_navs.scss +39 -21
  64. data/vendor/twitter/bootstrap/sass/_pager.scss +3 -1
  65. data/vendor/twitter/bootstrap/sass/_pagination.scss +3 -1
  66. data/vendor/twitter/bootstrap/sass/_popovers.scss +5 -1
  67. data/vendor/twitter/bootstrap/sass/_responsive-navbar.scss +6 -2
  68. data/vendor/twitter/bootstrap/sass/_responsive-utilities.scss +29 -13
  69. data/vendor/twitter/bootstrap/sass/_scaffolding.scss +2 -1
  70. data/vendor/twitter/bootstrap/sass/_sprites.scss +7 -3
  71. data/vendor/twitter/bootstrap/sass/_tables.scss +24 -17
  72. data/vendor/twitter/bootstrap/sass/_thumbnails.scss +3 -2
  73. data/vendor/twitter/bootstrap/sass/_tooltip.scss +6 -6
  74. data/vendor/twitter/bootstrap/sass/_type.scss +20 -8
  75. data/vendor/twitter/bootstrap/sass/_variables.scss +4 -4
  76. data/vendor/twitter/bootstrap/sass/bootstrap.scss +1 -1
  77. data/vendor/twitter/bootstrap/sass/responsive.scss +1 -10
  78. metadata +38 -12
data/README.md CHANGED
@@ -6,11 +6,11 @@ Bootstrap-generators provides [Twitter Bootstrap](http://twitter.github.com/boot
6
6
 
7
7
  In your Gemfile, add this line:
8
8
 
9
- gem 'bootstrap-generators', '~> 2.1'
9
+ gem 'bootstrap-generators', '~> 2.3'
10
10
 
11
11
  Or you can install from latest build:
12
12
 
13
- gem 'bootstrap-generators', '~> 2.1', :git => 'git://github.com/decioferreira/bootstrap-generators.git'
13
+ gem 'bootstrap-generators', '~> 2.3', :git => 'git://github.com/decioferreira/bootstrap-generators.git'
14
14
 
15
15
  By default Bootstrap Generators requires [SimpleForm 2.0](https://github.com/plataformatec/simple_form). Add the dependency on your Gemfile:
16
16
 
@@ -216,7 +216,7 @@ LESS version:
216
216
 
217
217
  @paddingLarge: 11px 19px; // 44px
218
218
  @paddingSmall: 2px 10px; // 26px
219
- @paddingMini: 1px 6px; // 24px
219
+ @paddingMini: 0 6px; // 22px
220
220
 
221
221
  @baseBorderRadius: 4px;
222
222
  @borderRadiusLarge: 6px;
@@ -234,7 +234,7 @@ LESS version:
234
234
  // -------------------------
235
235
  @btnBackground: @white;
236
236
  @btnBackgroundHighlight: darken(@white, 10%);
237
- @btnBorder: #bbb;
237
+ @btnBorder: #ccc;
238
238
 
239
239
  @btnPrimaryBackground: @linkColor;
240
240
  @btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 20%);
@@ -274,7 +274,7 @@ LESS version:
274
274
 
275
275
  @dropdownLinkColor: @grayDark;
276
276
  @dropdownLinkColorHover: @white;
277
- @dropdownLinkColorActive: @dropdownLinkColor;
277
+ @dropdownLinkColorActive: @white;
278
278
 
279
279
  @dropdownLinkBackgroundActive: @linkColor;
280
280
  @dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;
@@ -518,13 +518,13 @@ SCSS version:
518
518
  $fontSizeSmall: $baseFontSize * 0.85; // ~12px
519
519
  $fontSizeMini: $baseFontSize * 0.75; // ~11px
520
520
 
521
- $paddingLarge: 11px 19px; // 44px
522
- $paddingSmall: 2px 10px; // 26px
523
- $paddingMini: 1px 6px; // 24px
521
+ $paddingLarge: 11px 19px !default; // 44px
522
+ $paddingSmall: 2px 10px !default; // 26px
523
+ $paddingMini: 0px 6px !default; // 22px
524
524
 
525
- $baseBorderRadius: 4px;
526
- $borderRadiusLarge: 6px;
527
- $borderRadiusSmall: 3px;
525
+ $baseBorderRadius: 4px !default;
526
+ $borderRadiusLarge: 6px !default;
527
+ $borderRadiusSmall: 3px !default;
528
528
 
529
529
 
530
530
  // Tables
@@ -538,7 +538,7 @@ SCSS version:
538
538
  // -------------------------
539
539
  $btnBackground: $white !default;
540
540
  $btnBackgroundHighlight: darken($white, 10%) !default;
541
- $btnBorder: #bbb !default;
541
+ $btnBorder: #ccc !default;
542
542
 
543
543
  $btnPrimaryBackground: $linkColor !default;
544
544
  $btnPrimaryBackgroundHighlight: adjust-hue($btnPrimaryBackground, 20%) !default;
@@ -578,7 +578,7 @@ SCSS version:
578
578
 
579
579
  $dropdownLinkColor: $grayDark !default;
580
580
  $dropdownLinkColorHover: $white !default;
581
- $dropdownLinkColorActive: $dropdownLinkColor !default;
581
+ $dropdownLinkColorActive: $white !default;
582
582
 
583
583
  $dropdownLinkBackgroundActive: $linkColor !default;
584
584
  $dropdownLinkBackgroundHover: $dropdownLinkBackgroundActive !default;
@@ -619,7 +619,7 @@ SCSS version:
619
619
 
620
620
  // Horizontal forms & lists
621
621
  // -------------------------
622
- $horizontalComponentOffset: 180px;
622
+ $horizontalComponentOffset: 180px !default;
623
623
 
624
624
 
625
625
  // Wells
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  # s.add_development_dependency "rspec"
23
23
  # s.add_runtime_dependency "rest-client"
24
24
 
25
- s.add_development_dependency "bundler", "~> 1.0.0"
25
+ s.add_development_dependency "bundler", "~> 1.0"
26
26
  s.add_development_dependency "test-unit"
27
27
  s.add_development_dependency "rails", "~> 3.1"
28
28
 
@@ -13,4 +13,3 @@ module Bootstrap
13
13
  end
14
14
  end
15
15
  end
16
-
@@ -1,5 +1,5 @@
1
1
  module Bootstrap
2
2
  module Generators
3
- VERSION = "2.2.2"
3
+ VERSION = "2.3.1"
4
4
  end
5
5
  end
@@ -66,13 +66,13 @@ $fontSizeLarge: $baseFontSize * 1.25; // ~18px
66
66
  $fontSizeSmall: $baseFontSize * 0.85; // ~12px
67
67
  $fontSizeMini: $baseFontSize * 0.75; // ~11px
68
68
 
69
- $paddingLarge: 11px 19px; // 44px
70
- $paddingSmall: 2px 10px; // 26px
71
- $paddingMini: 1px 6px; // 24px
69
+ $paddingLarge: 11px 19px !default; // 44px
70
+ $paddingSmall: 2px 10px !default; // 26px
71
+ $paddingMini: 0px 6px !default; // 22px
72
72
 
73
- $baseBorderRadius: 4px;
74
- $borderRadiusLarge: 6px;
75
- $borderRadiusSmall: 3px;
73
+ $baseBorderRadius: 4px !default;
74
+ $borderRadiusLarge: 6px !default;
75
+ $borderRadiusSmall: 3px !default;
76
76
 
77
77
 
78
78
  // Tables
@@ -86,7 +86,7 @@ $tableBorder: #ddd !default; // table and cell border
86
86
  // -------------------------
87
87
  $btnBackground: $white !default;
88
88
  $btnBackgroundHighlight: darken($white, 10%) !default;
89
- $btnBorder: #bbb !default;
89
+ $btnBorder: #ccc !default;
90
90
 
91
91
  $btnPrimaryBackground: $linkColor !default;
92
92
  $btnPrimaryBackgroundHighlight: adjust-hue($btnPrimaryBackground, 20%) !default;
@@ -126,7 +126,7 @@ $dropdownDividerBottom: $white !default;
126
126
 
127
127
  $dropdownLinkColor: $grayDark !default;
128
128
  $dropdownLinkColorHover: $white !default;
129
- $dropdownLinkColorActive: $dropdownLinkColor !default;
129
+ $dropdownLinkColorActive: $white !default;
130
130
 
131
131
  $dropdownLinkBackgroundActive: $linkColor !default;
132
132
  $dropdownLinkBackgroundHover: $dropdownLinkBackgroundActive !default;
@@ -167,7 +167,7 @@ $hrBorder: $grayLighter !default;
167
167
 
168
168
  // Horizontal forms & lists
169
169
  // -------------------------
170
- $horizontalComponentOffset: 180px;
170
+ $horizontalComponentOffset: 180px !default;
171
171
 
172
172
 
173
173
  // Wells
@@ -68,7 +68,7 @@
68
68
 
69
69
  @paddingLarge: 11px 19px; // 44px
70
70
  @paddingSmall: 2px 10px; // 26px
71
- @paddingMini: 1px 6px; // 24px
71
+ @paddingMini: 0 6px; // 22px
72
72
 
73
73
  @baseBorderRadius: 4px;
74
74
  @borderRadiusLarge: 6px;
@@ -86,7 +86,7 @@
86
86
  // -------------------------
87
87
  @btnBackground: @white;
88
88
  @btnBackgroundHighlight: darken(@white, 10%);
89
- @btnBorder: #bbb;
89
+ @btnBorder: #ccc;
90
90
 
91
91
  @btnPrimaryBackground: @linkColor;
92
92
  @btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 20%);
@@ -126,7 +126,7 @@
126
126
 
127
127
  @dropdownLinkColor: @grayDark;
128
128
  @dropdownLinkColorHover: @white;
129
- @dropdownLinkColorActive: @dropdownLinkColor;
129
+ @dropdownLinkColorActive: @white;
130
130
 
131
131
  @dropdownLinkBackgroundActive: @linkColor;
132
132
  @dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;
@@ -16,7 +16,7 @@
16
16
  <div class="control-group">
17
17
  <%%= f.label :<%= attribute.name %>, :class => "control-label" %>
18
18
  <div class="controls">
19
- <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :class => "input-xlarge" %>
19
+ <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :class => "input-xxlarge" %>
20
20
  </div>
21
21
  </div>
22
22
  <% end -%>
@@ -12,7 +12,7 @@
12
12
  .control-group
13
13
  = f.label :<%= attribute.name %>, :class => 'control-label'
14
14
  .controls
15
- = f.<%= attribute.field_type %> :<%= attribute.name %>, :class => 'input-xlarge'
15
+ = f.<%= attribute.field_type %> :<%= attribute.name %>, :class => 'input-xxlarge'
16
16
  <% end -%>
17
17
  .actions
18
18
  = f.submit :class => 'btn btn-primary'
@@ -1,4 +1,4 @@
1
- <%%= simple_form_for(@<%= singular_table_name %>, :defaults => { :input_html => { :class => 'input-xlarge' } }) do |f| %>
1
+ <%%= simple_form_for(@<%= singular_table_name %>, :defaults => { :input_html => { :class => 'input-xxlarge' } }) do |f| %>
2
2
  <%%= f.error_notification %>
3
3
 
4
4
  <div class="form-inputs">
@@ -1,4 +1,4 @@
1
- = simple_form_for(@<%= singular_table_name %>, :defaults => { :input_html => { :class => 'input-xlarge' } }) do |f|
1
+ = simple_form_for(@<%= singular_table_name %>, :defaults => { :input_html => { :class => 'input-xxlarge' } }) do |f|
2
2
  = f.error_notification
3
3
 
4
4
  .form-inputs
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-affix.js v2.2.2
2
+ * bootstrap-affix.js v2.3.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#affix
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-alert.js v2.2.2
2
+ * bootstrap-alert.js v2.3.1
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.2.2
2
+ * bootstrap-button.js v2.3.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#buttons
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-carousel.js v2.2.2
2
+ * bootstrap-carousel.js v2.3.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#carousel
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -28,6 +28,7 @@
28
28
 
29
29
  var Carousel = function (element, options) {
30
30
  this.$element = $(element)
31
+ this.$indicators = this.$element.find('.carousel-indicators')
31
32
  this.options = options
32
33
  this.options.pause == 'hover' && this.$element
33
34
  .on('mouseenter', $.proxy(this.pause, this))
@@ -38,19 +39,24 @@
38
39
 
39
40
  cycle: function (e) {
40
41
  if (!e) this.paused = false
42
+ if (this.interval) clearInterval(this.interval);
41
43
  this.options.interval
42
44
  && !this.paused
43
45
  && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
44
46
  return this
45
47
  }
46
48
 
49
+ , getActiveIndex: function () {
50
+ this.$active = this.$element.find('.item.active')
51
+ this.$items = this.$active.parent().children()
52
+ return this.$items.index(this.$active)
53
+ }
54
+
47
55
  , to: function (pos) {
48
- var $active = this.$element.find('.item.active')
49
- , children = $active.parent().children()
50
- , activePos = children.index($active)
56
+ var activeIndex = this.getActiveIndex()
51
57
  , that = this
52
58
 
53
- if (pos > (children.length - 1) || pos < 0) return
59
+ if (pos > (this.$items.length - 1) || pos < 0) return
54
60
 
55
61
  if (this.sliding) {
56
62
  return this.$element.one('slid', function () {
@@ -58,18 +64,18 @@
58
64
  })
59
65
  }
60
66
 
61
- if (activePos == pos) {
67
+ if (activeIndex == pos) {
62
68
  return this.pause().cycle()
63
69
  }
64
70
 
65
- return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
71
+ return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
66
72
  }
67
73
 
68
74
  , pause: function (e) {
69
75
  if (!e) this.paused = true
70
76
  if (this.$element.find('.next, .prev').length && $.support.transition.end) {
71
77
  this.$element.trigger($.support.transition.end)
72
- this.cycle()
78
+ this.cycle(true)
73
79
  }
74
80
  clearInterval(this.interval)
75
81
  this.interval = null
@@ -103,10 +109,19 @@
103
109
 
104
110
  e = $.Event('slide', {
105
111
  relatedTarget: $next[0]
112
+ , direction: direction
106
113
  })
107
114
 
108
115
  if ($next.hasClass('active')) return
109
116
 
117
+ if (this.$indicators.length) {
118
+ this.$indicators.find('.active').removeClass('active')
119
+ this.$element.one('slid', function () {
120
+ var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
121
+ $nextIndicator && $nextIndicator.addClass('active')
122
+ })
123
+ }
124
+
110
125
  if ($.support.transition && this.$element.hasClass('slide')) {
111
126
  this.$element.trigger(e)
112
127
  if (e.isDefaultPrevented()) return
@@ -151,7 +166,7 @@
151
166
  if (!data) $this.data('carousel', (data = new Carousel(this, options)))
152
167
  if (typeof option == 'number') data.to(option)
153
168
  else if (action) data[action]()
154
- else if (options.interval) data.cycle()
169
+ else if (options.interval) data.pause().cycle()
155
170
  })
156
171
  }
157
172
 
@@ -174,11 +189,18 @@
174
189
  /* CAROUSEL DATA-API
175
190
  * ================= */
176
191
 
177
- $(document).on('click.carousel.data-api', '[data-slide]', function (e) {
192
+ $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
178
193
  var $this = $(this), href
179
194
  , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
180
195
  , options = $.extend({}, $target.data(), $this.data())
196
+ , slideIndex
197
+
181
198
  $target.carousel(options)
199
+
200
+ if (slideIndex = $this.attr('data-slide-to')) {
201
+ $target.data('carousel').pause().to(slideIndex).cycle()
202
+ }
203
+
182
204
  e.preventDefault()
183
205
  })
184
206
 
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-collapse.js v2.2.2
2
+ * bootstrap-collapse.js v2.3.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#collapse
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -52,7 +52,7 @@
52
52
  , actives
53
53
  , hasData
54
54
 
55
- if (this.transitioning) return
55
+ if (this.transitioning || this.$element.hasClass('in')) return
56
56
 
57
57
  dimension = this.dimension()
58
58
  scroll = $.camelCase(['scroll', dimension].join('-'))
@@ -72,7 +72,7 @@
72
72
 
73
73
  , hide: function () {
74
74
  var dimension
75
- if (this.transitioning) return
75
+ if (this.transitioning || !this.$element.hasClass('in')) return
76
76
  dimension = this.dimension()
77
77
  this.reset(this.$element[dimension]())
78
78
  this.transition('removeClass', $.Event('hide'), 'hidden')
@@ -129,7 +129,7 @@
129
129
  return this.each(function () {
130
130
  var $this = $(this)
131
131
  , data = $this.data('collapse')
132
- , options = typeof option == 'object' && option
132
+ , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
133
133
  if (!data) $this.data('collapse', (data = new Collapse(this, options)))
134
134
  if (typeof option == 'string') data[option]()
135
135
  })
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-dropdown.js v2.2.2
2
+ * bootstrap-dropdown.js v2.3.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#dropdowns
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -81,7 +81,10 @@
81
81
 
82
82
  isActive = $parent.hasClass('open')
83
83
 
84
- if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
84
+ if (!isActive || (isActive && e.keyCode == 27)) {
85
+ if (e.which == 27) $parent.find(toggle).focus()
86
+ return $this.click()
87
+ }
85
88
 
86
89
  $items = $('[role=menu] li:not(.divider):visible a', $parent)
87
90
 
@@ -115,8 +118,9 @@
115
118
  selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
116
119
  }
117
120
 
118
- $parent = $(selector)
119
- $parent.length || ($parent = $this.parent())
121
+ $parent = selector && $(selector)
122
+
123
+ if (!$parent || !$parent.length) $parent = $this.parent()
120
124
 
121
125
  return $parent
122
126
  }
@@ -152,10 +156,10 @@
152
156
  * =================================== */
153
157
 
154
158
  $(document)
155
- .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
156
- .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
157
- .on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() })
158
- .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
159
- .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
159
+ .on('click.dropdown.data-api', clearMenus)
160
+ .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
161
+ .on('click.dropdown-menu', function (e) { e.stopPropagation() })
162
+ .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
163
+ .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
160
164
 
161
- }(window.jQuery);
165
+ }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* =========================================================
2
- * bootstrap-modal.js v2.2.2
2
+ * bootstrap-modal.js v2.3.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#modals
4
4
  * =========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -60,8 +60,7 @@
60
60
  that.$element.appendTo(document.body) //don't move modals dom position
61
61
  }
62
62
 
63
- that.$element
64
- .show()
63
+ that.$element.show()
65
64
 
66
65
  if (transition) {
67
66
  that.$element[0].offsetWidth // force reflow
@@ -139,16 +138,17 @@
139
138
  })
140
139
  }
141
140
 
142
- , hideModal: function (that) {
143
- this.$element
144
- .hide()
145
- .trigger('hidden')
146
-
147
- this.backdrop()
141
+ , hideModal: function () {
142
+ var that = this
143
+ this.$element.hide()
144
+ this.backdrop(function () {
145
+ that.removeBackdrop()
146
+ that.$element.trigger('hidden')
147
+ })
148
148
  }
149
149
 
150
150
  , removeBackdrop: function () {
151
- this.$backdrop.remove()
151
+ this.$backdrop && this.$backdrop.remove()
152
152
  this.$backdrop = null
153
153
  }
154
154
 
@@ -172,6 +172,8 @@
172
172
 
173
173
  this.$backdrop.addClass('in')
174
174
 
175
+ if (!callback) return
176
+
175
177
  doAnimate ?
176
178
  this.$backdrop.one($.support.transition.end, callback) :
177
179
  callback()
@@ -180,8 +182,8 @@
180
182
  this.$backdrop.removeClass('in')
181
183
 
182
184
  $.support.transition && this.$element.hasClass('fade')?
183
- this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
184
- this.removeBackdrop()
185
+ this.$backdrop.one($.support.transition.end, callback) :
186
+ callback()
185
187
 
186
188
  } else if (callback) {
187
189
  callback()