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
@@ -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
  .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
+ .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.less";
55
55
  @import "labels.less";
56
+ @import "badges.less";
56
57
  @import "progress-bars.less";
57
58
  @import "accordion.less";
58
59
  @import "carousel.less";
@@ -4,12 +4,14 @@
4
4
  .breadcrumb {
5
5
  padding: 7px 14px;
6
6
  margin: 0 0 @baseLineHeight;
7
+ list-style: none;
7
8
  #gradient > .vertical(@white, #f5f5f5);
8
9
  border: 1px solid #ddd;
9
10
  .border-radius(3px);
10
11
  .box-shadow(inset 0 1px 0 @white);
11
12
  li {
12
13
  display: inline-block;
14
+ .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
  .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
  .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
  .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
+ .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
- .buttonBackground(@white, darken(@white, 10%));
20
- border: 1px solid #ccc;
21
- border-bottom-color: #bbb;
20
+ .buttonBackground(@btnBackground, @btnBackgroundHighlight);
21
+ border: 1px solid @btnBorder;
22
+ border-bottom-color: darken(@btnBorder, 10%);
22
23
  .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
  .box-shadow(@shadow);
25
26
  cursor: pointer;
26
27
 
27
28
  // Give IE7 some love
28
- .reset-filter();
29
29
  .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
- .buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 20));
136
+ .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
137
137
  }
138
138
  // Warning appears are orange
139
139
  .btn-warning {
140
- .buttonBackground(lighten(@orange, 15%), @orange);
140
+ .buttonBackground(@btnWarningBackground, @btnWarningBackgroundHighlight);
141
141
  }
142
142
  // Danger and error appear as red
143
143
  .btn-danger {
144
- .buttonBackground(#ee5f5b, #bd362f);
144
+ .buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight);
145
145
  }
146
146
  // Success appears as green
147
147
  .btn-success {
148
- .buttonBackground(#62c462, #51a351);
148
+ .buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight);
149
149
  }
150
150
  // Info appears as a neutral blue
151
151
  .btn-info {
152
- .buttonBackground(#5bc0de, #2f96b4);
152
+ .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight);
153
153
  }
154
154
  // Inverse appears as dark gray
