anjlab-bootstrap-rails 2.2.2.1 → 2.3.0.0

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 (41) hide show
  1. data/README.md +3 -2
  2. data/lib/bootstrap-rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/twitter/bootstrap/affix.js +1 -1
  4. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +1 -1
  5. data/vendor/assets/javascripts/twitter/bootstrap/button.js +1 -1
  6. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +31 -9
  7. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +4 -4
  8. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +14 -10
  9. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +13 -11
  10. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +5 -5
  11. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +2 -2
  12. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +1 -1
  13. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +95 -29
  14. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +1 -1
  15. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +16 -4
  16. data/vendor/frameworks/twitter/bootstrap/bootstrap.scss +1 -1
  17. data/vendor/frameworks/twitter/bootstrap/button-groups.scss +4 -2
  18. data/vendor/frameworks/twitter/bootstrap/buttons.scss +8 -10
  19. data/vendor/frameworks/twitter/bootstrap/carousel.scss +31 -4
  20. data/vendor/frameworks/twitter/bootstrap/close.scss +2 -1
  21. data/vendor/frameworks/twitter/bootstrap/dropdowns.scss +16 -12
  22. data/vendor/frameworks/twitter/bootstrap/forms.scss +5 -2
  23. data/vendor/frameworks/twitter/bootstrap/labels-badges.scss +4 -2
  24. data/vendor/frameworks/twitter/bootstrap/media.scss +2 -2
  25. data/vendor/frameworks/twitter/bootstrap/mixins.scss +19 -4
  26. data/vendor/frameworks/twitter/bootstrap/navbar.scss +21 -14
  27. data/vendor/frameworks/twitter/bootstrap/navs.scss +39 -21
  28. data/vendor/frameworks/twitter/bootstrap/pager.scss +3 -1
  29. data/vendor/frameworks/twitter/bootstrap/pagination.scss +3 -1
  30. data/vendor/frameworks/twitter/bootstrap/popovers.scss +5 -1
  31. data/vendor/frameworks/twitter/bootstrap/responsive-navbar.scss +6 -2
  32. data/vendor/frameworks/twitter/bootstrap/responsive-utilities.scss +16 -0
  33. data/vendor/frameworks/twitter/bootstrap/responsive.scss +1 -10
  34. data/vendor/frameworks/twitter/bootstrap/scaffolding.scss +2 -1
  35. data/vendor/frameworks/twitter/bootstrap/sprites.scss +7 -3
  36. data/vendor/frameworks/twitter/bootstrap/tables.scss +25 -18
  37. data/vendor/frameworks/twitter/bootstrap/thumbnails.scss +3 -2
  38. data/vendor/frameworks/twitter/bootstrap/tooltip.scss +6 -6
  39. data/vendor/frameworks/twitter/bootstrap/type.scss +22 -10
  40. data/vendor/frameworks/twitter/bootstrap/variables.scss +1 -1
  41. metadata +4 -4
