anjlab-bootstrap-rails 2.0.1.1 → 2.0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/README.md +2 -1
  2. data/lib/bootstrap-rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/bootstrap-alert.js +1 -1
  4. data/vendor/assets/javascripts/bootstrap-button.js +1 -1
  5. data/vendor/assets/javascripts/bootstrap-carousel.js +7 -3
  6. data/vendor/assets/javascripts/bootstrap-collapse.js +4 -2
  7. data/vendor/assets/javascripts/bootstrap-dropdown.js +1 -1
  8. data/vendor/assets/javascripts/bootstrap-modal.js +1 -1
  9. data/vendor/assets/javascripts/bootstrap-popover.js +1 -1
  10. data/vendor/assets/javascripts/bootstrap-scrollspy.js +1 -1
  11. data/vendor/assets/javascripts/bootstrap-tab.js +1 -1
  12. data/vendor/assets/javascripts/bootstrap-tooltip.js +2 -2
  13. data/vendor/assets/javascripts/bootstrap-transition.js +1 -1
  14. data/vendor/assets/javascripts/bootstrap-typeahead.js +7 -7
  15. data/vendor/assets/stylesheets/alerts.scss +2 -14
  16. data/vendor/assets/stylesheets/badges.scss +36 -0
  17. data/vendor/assets/stylesheets/bootstrap.scss +2 -1
  18. data/vendor/assets/stylesheets/breadcrumbs.scss +2 -0
  19. data/vendor/assets/stylesheets/button-groups.scss +31 -7
  20. data/vendor/assets/stylesheets/buttons.scss +17 -13
  21. data/vendor/assets/stylesheets/code.scss +2 -2
  22. data/vendor/assets/stylesheets/component-animations.scss +3 -1
  23. data/vendor/assets/stylesheets/dropdowns.scss +45 -27
  24. data/vendor/assets/stylesheets/forms.scss +75 -42
  25. data/vendor/assets/stylesheets/grid.scss +2 -5
  26. data/vendor/assets/stylesheets/hero-unit.scss +3 -1
  27. data/vendor/assets/stylesheets/labels.scss +8 -2
  28. data/vendor/assets/stylesheets/mixins.scss +174 -135
  29. data/vendor/assets/stylesheets/modals.scss +12 -5
  30. data/vendor/assets/stylesheets/navbar.scss +77 -35
  31. data/vendor/assets/stylesheets/navs.scss +19 -9
  32. data/vendor/assets/stylesheets/pager.scss +6 -0
  33. data/vendor/assets/stylesheets/pagination.scss +1 -0
  34. data/vendor/assets/stylesheets/progress-bars.scss +15 -1
  35. data/vendor/assets/stylesheets/reset.scss +1 -1
  36. data/vendor/assets/stylesheets/responsive.scss +72 -28
  37. data/vendor/assets/stylesheets/scaffolding.scss +4 -4
  38. data/vendor/assets/stylesheets/tables.scss +15 -13
  39. data/vendor/assets/stylesheets/type.scss +21 -5
  40. data/vendor/assets/stylesheets/variables.scss +92 -6
  41. data/vendor/assets/stylesheets/wells.scss +10 -0
  42. metadata +12 -11
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Twitter Bootstrap v2 for Rails 3
1
+ # Twitter Bootstrap v 2.0.1 for Rails 3
2
2
  Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites.
3
3
  It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.
4
4
 
@@ -48,6 +48,7 @@ $gridGutterWidth: 10px;
48
48
  @import "bootstrap";
49
49
  @import "responsive";