155
155
  .btn-inverse {
156
- .buttonBackground(#454545, #262626);
156
+ .buttonBackground(@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
  }
@@ -14,7 +14,7 @@ pre {
14
14
 
15
15
  // Inline code
16
16
  code {
17
- padding: 3px 4px;
17
+ padding: 2px 4px;
18
18
  color: #d14;
19
19
  background-color: #f7f7f9;
20
20
  border: 1px solid #e1e1e8;
@@ -25,7 +25,7 @@ pre {
25
25
  display: block;
26
26
  padding: (@baseLineHeight - 1) / 2;
27
27
  margin: 0 0 @baseLineHeight / 2;
28
- font-size: 12px;
28
+ font-size: @baseFontSize * .925; // 13px to 12px
29
29
  line-height: @baseLineHeight;
30
30
  background-color: #f5f5f5;
31
31
  border: 1px solid #ccc; // fallback for IE7-8
@@ -14,5 +14,7 @@
14
14
  position:relative;
15
15
  overflow:hidden;
16
16
  height: 0;
17
- &.in { height: auto; }
18
- }
17
+ &.in {
18
+ height: auto;
19
+ }
20
+ }
@@ -13,22 +13,22 @@
13
13
  .open .dropdown-toggle {
14
14
  outline: 0;
15
15
  }
16
+
16
17
  // Dropdown arrow/caret
18
+ // --------------------
17
19
  .caret {
18
20
  display: inline-block;
19
21
  width: 0;
20
22
  height: 0;
21
- text-indent: -99999px;
22
- // IE7 won't do the border trick if there's a text indent, but it doesn't
23
- // do the content that text-indent is hiding, either, so we're ok.
24
- *text-indent: 0;
25
23
  vertical-align: top;
26
24
  border-left: 4px solid transparent;
27
25
  border-right: 4px solid transparent;
28
26
  border-top: 4px solid @black;
29
27
  .opacity(30);
30
- content: "\2193";
28
+ content: "";
31
29
  }
30
+
31
+ // Place the caret
32
32
  .dropdown .caret {
33
33
  margin-top: 8px;
34
34
  margin-left: 2px;
@@ -37,7 +37,9 @@
37
37
  .open.dropdown .caret {
38
38
  .opacity(100);
39
39
  }
40
+
40
41
  // The dropdown menu (ul)
42
+ // ----------------------
41
43
  .dropdown-menu {
42
44
  position: absolute;
43
45
  top: 100%;
@@ -46,11 +48,10 @@
46
48
  float: left;
47
49
  display: none; // none by default, but block on "open" of the menu
48
50
  min-width: 160px;
49
- _width: 160px;
50
51
  padding: 4px 0;
51
52
  margin: 0; // override default ul
52
53
  list-style: none;
53
- background-color: @white;
54
+ background-color: @dropdownBackground;
54
55
  border-color: #ccc;
55
56
  border-color: rgba(0,0,0,.2);
56
57
  border-style: solid;
@@ -63,27 +64,15 @@
63
64
  *border-right-width: 2px;
64
65
  *border-bottom-width: 2px;
65
66
 
66
- // Allow for dropdowns to go bottom up (aka, dropup-menu)
67
- &.bottom-up {
68
- top: auto;
69
- bottom: 100%;
70
- margin-bottom: 2px;
67
+ // Aligns the dropdown menu to right
68
+ &.pull-right {
69
+ right: 0;
70
+ left: auto;
71
71
  }
72
72
 
73
73
  // Dividers (basically an hr) within the dropdown
74
74
  .divider {
75
- height: 1px;
76
- margin: 5px 1px;
77
- overflow: hidden;
78
- background-color: #e5e5e5;
79
- border-bottom: 1px solid @white;
80
-
81
- // IE7 needs a set width since we gave a height. Restricting just
82
- // to IE7 to keep the 1px left/right space in other browsers.
83
- // It is unclear where IE is getting the extra space that we need
84
- // to negative-margin away, but so it goes.
85
- *width: 100%;
86
- *margin: -5px 0 5px;
75
+ .nav-divider();
87
76
  }
88
77
 
89
78
  // Links within the dropdown menu
@@ -93,21 +82,23 @@
93
82
  clear: both;
94
83
  font-weight: normal;
95
84
  line-height: @baseLineHeight;
96
- color: @gray;
85
+ color: @dropdownLinkColor;
97
86
  white-space: nowrap;
98
87
  }
99
88
  }
100
89
 
101
90
  // Hover state
91
+ // -----------
102
92
  .dropdown-menu li > a:hover,
103
93
  .dropdown-menu .active > a,
104
94
  .dropdown-menu .active > a:hover {
105
- color: @white;
95
+ color: @dropdownLinkColorHover;
106
96
  text-decoration: none;
107
- background-color: @linkColor;
97
+ background-color: @dropdownLinkBackgroundHover;
108
98
  }
109
99
 
110
100
  // Open state for the dropdown
101
+ // ---------------------------
111
102
  .dropdown.open {
112
103
  // IE7's z-index only goes to the nearest positioned ancestor, which would
113
104
  // make the menu appear below buttons that appeared later on the page
@@ -123,7 +114,34 @@
123
114
  }
124
115
  }
125
116
 
117
+ // Right aligned dropdowns
118
+ .pull-right .dropdown-menu {
119
+ left: auto;
120
+ right: 0;
121
+ }
122
+
123
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
124
+ // ------------------------------------------------------
125
+ // Just add .dropup after the standard .dropdown class and you're set, bro.
126
+ // TODO: abstract this so that the navbar fixed styles are not placed here?
127
+ .dropup,
128
+ .navbar-fixed-bottom .dropdown {
129
+ // Reverse the caret
130
+ .caret {
131
+ border-top: 0;
132
+ border-bottom: 4px solid @black;
133
+ content: "\2191";
134
+ }
135
+ // Different positioning for bottom up menu
136
+ .dropdown-menu {
137
+ top: auto;
138
+ bottom: 100%;
139
+ margin-bottom: 1px;
140
+ }
141
+ }
142
+
126
143
  // Typeahead
144
+ // ---------
127
145
  .typeahead {
128
146
  margin-top: 2px; // give it some space to breathe
129
147
  .border-radius(4px);