less-rails-bootstrap 2.0.10 → 2.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/CHANGELOG.md +5 -0
  2. data/lib/less/rails/bootstrap/version.rb +1 -1
  3. data/scripts/update_bootstrap.sh +33 -0
  4. data/test/cases/usage_css_spec.rb +2 -2
  5. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  6. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  7. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +28 -32
  8. data/vendor/assets/javascripts/twitter/bootstrap/button.js +29 -33
  9. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +27 -19
  10. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +44 -25
  11. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +18 -10
  12. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +25 -17
  13. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +13 -10
  14. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +43 -17
  15. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +12 -7
  16. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +40 -35
  17. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +30 -20
  18. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +25 -11
  19. data/vendor/frameworks/twitter/bootstrap/accordion.less +5 -0
  20. data/vendor/frameworks/twitter/bootstrap/bootstrap.less +2 -3
  21. data/vendor/frameworks/twitter/bootstrap/button-groups.less +55 -36
  22. data/vendor/frameworks/twitter/bootstrap/buttons.less +15 -11
  23. data/vendor/frameworks/twitter/bootstrap/close.less +12 -1
  24. data/vendor/frameworks/twitter/bootstrap/code.less +5 -5
  25. data/vendor/frameworks/twitter/bootstrap/component-animations.less +4 -4
  26. data/vendor/frameworks/twitter/bootstrap/dropdowns.less +15 -20
  27. data/vendor/frameworks/twitter/bootstrap/forms.less +58 -29
  28. data/vendor/frameworks/twitter/bootstrap/grid.less +1 -1
  29. data/vendor/frameworks/twitter/bootstrap/labels-badges.less +55 -0
  30. data/vendor/frameworks/twitter/bootstrap/layouts.less +2 -2
  31. data/vendor/frameworks/twitter/bootstrap/mixins.less +53 -36
  32. data/vendor/frameworks/twitter/bootstrap/modals.less +1 -1
  33. data/vendor/frameworks/twitter/bootstrap/navbar.less +65 -42
  34. data/vendor/frameworks/twitter/bootstrap/navs.less +36 -36
  35. data/vendor/frameworks/twitter/bootstrap/pager.less +1 -1
  36. data/vendor/frameworks/twitter/bootstrap/progress-bars.less +14 -6
  37. data/vendor/frameworks/twitter/bootstrap/reset.less +3 -3
  38. data/vendor/frameworks/twitter/bootstrap/responsive-1200px-min.less +23 -0
  39. data/vendor/frameworks/twitter/bootstrap/responsive-767px-max.less +149 -0
  40. data/vendor/frameworks/twitter/bootstrap/responsive-768px-979px.less +15 -0
  41. data/vendor/frameworks/twitter/bootstrap/responsive-navbar.less +146 -0
  42. data/vendor/frameworks/twitter/bootstrap/responsive-utilities.less +41 -0
  43. data/vendor/frameworks/twitter/bootstrap/responsive.less +14 -337
  44. data/vendor/frameworks/twitter/bootstrap/sprites.less +41 -8
  45. data/vendor/frameworks/twitter/bootstrap/tables.less +22 -5
  46. data/vendor/frameworks/twitter/bootstrap/thumbnails.less +11 -2
  47. data/vendor/frameworks/twitter/bootstrap/type.less +7 -6
  48. data/vendor/frameworks/twitter/bootstrap/variables.less +12 -8
  49. metadata +11 -4
@@ -1,5 +1,5 @@
1
1
  /* ===================================================
2
- * bootstrap-transition.js v2.0.2
2
+ * bootstrap-transition.js v2.0.3
3
3
  * http://twitter.github.com/bootstrap/javascript.html#transitions
4
4
  * ===================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -17,35 +17,45 @@
17
17
  * limitations under the License.
18
18
  * ========================================================== */
19
19
 