50
50
  ```
51
+ NOTE: restart `pow` if you are using it.
51
52
 
52
53
  ## Javascripts
53
54
 
@@ -1,5 +1,5 @@
1
1
  module Bootstrap
2
2
  module Rails
3
- VERSION = "2.0.1.1"
3
+ VERSION = "2.0.2.0"
4
4
  end
5
5
  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.
@@ -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.
@@ -1,5 +1,5 @@
1
1
  /* ===========================================================
2
- * bootstrap-tooltip.js v2.0.1
2
+ * bootstrap-tooltip.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#tooltips
4
4
  * Inspired by the original jQuery.tipsy by Jason Frame
5
5
  * ===========================================================
@@ -206,7 +206,7 @@
206
206
  title = $e.attr('data-original-title')
207
207
  || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
208
208
 
209
- title = title.toString().replace(/(^\s*|\s*$)/, "")
209
+ title = (title || '').toString().replace(/(^\s*|\s*$)/, "")
210
210
 
211
211
  return title
212
212
  }
@@ -1,5 +1,5 @@
1
1
  /* ===================================================
2
- * bootstrap-transition.js v2.0.1
2
+ * bootstrap-transition.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#transitions
4
4
  * ===================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-typeahead.js v2.0.1
2
+ * bootstrap-typeahead.js v2.0.2
3
3
  * http://twitter.github.com/bootstrap/javascript.html#typeahead
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -40,6 +40,7 @@
40
40
  , select: function () {
41
41
  var val = this.$menu.find('.active').attr('data-value')
42
42
  this.$element.val(val)
43
+ this.$element.change();
43
44
  return this.hide()
44
45
  }
45
46
 
@@ -165,9 +166,6 @@
165
166
  }
166
167
 
167
168
  , keyup: function (e) {
168
- e.stopPropagation()
169
- e.preventDefault()
170
-
171
169
  switch(e.keyCode) {
172
170
  case 40: // down arrow
173
171
  case 38: // up arrow
@@ -180,6 +178,7 @@
180
178
  break
181
179
 
182
180
  case 27: // escape
181
+ if (!this.shown) return
183
182
  this.hide()
184
183
  break
185
184
 
@@ -187,10 +186,11 @@
187
186
  this.lookup()
188
187
  }
189
188
 
189
+ e.stopPropagation()
190
+ e.preventDefault()
190
191
  }
191
192
 
192
193
  , keypress: function (e) {
193
- e.stopPropagation()
194
194
  if (!this.shown) return
195
195
 
196
196
  switch(e.keyCode) {
@@ -210,12 +210,12 @@
210
210
  this.next()
211
211
  break
212
212
  }
213
+
214
+ e.stopPropagation()
213
215
  }
214
216
 
215
217
  , blur: function (e) {
216
218
  var that = this
217
- e.stopPropagation()
218
- e.preventDefault()
219
219
  setTimeout(function () { that.hide() }, 150)
220
220
  }
221
221
 
@@ -9,10 +9,10 @@
9
9
  background-color: $warningBackground;
10
10
  border: 1px solid $warningBorder;
11
11
  @include border-radius(4px);
12
+ color: $warningText;
12
13
  }
13
- .alert,
14
14
  .alert-heading {
15
- color: $warningText;
15
+ color: inherit;
16
16
  }
17
17
 
18
18
  // Adjust close link position
@@ -29,32 +29,20 @@
29
29
  .alert-success {
30
30
  background-color: $successBackground;
31
31
  border-color: $successBorder;
32
- }
33
- .alert-success,
34
- .alert-success .alert-heading {
35
32
  color: $successText;
36
33
  }
37
34
  .alert-danger,
38
35
  .alert-error {
39
36
  background-color: $errorBackground;
40
37
  border-color: $errorBorder;
41
- }
42
- .alert-danger,
43
- .alert-error,
44
- .alert-danger .alert-heading,
45
- .alert-error .alert-heading {
46
38
  color: $errorText;
47
39
  }
48
40
  .alert-info {
49
41
  background-color: $infoBackground;
50
42
  border-color: $infoBorder;
51
- }
52
- .alert-info,
53
- .alert-info .alert-heading {
54
43
  color: $infoText;
55
44
  }
56
45
 
57
-
58
46
  // Block alerts
59
47
  // ------------------------
60
48
  .alert-block {
@@ -0,0 +1,36 @@
1
+ // BADGES
2
+ // ------
3
+
4
+ // Base
5
+ .badge {
6
+ padding: 1px 9px 2px;
7
+ font-size: $baseFontSize * .925;
8
+ font-weight: bold;
9
+ white-space: nowrap;
10
+ color: $white;
11
+ background-color: $grayLight;
12
+ @include border-radius(9px);
13
+ }
14
+
15
+ // Hover state
16
+ .badge:hover {
17
+ color: $white;
18
+ text-decoration: none;
19
+ cursor: pointer;
20
+ }
21
+
22
+ // Colors
23
+ .badge-error { background-color: $errorText; }
24
+ .badge-error:hover { background-color: darken($errorText, 10%); }
25
+
26
+ .badge-warning { background-color: $orange; }
27
+ .badge-warning:hover { background-color: darken($orange, 10%); }
28
+
29
+ .badge-success { background-color: $successText; }
30
+ .badge-success:hover { background-color: darken($successText, 10%); }
31
+
32
+ .badge-info { background-color: $infoText; }
33
+ .badge-info:hover { background-color: darken($infoText, 10%); }
34
+
35
+ .badge-inverse { background-color: $grayDark; }
36
+ .badge-inverse:hover { background-color: darken($grayDark, 10%); }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v2.0.1
2
+ * Bootstrap v2.0.2
3
3
  *
4
4
  * Copyright 2012 Twitter, Inc
5
5
  * Licensed under the Apache License v2.0
@@ -53,6 +53,7 @@
53
53
  // Components: Misc
54
54
  @import "thumbnails.scss";
55
55
  @import "labels.scss";
56
+ @import "badges.scss";
56
57
  @import "progress-bars.scss";
57
58
  @import "accordion.scss";
58
59
  @import "carousel.scss";
@@ -4,12 +4,14 @@
4
4
  .breadcrumb {
5
5
  padding: 7px 14px;
6
6
  margin: 0 0 $baseLineHeight;
7
+ list-style: none;
7
8
  @include gradient-vertical($white, #f5f5f5);
8
9
  border: 1px solid #ddd;
9
10
  @include border-radius(3px);
10
11
  @include box-shadow(inset 0 1px 0 $white);
11
12
  li {
12
13
  display: inline-block;
14
+ @include ie7-inline-block();
13
15
  text-shadow: 0 1px 0 $white;
14
16
  }
15
17
  .divider {
@@ -95,8 +95,22 @@
95
95
  padding-right: 8px;
96
96
  $shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
97
97
  @include box-shadow($shadow);
98
- *padding-top: 5px;
99
- *padding-bottom: 5px;
98
+ *padding-top: 3px;
99
+ *padding-bottom: 3px;
100
+ }
101
+ .btn-group .btn-mini.dropdown-toggle {
102
+ padding-left: 5px;
103
+ padding-right: 5px;
104
+ *padding-top: 1px;
105
+ *padding-bottom: 1px;
106
+ }
107
+ .btn-group .btn-small.dropdown-toggle {
108
+ *padding-top: 4px;
109
+ *padding-bottom: 4px;
110
+ }
111
+ .btn-group .btn-large.dropdown-toggle {
112
+ padding-left: 12px;
113
+ padding-right: 12px;
100
114
  }
101
115
 
102
116
  .btn-group.open {
@@ -127,22 +141,32 @@
127
141
  .open.btn-group .caret {
128
142
  @include opacity(100);
129
143
  }
144
+ // Carets in other button sizes
145
+ .btn-mini .caret {
146
+ margin-top: 5px;
147
+ }
148
+ .btn-small .caret {
149
+ margin-top: 6px;
150
+ }
151
+ .btn-large .caret {
152
+ margin-top: 6px;
153
+ border-left: 5px solid transparent;
154
+ border-right: 5px solid transparent;
155
+ border-top: 5px solid $black;
156
+ }
130
157
 
131
158
 
132
159
  // Account for other colors
133
160
  .btn-primary,
161
+ .btn-warning,
134
162
  .btn-danger,
135
163
  .btn-info,
136
164
  .btn-success,
137
165
  .btn-inverse {
138
166
  .caret {
139
167
  border-top-color: $white;
168
+ border-bottom-color: $white;
140
169
  @include opacity(75);
141
170
  }
142
171
  }
143
172
 
144
- // Small button dropdowns
145
- .btn-small .caret {
146
- margin-top: 4px;
147
- }
148
-
@@ -8,6 +8,7 @@
8
8
  // Core
9
9
  .btn {
10
10
  display: inline-block;
11
+ @include ie7-inline-block();
11
12
  padding: 4px 10px 4px;
12
13
  margin-bottom: 0; // For input.btn
13
14
  font-size: $baseFontSize;
@@ -16,16 +17,15 @@
16
17
  text-align: center;
17
18
  text-shadow: 0 1px 1px rgba(255,255,255,.75);
18
19
  vertical-align: middle;
19
- @include button-background($white, darken($white, 10%));
20
- border: 1px solid #ccc;
21
- border-bottom-color: #bbb;
20
+ @include button-background($btnBackground, $btnBackgroundHighlight);
21
+ border: 1px solid $btnBorder;
22
+ border-bottom-color: darken($btnBorder, 10%);
22
23
  @include border-radius(4px);
23
24
  $shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
24
25
  @include box-shadow($shadow);
25
26
  cursor: pointer;
26
27
 
27
28
  // Give IE7 some love
28
- @include reset-filter();
29
29
  @include ie7-restore-left-whitespace();
30
30
  }
31
31
 
@@ -126,34 +126,34 @@
126
126
  .btn-danger.active,
127
127
  .btn-success.active,
128
128
  .btn-info.active,
129
- .btn-dark.active {
129
+ .btn-inverse.active {
130
130
  color: rgba(255,255,255,.75);
131
131
  }
132
132
 
133
133
  // Set the backgrounds
134
134
  // -------------------------
135
135
  .btn-primary {
136
- @include button-background($primaryButtonBackground, adjust-hue($primaryButtonBackground, 20));
136
+ @include button-background($btnPrimaryBackground, $btnPrimaryBackgroundHighlight);
137
137
  }
138
138
  // Warning appears are orange
139
139
  .btn-warning {
140
- @include button-background(lighten($orange, 15%), $orange);
140
+ @include button-background($btnWarningBackground, $btnWarningBackgroundHighlight);
141
141
  }
142
142
  // Danger and error appear as red
143
143
  .btn-danger {
144
- @include button-background(#ee5f5b, #bd362f);
144
+ @include button-background($btnDangerBackground, $btnDangerBackgroundHighlight);
145
145
  }
146
146
  // Success appears as green
147
147
  .btn-success {
148
- @include button-background(#62c462, #51a351);
148
+ @include button-background($btnSuccessBackground, $btnSuccessBackgroundHighlight);
149
149
  }
150
150
  // Info appears as a neutral blue
151
151
  .btn-info {
152
- @include button-background(#5bc0de, #2f96b4);
152
+ @include button-background($btnInfoBackground, $btnInfoBackgroundHighlight);
153
153
  }
154
154
  // Inverse appears as dark gray
155
155
  .btn-inverse {
156
- @include button-background(#454545, #262626);
156
+ @include button-background($btnInverseBackground, $btnInverseBackgroundHighlight);
157
157
  }
158
158
 
159
159
 
@@ -172,12 +172,16 @@ input[type="submit"].btn {
172
172
  // IE7 has some default padding on button controls
173
173
  *padding-top: 2px;
174
174
  *padding-bottom: 2px;
175
- &.large {
175
+ &.btn-large {
176
176
  *padding-top: 7px;
177
177
  *padding-bottom: 7px;
178
178
  }
179
- &.small {
179
+ &.btn-small {
180
180
  *padding-top: 3px;
181
181
  *padding-bottom: 3px;
182
182
  }
183
+ &.btn-mini {
184
+ *padding-top: 1px;
185
+ *padding-bottom: 1px;
186
+ }
183
187
  }