@@ -1,5 +1,5 @@
1
1
  /* ===================================================
2
- * bootstrap-transition.js v2.2.2
2
+ * bootstrap-transition.js v2.3.0
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.2.2
2
+ * bootstrap-typeahead.js v2.3.0
3
3
  * http://twitter.github.com/bootstrap/javascript.html#typeahead
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -172,6 +172,7 @@
172
172
 
173
173
  , listen: function () {
174
174
  this.$element
175
+ .on('focus', $.proxy(this.focus, this))
175
176
  .on('blur', $.proxy(this.blur, this))
176
177
  .on('keypress', $.proxy(this.keypress, this))
177
178
  .on('keyup', $.proxy(this.keyup, this))
@@ -183,6 +184,7 @@
183
184
  this.$menu
184
185
  .on('click', $.proxy(this.click, this))
185
186
  .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
187
+ .on('mouseleave', 'li', $.proxy(this.mouseleave, this))
186
188
  }
187
189
 
188
190
  , eventSupported: function(eventName) {
@@ -256,22 +258,33 @@
256
258
  e.preventDefault()
257
259
  }
258
260
 
261
+ , focus: function (e) {
262
+ this.focused = true
263
+ }
264
+
259
265
  , blur: function (e) {
260
- var that = this
261
- setTimeout(function () { that.hide() }, 150)
266
+ this.focused = false
267
+ if (!this.mousedover && this.shown) this.hide()
262
268
  }
263
269
 
264
270
  , click: function (e) {
265
271
  e.stopPropagation()
266
272
  e.preventDefault()
267
273
  this.select()
274
+ this.$element.focus()
268
275
  }
269
276
 
270
277
  , mouseenter: function (e) {
278
+ this.mousedover = true
271
279
  this.$menu.find('.active').removeClass('active')
272
280
  $(e.currentTarget).addClass('active')
273
281
  }
274
282
 
283
+ , mouseleave: function (e) {
284
+ this.mousedover = false
285
+ if (!this.focused && this.shown) this.hide()
286
+ }
287
+
275
288
  }
276
289
 
277
290
 
@@ -316,7 +329,6 @@
316
329
  $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
317
330
  var $this = $(this)
318
331
  if ($this.data('typeahead')) return
319
- e.preventDefault()
320
332
  $this.typeahead($this.data())
321
333
  })
322
334
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v2.2.2
2
+ * Bootstrap v2.3.0
3
3
  *
4
4
  * Copyright 2012 Twitter, Inc
5
5
  * Licensed under the Apache License v2.0
@@ -164,8 +164,6 @@
164
164
  margin-left: 0;
165
165
  }
166
166
  // Carets in other button sizes
167
- .btn-mini .caret,
168
- .btn-small .caret,
169
167
  .btn-large .caret {
170
168
  margin-top: 6px;
171
169
  }
@@ -174,6 +172,10 @@
174
172
  border-right-width: 5px;
175
173
  border-top-width: 5px;
176
174
  }
175
+ .btn-mini .caret,
176
+ .btn-small .caret {
177
+ margin-top: 8px;
178
+ }
177
179
  // Upside down carets for .dropup
178
180
  .dropup .btn-large .caret {
179
181
  border-bottom-width: 5px;
@@ -25,13 +25,14 @@
25
25
  @include ie7-restore-left-whitespace(); // Give IE7 some love
26
26
  @include box-shadow((inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)));
27
27
 
28
- // Hover state
29
- &:hover {
28
+ // Hover/focus state
29
+ &:hover,
30
+ &:focus {
30
31
  color: $grayDark;
31
32
  text-decoration: none;
32
33
  background-position: 0 -15px;
33
34
 
34
- // transition is only when going to hover, otherwise the background
35
+ // transition is only when going to hover/focus, otherwise the background
35
36
  // behind the gradient (there for IE<=9 fallback) gets mismatched
36
37
  @include transition(background-position .1s linear);
37
38
  }
@@ -141,11 +142,6 @@ input[type="button"] {
141
142
 
142
143
  // Set the backgrounds
143
144
  // -------------------------
144
- .btn {
145
- // reset here as of 2.0.3 due to Recess property order
146
- border-color: #c5c5c5;
147
- border-color: rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25);
148
- }
149
145
  .btn-primary {
150
146
  @include button-background($btnPrimaryBackground, $btnPrimaryBackgroundHighlight);
151
147
  }
@@ -219,12 +215,14 @@ input[type="submit"].btn {
219
215
  color: $linkColor;
220
216
  @include border-radius(0);
221
217
  }
222
- .btn-link:hover {
218
+ .btn-link:hover,
219
+ .btn-link:focus {
223
220
  color: $linkColorHover;
224
221
  text-decoration: underline;
225
222
  background-color: transparent;
226
223
  }
227
- .btn-link[disabled]:hover {
224
+ .btn-link[disabled]:hover,
225
+ .btn-link[disabled]:focus {
228
226
  color: $grayDark;
229
227
  text-decoration: none;
230
228
  }
@@ -21,13 +21,14 @@
21
21
  display: none;
22
22
  position: relative;
23
23
  @include transition(.6s ease-in-out left);
24
- }
25
24
 
26
25
  // Account for jankitude on images
27
- > .item > img {
26
+ > img,
27
+ > a > img {
28
28
  display: block;
29
29
  line-height: 1;
30
30
  }
31
+ }
31
32
 
32
33
  > .active,
33
34
  > .next,
@@ -97,14 +98,40 @@
97
98
  right: 15px;
98
99
  }
99
100
 
100
- // Hover state
101
- &:hover {
101
+ // Hover/focus state
102
+ &:hover,
103
+ &:focus {
102
104
  color: $white;
103
105
  text-decoration: none;
104
106
  @include opacity(90);
105
107
  }
106
108
  }
107
109
 
110
+ // Carousel indicator pips
111
+ // -----------------------------
112
+ .carousel-indicators {
113
+ position: absolute;
114
+ top: 15px;
115
+ right: 15px;
116
+ z-index: 5;
117
+ margin: 0;
118
+ list-style: none;
119
+
120
+ li {
121
+ display: block;
122
+ float: left;
123
+ width: 10px;
124
+ height: 10px;
125
+ margin-left: 5px;
126
+ text-indent: -999px;
127
+ background-color: #ccc;
128
+ background-color: rgba(255,255,255,.25);
129
+ border-radius: 5px;
130
+ }
131
+ .active {
132
+ background-color: #fff;
133
+ }
134
+ }
108
135
 
109
136
  // Caption for text below images
110
137
  // -----------------------------
@@ -11,7 +11,8 @@
11
11
  color: $black;
12
12
  text-shadow: 0 1px 0 rgba(255,255,255,1);
13
13
  @include opacity(20);
14
- &:hover {
14
+ &:hover,
15
+ &:focus {
15
16
  color: $black;
16
17
  text-decoration: none;
17
18
  cursor: pointer;
@@ -72,7 +72,7 @@
72
72
  }
73
73
 
74
74
  // Links within the dropdown menu
75
- li > a {
75
+ > li > a {
76
76
  display: block;
77
77
  padding: 3px 20px;
78
78
  clear: both;
@@ -83,11 +83,12 @@
83
83
  }
84
84
  }
85
85
 
86
- // Hover state
86
+ // Hover/Focus state
87
87
  // -----------
88
- .dropdown-menu li > a:hover,
89
- .dropdown-menu li > a:focus,
90
- .dropdown-submenu:hover > a {
88
+ .dropdown-menu > li > a:hover,
89
+ .dropdown-menu > li > a:focus,
90
+ .dropdown-submenu:hover > a,
91
+ .dropdown-submenu:focus > a {
91
92
  text-decoration: none;
92
93
  color: $dropdownLinkColorHover;
93
94
  @include gradient-vertical($dropdownLinkBackgroundHover, darken($dropdownLinkBackgroundHover, 5%));
@@ -95,8 +96,9 @@
95
96
 
96
97
  // Active state
97
98
  // ------------
98
- .dropdown-menu .active > a,
99
- .dropdown-menu .active > a:hover {
99
+ .dropdown-menu > .active > a,
100
+ .dropdown-menu > .active > a:hover,
101
+ .dropdown-menu > .active > a:focus {
100
102
  color: $dropdownLinkColorActive;
101
103
  text-decoration: none;
102
104
  outline: 0;
@@ -105,13 +107,15 @@
105
107
 
106
108
  // Disabled state
107
109
  // --------------
108
- // Gray out text and ensure the hover state remains gray
109
- .dropdown-menu .disabled > a,
110
- .dropdown-menu .disabled > a:hover {
110
+ // Gray out text and ensure the hover/focus state remains gray
111
+ .dropdown-menu > .disabled > a,
112
+ .dropdown-menu > .disabled > a:hover,
113
+ .dropdown-menu > .disabled > a:focus {
111
114
  color: $grayLight;
112
115
  }
113
- // Nuke hover effects
114
- .dropdown-menu .disabled > a:hover {
116
+ // Nuke hover/focus effects
117
+ .dropdown-menu > .disabled > a:hover,
118
+ .dropdown-menu > .disabled > a:focus {
115
119
  text-decoration: none;
116
120
  background-color: transparent;
117
121
  background-image: none; // Remove CSS gradient
@@ -422,7 +422,9 @@ select:focus:invalid {
422
422
  // Allow us to put symbols and text within the input field for a cleaner look
423
423
  .input-append,
424
424
  .input-prepend {
425
- margin-bottom: 5px;
425
+ display: inline-block;
426
+ margin-bottom: $baseLineHeight / 2;
427
+ vertical-align: middle;
426
428
  font-size: 0; // white space collapse hack
427
429
  white-space: nowrap; // Prevent span and input from separating
428
430
 
@@ -430,7 +432,8 @@ select:focus:invalid {
430
432
  input,
431
433
  select,
432
434
  .uneditable-input,
433
- .dropdown-menu {
435
+ .dropdown-menu,
436
+ .popover {
434
437
  font-size: $baseFontSize;
435
438
  }
436
439
 
@@ -35,10 +35,12 @@
35
35
  }
36
36
  }
37
37
 
38
- // Hover state, but only for links
38
+ // Hover/focus state, but only for links
39
39
  a {
40
40
  &.label:hover,
41
- &.badge:hover {
41
+ &.label:focus,
42
+ &.badge:hover,
43
+ &.badge:focus {
42
44
  color: $white;
43
45
  text-decoration: none;
44
46
  cursor: pointer;
@@ -37,10 +37,10 @@
37
37
  // Media image alignment
38
38
  // -------------------------
39
39
 
40
- .media .pull-left {
40
+ .media > .pull-left {
41
41
  margin-right: 10px;
42
42
  }
43
- .media .pull-right {
43
+ .media > .pull-right {
44
44
  margin-left: 10px;
45
45
  }
46
46
 
@@ -293,6 +293,12 @@
293
293
  -o-transition-delay: $transition-delay;
294
294
  transition-delay: $transition-delay;
295
295
  }
296
+ @mixin transition-duration($transition-duration) {
297
+ -webkit-transition-duration: $transition-duration;
298
+ -moz-transition-duration: $transition-duration;
299
+ -o-transition-duration: $transition-duration;
300
+ transition-duration: $transition-duration;
301
+ }
296
302
 
297
303
  // Transformations
298
304
  @mixin rotate($degrees) {
@@ -444,7 +450,18 @@
444
450
  background-image: -webkit-linear-gradient($deg, $startColor, $endColor); // Safari 5.1+, Chrome 10+
445
451
  background-image: -o-linear-gradient($deg, $startColor, $endColor); // Opera 11.10
446
452
  background-image: linear-gradient($deg, $startColor, $endColor); // Standard, IE10
447
- }
453
+ }
454
+ @mixin horizontal-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
455
+ background-color: mix($midColor, $endColor, 80%);
456
+ background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor));
457
+ background-image: -webkit-linear-gradient(left, $startColor, $midColor $colorStop, $endColor);
458
+ background-image: -moz-linear-gradient(left, $startColor, $midColor $colorStop, $endColor);
459
+ background-image: -o-linear-gradient(left, $startColor, $midColor $colorStop, $endColor);
460
+ background-image: linear-gradient(to right, $startColor, $midColor $colorStop, $endColor);
461
+ background-repeat: no-repeat;
462
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
463
+ }
464
+
448
465
  @mixin vertical-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
449
466
  background-color: mix($midColor, $endColor, 80%);
450
467
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor));
@@ -520,7 +537,7 @@
520
537
  @include reset-filter();
521
538
 
522
539
  // in these cases the gradient won't cover the background, so we override
523
- &:hover, &:active, &.active, &.disabled, &[disabled] {
540
+ &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] {
524
541
  color: $textColor;
525
542
  background-color: $endColor;
526
543
  *background-color: darken($endColor, 5%);
@@ -577,7 +594,6 @@
577
594
  @mixin grid-core-span ($columns, $gridColumnWidth, $gridGutterWidth) {
578
595
  width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
579
596
  }
580
-
581
597
  @mixin grid-core-span-x($columns, $gridColumnWidth, $gridGutterWidth) {
582
598
  @for $i from 1 through $columns {
583
599
  .span#{$i} { @include grid-core-span($i, $gridColumnWidth, $gridGutterWidth) }
@@ -610,7 +626,6 @@
610
626
  @include grid-core-span-x($gridColumns, $gridColumnWidth, $gridGutterWidth);
611
627
  @include grid-core-offset-x($gridColumns, $gridColumnWidth, $gridGutterWidth);
612
628
  }
613
-
614
629
  @mixin grid-fluid-offset($columns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
615
630
  margin-left: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) + ($fluidGridGutterWidth*2);
616
631
  *margin-left: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) - (.5 / ($gridRowWidth / 1px) * 100 * 1%) + ($fluidGridGutterWidth*2) - (.5 / ($gridRowWidth / 1px) * 100 * 1%);
@@ -56,7 +56,8 @@
56
56
  font-weight: 200;
57
57
  color: $navbarBrandColor;
58
58
  text-shadow: 0 1px 0 $navbarBackgroundHighlight;
59
- &:hover {
59
+ &:hover,
60
+ &:focus {
60
61
  text-decoration: none;
61
62
  }
62
63
  }
@@ -73,8 +74,9 @@
73
74
  // -------------------------
74
75
  .navbar-link {
75
76
  color: $navbarLinkColor;
76
- &:hover {
77
- color: $navbarLinkColorHover;
77
+ &:hover,
78
+ &:focus {
79
+ color: $navbarLinkColorHover;
78
80
  }
79
81
  }
80
82
 
@@ -95,7 +97,9 @@
95
97
  }
96
98
  .navbar .btn-group .btn,
97
99
  .navbar .input-prepend .btn,
98
- .navbar .input-append .btn {
100
+ .navbar .input-append .btn,
101
+ .navbar .input-prepend .btn-group,
102
+ .navbar .input-append .btn-group {
99
103
  margin-top: 0; // then undo the margin here so we don't accidentally double it
100
104
  }
101
105
 
@@ -245,13 +249,12 @@
245
249
  }
246
250
  .navbar .nav .dropdown-toggle .caret {
247
251
  margin-top: 8px;
248
-
249
252
  }
250
253
 
251
- // Hover
254
+ // Hover/focus
252
255
  .navbar .nav > li > a:focus,
253
256
  .navbar .nav > li > a:hover {
254
- background-color: $navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
257
+ background-color: $navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover/:focus from .active
255
258
  color: $navbarLinkColorHover;
256
259
  text-decoration: none;
257
260
  }
@@ -335,10 +338,11 @@
335
338
  }
336
339
  }
337
340
 
338
- // Caret should match text color on hover
339
- .navbar .nav li.dropdown > a:hover .caret {
340
- border-top-color: $navbarLinkColorActive;
341
- border-bottom-color: $navbarLinkColorActive;
341
+ // Caret should match text color on hover/focus
342
+ .navbar .nav li.dropdown > a:hover .caret,
343
+ .navbar .nav li.dropdown > a:focus .caret {
344
+ border-top-color: $navbarLinkColorHover;
345
+ border-bottom-color: $navbarLinkColorHover;
342
346
  }
343
347
 
344
348
  // Remove background color from open dropdown
@@ -395,7 +399,8 @@
395
399
  .nav > li > a {
396
400
  color: $navbarInverseLinkColor;
397
401
  text-shadow: 0 -1px 0 rgba(0,0,0,.25);
398
- &:hover {
402
+ &:hover,
403
+ &:focus {
399
404
  color: $navbarInverseLinkColorHover;
400
405
  }
401
406
  }
@@ -424,7 +429,8 @@
424
429
  // Inline text links
425
430
  .navbar-link {
426
431
  color: $navbarInverseLinkColor;
427
- &:hover {
432
+ &:hover,
433
+ &:focus {
428
434
  color: $navbarInverseLinkColorHover;
429
435
  }
430
436
  }
@@ -442,7 +448,8 @@
442
448
  background-color: $navbarInverseLinkBackgroundActive;
443
449
  color: $navbarInverseLinkColorActive;
444
450
  }
445
- .nav li.dropdown > a:hover .caret {
451
+ .nav li.dropdown > a:hover .caret,
452
+ .nav li.dropdown > a:focus .caret {
446
453
  border-top-color: $navbarInverseLinkColorActive;
447
454
  border-bottom-color: $navbarInverseLinkColorActive;
448
455
  }