20
- !function( $ ) {
20
+
21
+ !function ($) {
21
22
 
22
23
  $(function () {
23
24
 
24
- "use strict"
25
+ "use strict"; // jshint ;_;
26
+
25
27
 
26
- /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
28
+ /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
27
29
  * ======================================================= */
28
30
 
29
31
  $.support.transition = (function () {
30
- var thisBody = document.body || document.documentElement
31
- , thisStyle = thisBody.style
32
- , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
33
-
34
- return support && {
35
- end: (function () {
36
- var transitionEnd = "TransitionEnd"
37
- if ( $.browser.webkit ) {
38
- transitionEnd = "webkitTransitionEnd"
39
- } else if ( $.browser.mozilla ) {
40
- transitionEnd = "transitionend"
41
- } else if ( $.browser.opera ) {
42
- transitionEnd = "oTransitionEnd"
32
+
33
+ var transitionEnd = (function () {
34
+
35
+ var el = document.createElement('bootstrap')
36
+ , transEndEventNames = {
37
+ 'WebkitTransition' : 'webkitTransitionEnd'
38
+ , 'MozTransition' : 'transitionend'
39
+ , 'OTransition' : 'oTransitionEnd'
40
+ , 'msTransition' : 'MSTransitionEnd'
41
+ , 'transition' : 'transitionend'
42
+ }
43
+ , name
44
+
45
+ for (name in transEndEventNames){
46
+ if (el.style[name] !== undefined) {
47
+ return transEndEventNames[name]
43
48
  }
44
- return transitionEnd
45
- }())
49
+ }
50
+
51
+ }())
52
+
53
+ return transitionEnd && {
54
+ end: transitionEnd
46
55
  }
56
+
47
57
  })()
48
58
 
49
59
  })
50
60
 
51
- }( window.jQuery );
61
+ }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-typeahead.js v2.0.2
2
+ * bootstrap-typeahead.js v2.0.3
3
3
  * http://twitter.github.com/bootstrap/javascript.html#typeahead
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -17,16 +17,22 @@
17
17
  * limitations under the License.
18
18
  * ============================================================ */
19
19
 
20
- !function( $ ){
21
20
 
22
- "use strict"
21
+ !function($){
23
22
 
24
- var Typeahead = function ( element, options ) {
23
+ "use strict"; // jshint ;_;
24
+
25
+
26
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
27
+ * ================================= */
28
+
29
+ var Typeahead = function (element, options) {
25
30
  this.$element = $(element)
26
31
  this.options = $.extend({}, $.fn.typeahead.defaults, options)
27
32
  this.matcher = this.options.matcher || this.matcher
28
33
  this.sorter = this.options.sorter || this.sorter
29
34
  this.highlighter = this.options.highlighter || this.highlighter
35
+ this.updater = this.options.updater || this.updater
30
36
  this.$menu = $(this.options.menu).appendTo('body')
31
37
  this.source = this.options.source
32
38
  this.shown = false
@@ -39,13 +45,18 @@
39
45
 
40
46
  , select: function () {
41
47
  var val = this.$menu.find('.active').attr('data-value')
42
- this.$element.val(val)
43
- this.$element.change();
48
+ this.$element
49
+ .val(this.updater(val))
50
+ .change()
44
51
  return this.hide()
45
52
  }
46
53
 
54
+ , updater: function (item) {
55
+ return item
56
+ }
57
+
47
58
  , show: function () {
48
- var pos = $.extend({}, this.$element.offset(), {
59
+ var pos = $.extend({}, this.$element.position(), {
49
60
  height: this.$element[0].offsetHeight
50
61
  })
51
62
 
@@ -77,7 +88,7 @@
77
88
  }
78
89
 
79
90
  items = $.grep(this.source, function (item) {
80
- if (that.matcher(item)) return item
91
+ return that.matcher(item)
81
92
  })
82
93
 
83
94
  items = this.sorter(items)
@@ -109,7 +120,8 @@
109
120
  }
110
121
 
111
122
  , highlighter: function (item) {
112
- return item.replace(new RegExp('(' + this.query + ')', 'ig'), function ($1, match) {
123
+ var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
124
+ return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
113
125
  return '<strong>' + match + '</strong>'
114
126
  })
115
127
  }
@@ -201,11 +213,13 @@
201
213
  break
202
214
 
203
215
  case 38: // up arrow
216
+ if (e.type != 'keydown') break
204
217
  e.preventDefault()
205
218
  this.prev()
206
219
  break
207
220
 
208
221
  case 40: // down arrow
222
+ if (e.type != 'keydown') break
209
223
  e.preventDefault()
210
224
  this.next()
211
225
  break
@@ -236,7 +250,7 @@
236
250
  /* TYPEAHEAD PLUGIN DEFINITION
237
251
  * =========================== */
238
252
 
239
- $.fn.typeahead = function ( option ) {
253
+ $.fn.typeahead = function (option) {
240
254
  return this.each(function () {
241
255
  var $this = $(this)
242
256
  , data = $this.data('typeahead')
@@ -268,4 +282,4 @@
268
282
  })
269
283
  })
270
284
 
271
- }( window.jQuery );
285
+ }(window.jQuery);
@@ -21,6 +21,11 @@
21
21
  padding: 8px 15px;
22
22
  }
23
23
 
24
+ // General toggle styles
25
+ .accordion-toggle {
26
+ cursor: pointer;
27
+ }
28
+
24
29
  // Inner needs the styles because you can't animate properly with any styles on the element
25
30
  .accordion-inner {
26
31
  padding: 9px 15px;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v2.0.2
2
+ * Bootstrap v2.0.3
3
3
  *
4
4
  * Copyright 2012 Twitter, Inc
5
5
  * Licensed under the Apache License v2.0
@@ -52,8 +52,7 @@
52
52
 
53
53
  // Components: Misc
54
54
  @import "thumbnails.less";
55
- @import "labels.less";
56
- @import "badges.less";
55
+ @import "labels-badges.less";
57
56
  @import "progress-bars.less";
58
57
  @import "accordion.less";
59
58
  @import "carousel.less";
@@ -25,14 +25,14 @@
25
25
  }
26
26
 
27
27
  // Float them, remove border radius, then re-add to first and last elements
28
- .btn-group .btn {
28
+ .btn-group > .btn {
29
29
  position: relative;
30
30
  float: left;
31
31
  margin-left: -1px;
32
32
  .border-radius(0);
33
33
  }
34
34
  // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
35
- .btn-group .btn:first-child {
35
+ .btn-group > .btn:first-child {
36
36
  margin-left: 0;
37
37
  -webkit-border-top-left-radius: 4px;
38
38
  -moz-border-radius-topleft: 4px;
@@ -41,8 +41,9 @@
41
41
  -moz-border-radius-bottomleft: 4px;
42
42
  border-bottom-left-radius: 4px;
43
43
  }
44
- .btn-group .btn:last-child,
45
- .btn-group .dropdown-toggle {
44
+ // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
45
+ .btn-group > .btn:last-child,
46
+ .btn-group > .dropdown-toggle {
46
47
  -webkit-border-top-right-radius: 4px;
47
48
  -moz-border-radius-topright: 4px;
48
49
  border-top-right-radius: 4px;
@@ -51,7 +52,7 @@
51
52
  border-bottom-right-radius: 4px;
52
53
  }
53
54
  // Reset corners for large buttons
54
- .btn-group .btn.large:first-child {
55
+ .btn-group > .btn.large:first-child {
55
56
  margin-left: 0;
56
57
  -webkit-border-top-left-radius: 6px;
57
58
  -moz-border-radius-topleft: 6px;
@@ -60,8 +61,8 @@
60
61
  -moz-border-radius-bottomleft: 6px;
61
62
  border-bottom-left-radius: 6px;
62
63
  }
63
- .btn-group .btn.large:last-child,
64
- .btn-group .large.dropdown-toggle {
64
+ .btn-group > .btn.large:last-child,
65
+ .btn-group > .large.dropdown-toggle {
65
66
  -webkit-border-top-right-radius: 6px;
66
67
  -moz-border-radius-topright: 6px;
67
68
  border-top-right-radius: 6px;
@@ -71,10 +72,10 @@
71
72
  }
72
73
 
73
74
  // On hover/focus/active, bring the proper btn to front
74
- .btn-group .btn:hover,
75
- .btn-group .btn:focus,
76
- .btn-group .btn:active,
77
- .btn-group .btn.active {
75
+ .btn-group > .btn:hover,
76
+ .btn-group > .btn:focus,
77
+ .btn-group > .btn:active,
78
+ .btn-group > .btn.active {
78
79
  z-index: 2;
79
80
  }
80
81
 
@@ -90,48 +91,60 @@
90
91
  // ----------------------
91
92
 
92
93
  // Give the line between buttons some depth
93
- .btn-group .dropdown-toggle {
94
+ .btn-group > .dropdown-toggle {
94
95
  padding-left: 8px;
95
96
  padding-right: 8px;
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
- .box-shadow(@shadow);
98
- *padding-top: 3px;
99
- *padding-bottom: 3px;
97
+ .box-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)");
98
+ *padding-top: 4px;
99
+ *padding-bottom: 4px;
100
100
  }
101
- .btn-group .btn-mini.dropdown-toggle {
101
+ .btn-group > .btn-mini.dropdown-toggle {
102
102
  padding-left: 5px;
103
103
  padding-right: 5px;
104
- *padding-top: 1px;
105
- *padding-bottom: 1px;
106
104
  }
107
- .btn-group .btn-small.dropdown-toggle {
105
+ .btn-group > .btn-small.dropdown-toggle {
108
106
  *padding-top: 4px;
109
107
  *padding-bottom: 4px;
110
108
  }
111
- .btn-group .btn-large.dropdown-toggle {
109
+ .btn-group > .btn-large.dropdown-toggle {
112
110
  padding-left: 12px;
113
111
  padding-right: 12px;
114
112
  }
115
113
 
116
114
  .btn-group.open {
117
- // IE7's z-index only goes to the nearest positioned ancestor, which would
118
- // make the menu appear below buttons that appeared later on the page
119
- *z-index: @zindexDropdown;
120
-
121
- // Reposition menu on open and round all corners
122
- .dropdown-menu {
123
- display: block;
124
- margin-top: 1px;
125
- .border-radius(5px);
126
- }
127
115
 
116
+ // The clickable button for toggling the menu
117
+ // Remove the gradient and set the same inset shadow as the :active state
128
118
  .dropdown-toggle {
129
119
  background-image: none;
130
- @shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
131
- .box-shadow(@shadow);
120
+ .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
121
+ }
122
+
123
+ // Keep the hover's background when dropdown is open
124
+ .btn.dropdown-toggle {
125
+ background-color: @btnBackgroundHighlight;
126
+ }
127
+ .btn-primary.dropdown-toggle {
128
+ background-color: @btnPrimaryBackgroundHighlight;
129
+ }
130
+ .btn-warning.dropdown-toggle {
131
+ background-color: @btnWarningBackgroundHighlight;
132
+ }
133
+ .btn-danger.dropdown-toggle {
134
+ background-color: @btnDangerBackgroundHighlight;
135
+ }
136
+ .btn-success.dropdown-toggle {
137
+ background-color: @btnSuccessBackgroundHighlight;
138
+ }
139
+ .btn-info.dropdown-toggle {
140
+ background-color: @btnInfoBackgroundHighlight;
141
+ }
142
+ .btn-inverse.dropdown-toggle {
143
+ background-color: @btnInverseBackgroundHighlight;
132
144
  }
133
145
  }
134
146
 
147
+
135
148
  // Reposition the caret
136
149
  .btn .caret {
137
150
  margin-top: 7px;
@@ -150,12 +163,18 @@
150
163
  }
151
164
  .btn-large .caret {
152
165
  margin-top: 6px;
153
- border-left: 5px solid transparent;
154
- border-right: 5px solid transparent;
155
- border-top: 5px solid @black;
166
+ border-left-width: 5px;
167
+ border-right-width: 5px;
168
+ border-top-width: 5px;
169
+ }
170
+ // Upside down carets for .dropup
171
+ .dropup .btn-large .caret {
172
+ border-bottom: 5px solid @black;
173
+ border-top: 0;
156
174
  }
157
175
 
158
176
 
177
+
159
178
  // Account for other colors
160
179
  .btn-primary,
161
180
  .btn-warning,
@@ -13,20 +13,19 @@
13
13
  margin-bottom: 0; // For input.btn
14
14
  font-size: @baseFontSize;
15
15
  line-height: @baseLineHeight;
16
+ *line-height: 20px;
16
17
  color: @grayDark;
17
18
  text-align: center;
18
19
  text-shadow: 0 1px 1px rgba(255,255,255,.75);
19
20
  vertical-align: middle;
21
+ cursor: pointer;
20
22
  .buttonBackground(@btnBackground, @btnBackgroundHighlight);
21
23
  border: 1px solid @btnBorder;
24
+ *border: 0; // Remove the border to prevent IE7's black border on input:focus
22
25
  border-bottom-color: darken(@btnBorder, 10%);
23
26
  .border-radius(4px);
24
- @shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
25
- .box-shadow(@shadow);
26
- cursor: pointer;
27
-
28
- // Give IE7 some love
29
- .ie7-restore-left-whitespace();
27
+ .ie7-restore-left-whitespace(); // Give IE7 some love
28
+ .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
30
29
  }
31
30
 
32
31
  // Hover state
@@ -34,6 +33,7 @@
34
33
  color: @grayDark;
35
34
  text-decoration: none;
36
35
  background-color: darken(@white, 10%);
36
+ *background-color: darken(@white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
37
37
  background-position: 0 -15px;
38
38
 
39
39
  // transition is only when going to hover, otherwise the background
@@ -49,20 +49,19 @@
49
49
  // Active state
50
50
  .btn.active,
51
51
  .btn:active {
52
- background-image: none;
53
- @shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
54
- .box-shadow(@shadow);
55
52
  background-color: darken(@white, 10%);
56
53
  background-color: darken(@white, 15%) e("\9");
54
+ background-image: none;
57
55
  outline: 0;
56
+ .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
58
57
  }
59
58
 
60
59
  // Disabled state
61
60
  .btn.disabled,
62
61
  .btn[disabled] {
63
62
  cursor: default;
64
- background-image: none;
65
63
  background-color: darken(@white, 10%);
64
+ background-image: none;
66
65
  .opacity(65);
67
66
  .box-shadow(none);
68
67
  }
@@ -117,8 +116,8 @@
117
116
  .btn-info:hover,
118
117
  .btn-inverse,
119
118
  .btn-inverse:hover {
120
- text-shadow: 0 -1px 0 rgba(0,0,0,.25);
121
119
  color: @white;
120
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
122
121
  }
123
122
  // Provide *some* extra contrast for those who can get it
124
123
  .btn-primary.active,
@@ -132,6 +131,11 @@
132
131
 
133
132
  // Set the backgrounds
134
133
  // -------------------------
134
+ .btn {
135
+ // reset here as of 2.0.3 due to Recess property order
136
+ border-color: #ccc;
137
+ border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
138
+ }
135
139
  .btn-primary {
136
140
  .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
137
141
  }
@@ -12,7 +12,18 @@
12
12
  &:hover {
13
13
  color: @black;
14
14
  text-decoration: none;
15
- .opacity(40);
16
15
  cursor: pointer;
16
+ .opacity(40);
17
17
  }
18
18
  }
19
+
20
+ // Additional properties for button version
21
+ // iOS requires the button element instead of an anchor tag.
22
+ // If you want the anchor version, it requires `href="#"`.
23
+ button.close {
24
+ padding: 0;
25
+ cursor: pointer;
26
+ background-color: transparent;
27
+ border: 0;
28
+ -webkit-appearance: none;
29
+ }