padrino-admin 0.12.2 → 0.12.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/lib/padrino-admin.rb +9 -17
  3. data/lib/padrino-admin/access_control.rb +1 -0
  4. data/lib/padrino-admin/bootstrap-less/alerts.less +1 -1
  5. data/lib/padrino-admin/bootstrap-less/badges.less +10 -6
  6. data/lib/padrino-admin/bootstrap-less/bootstrap.less +0 -10
  7. data/lib/padrino-admin/bootstrap-less/breadcrumbs.less +6 -3
  8. data/lib/padrino-admin/bootstrap-less/button-groups.less +22 -44
  9. data/lib/padrino-admin/bootstrap-less/buttons.less +12 -17
  10. data/lib/padrino-admin/bootstrap-less/carousel.less +33 -10
  11. data/lib/padrino-admin/bootstrap-less/code.less +15 -8
  12. data/lib/padrino-admin/bootstrap-less/dropdowns.less +31 -11
  13. data/lib/padrino-admin/bootstrap-less/font-awesome/bordered-pulled.less +16 -0
  14. data/lib/padrino-admin/bootstrap-less/font-awesome/core.less +9 -126
  15. data/lib/padrino-admin/bootstrap-less/font-awesome/fixed-width.less +6 -0
  16. data/lib/padrino-admin/bootstrap-less/font-awesome/font-awesome.less +14 -30
  17. data/lib/padrino-admin/bootstrap-less/font-awesome/icons.less +409 -378
  18. data/lib/padrino-admin/bootstrap-less/font-awesome/larger.less +13 -0
  19. data/lib/padrino-admin/bootstrap-less/font-awesome/list.less +19 -0
  20. data/lib/padrino-admin/bootstrap-less/font-awesome/mixins.less +14 -42
  21. data/lib/padrino-admin/bootstrap-less/font-awesome/path.less +6 -6
  22. data/lib/padrino-admin/bootstrap-less/font-awesome/rotated-flipped.less +9 -0
  23. data/lib/padrino-admin/bootstrap-less/font-awesome/spinning.less +30 -0
  24. data/lib/padrino-admin/bootstrap-less/font-awesome/stacked.less +20 -0
  25. data/lib/padrino-admin/bootstrap-less/font-awesome/variables.less +377 -731
  26. data/lib/padrino-admin/bootstrap-less/forms.less +105 -39
  27. data/lib/padrino-admin/bootstrap-less/glyphicons.less +16 -15
  28. data/lib/padrino-admin/bootstrap-less/grid.less +59 -305
  29. data/lib/padrino-admin/bootstrap-less/input-groups.less +43 -13
  30. data/lib/padrino-admin/bootstrap-less/jumbotron.less +12 -8
  31. data/lib/padrino-admin/bootstrap-less/labels.less +6 -0
  32. data/lib/padrino-admin/bootstrap-less/list-group.less +37 -15
  33. data/lib/padrino-admin/bootstrap-less/mixins.less +283 -80
  34. data/lib/padrino-admin/bootstrap-less/modals.less +19 -22
  35. data/lib/padrino-admin/bootstrap-less/navbar.less +73 -78
  36. data/lib/padrino-admin/bootstrap-less/navs.less +45 -32
  37. data/lib/padrino-admin/bootstrap-less/normalize.less +148 -121
  38. data/lib/padrino-admin/bootstrap-less/padrino-admin.less +3 -1
  39. data/lib/padrino-admin/bootstrap-less/pager.less +5 -5
  40. data/lib/padrino-admin/bootstrap-less/pagination.less +8 -3
  41. data/lib/padrino-admin/bootstrap-less/panels.less +102 -20
  42. data/lib/padrino-admin/bootstrap-less/print.less +6 -5
  43. data/lib/padrino-admin/bootstrap-less/progress-bars.less +4 -19
  44. data/lib/padrino-admin/bootstrap-less/responsive-utilities.less +32 -159
  45. data/lib/padrino-admin/bootstrap-less/scaffolding.less +18 -14
  46. data/lib/padrino-admin/bootstrap-less/tables.less +47 -50
  47. data/lib/padrino-admin/bootstrap-less/theme.less +33 -18
  48. data/lib/padrino-admin/bootstrap-less/thumbnails.less +23 -18
  49. data/lib/padrino-admin/bootstrap-less/tooltip.less +9 -9
  50. data/lib/padrino-admin/bootstrap-less/type.less +139 -81
  51. data/lib/padrino-admin/bootstrap-less/utilities.less +15 -1
  52. data/lib/padrino-admin/bootstrap-less/variables.less +398 -191
  53. data/lib/padrino-admin/bootstrap-less/wells.less +1 -1
  54. data/lib/padrino-admin/generators/admin_app.rb +1 -1
  55. data/lib/padrino-admin/generators/templates/account/minirecord.rb.tt +1 -1
  56. data/lib/padrino-admin/generators/templates/assets/images/font/FontAwesome.otf +0 -0
  57. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.eot +0 -0
  58. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.svg +23 -8
  59. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.ttf +0 -0
  60. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.woff +0 -0
  61. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/affix.js +36 -25
  62. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/alert.js +7 -17
  63. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +6 -6
  64. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/button.js +26 -28
  65. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/carousel.js +22 -34
  66. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/collapse.js +9 -18
  67. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/dropdown.js +25 -32
  68. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/modal.js +27 -30
  69. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/popover.js +16 -23
  70. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/scrollspy.js +19 -24
  71. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tab.js +10 -20
  72. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tooltip.js +54 -41
  73. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/transition.js +13 -21
  74. data/lib/padrino-admin/generators/templates/assets/javascripts/jquery-1.11.0.min.js +4 -0
  75. data/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap.css +4 -1238
  76. data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/FontAwesome.otf +0 -0
  77. data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.eot +0 -0
  78. data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.svg +414 -0
  79. data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.ttf +0 -0
  80. data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.woff +0 -0
  81. data/lib/padrino-admin/generators/templates/erb/app/base/index.erb.tt +5 -5
  82. data/lib/padrino-admin/generators/templates/erb/app/errors/403.erb.tt +1 -1
  83. data/lib/padrino-admin/generators/templates/erb/app/errors/404.erb.tt +1 -1
  84. data/lib/padrino-admin/generators/templates/erb/app/errors/500.erb.tt +1 -1
  85. data/lib/padrino-admin/generators/templates/erb/app/layouts/application.erb.tt +2 -2
  86. data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +1 -1
  87. data/lib/padrino-admin/generators/templates/erb/page/index.erb.tt +5 -5
  88. data/lib/padrino-admin/generators/templates/haml/app/base/index.haml.tt +5 -5
  89. data/lib/padrino-admin/generators/templates/haml/app/errors/403.haml.tt +1 -1
  90. data/lib/padrino-admin/generators/templates/haml/app/errors/404.haml.tt +1 -1
  91. data/lib/padrino-admin/generators/templates/haml/app/errors/500.haml.tt +1 -1
  92. data/lib/padrino-admin/generators/templates/haml/app/layouts/application.haml.tt +2 -2
  93. data/lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt +2 -1
  94. data/lib/padrino-admin/generators/templates/haml/page/index.haml.tt +4 -4
  95. data/lib/padrino-admin/generators/templates/slim/app/base/index.slim.tt +5 -5
  96. data/lib/padrino-admin/generators/templates/slim/app/errors/403.slim.tt +1 -1
  97. data/lib/padrino-admin/generators/templates/slim/app/errors/404.slim.tt +1 -1
  98. data/lib/padrino-admin/generators/templates/slim/app/errors/500.slim.tt +1 -1
  99. data/lib/padrino-admin/generators/templates/slim/app/layouts/application.slim.tt +2 -2
  100. data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +1 -1
  101. data/lib/padrino-admin/generators/templates/slim/page/index.slim.tt +4 -4
  102. data/lib/padrino-admin/helpers/view_helpers.rb +1 -1
  103. data/lib/padrino-admin/locale/admin/zh_tw.yml +22 -22
  104. data/lib/padrino-admin/locale/orm/cs.yml +0 -25
  105. data/lib/padrino-admin/locale/orm/da.yml +0 -25
  106. data/lib/padrino-admin/locale/orm/de.yml +0 -25
  107. data/lib/padrino-admin/locale/orm/en.yml +0 -25
  108. data/lib/padrino-admin/locale/orm/es.yml +0 -25
  109. data/lib/padrino-admin/locale/orm/fr.yml +0 -25
  110. data/lib/padrino-admin/locale/orm/hu.yml +0 -25
  111. data/lib/padrino-admin/locale/orm/it.yml +0 -25
  112. data/lib/padrino-admin/locale/orm/ja.yml +0 -25
  113. data/lib/padrino-admin/locale/orm/lv.yml +0 -25
  114. data/lib/padrino-admin/locale/orm/nl.yml +0 -25
  115. data/lib/padrino-admin/locale/orm/no.yml +1 -26
  116. data/lib/padrino-admin/locale/orm/pt_br.yml +0 -25
  117. data/lib/padrino-admin/locale/orm/ro.yml +0 -25
  118. data/lib/padrino-admin/locale/orm/ru.yml +0 -25
  119. data/lib/padrino-admin/locale/orm/sv.yml +0 -25
  120. data/lib/padrino-admin/locale/orm/tr.yml +0 -25
  121. data/lib/padrino-admin/locale/orm/uk.yml +0 -25
  122. data/lib/padrino-admin/locale/orm/zh_cn.yml +0 -25
  123. data/lib/padrino-admin/locale/orm/zh_tw.yml +0 -25
  124. data/test/fixtures/data_mapper.rb +0 -41
  125. data/test/generators/test_admin_app_generator.rb +3 -6
  126. data/test/test_locale.rb +0 -33
  127. metadata +19 -14
  128. data/lib/padrino-admin/bootstrap-less/accordion.less +0 -31
  129. data/lib/padrino-admin/bootstrap-less/font-awesome-ie7.less +0 -1953
  130. data/lib/padrino-admin/bootstrap-less/font-awesome.less +0 -33
  131. data/lib/padrino-admin/bootstrap-less/font-awesome/bootstrap.less +0 -84
  132. data/lib/padrino-admin/bootstrap-less/font-awesome/extras.less +0 -93
  133. data/lib/padrino-admin/bootstrap-less/font-awesome/font-awesome-ie7.less +0 -1953
  134. data/lib/padrino-admin/generators/templates/assets/javascripts/jquery-1.9.0.min.js +0 -4
  135. data/lib/padrino-admin/utils/crypt.rb +0 -41
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10ff66cffdd5d7835371089b8a73b6eb42e5e85c
4
- data.tar.gz: f3da8b3bfebc8df965b7a5b82bb7673b09ac7287
3
+ metadata.gz: 8e8f185c5afa14e27b0d4c466db3b60739574400
4
+ data.tar.gz: 3cb729d7d12e50e5e21bf4f3514d49b71cf41973
5
5
  SHA512:
6
- metadata.gz: 4210af693f831978fec6f41a0f76a7717dc55cc9d25a2be4e02a8ccbe065026b5eb631c639f433d068708982c53a1ebe30e954ceaa882ca146b60b703b726682
7
- data.tar.gz: 9ae257671b3db25e8c7bfdb303ebfaa862d5ff54a2c05c8d18a707a233eb5887bf8103714c678acc7fde5d9e5a89ae846fbe466487f213f75f10682bea502f39
6
+ metadata.gz: 7cbe695665f6e343f802f67efba8f5372d22659a5dc1d0dcddaf8c91833313f64195e006476830af81ffad9c67109ccb9ae3e362f56dfa6063c5a8549985e51c
7
+ data.tar.gz: 9db072674cc0cce21c8f2131d72bca5a9ba29c95e351579382c0b88fafdcce7332295c528301e4a5779ada4628ff2637dbc0a43ec924acc7bf96aac199ed7e90
@@ -5,12 +5,6 @@ require 'padrino-helpers'
5
5
  FileSet.glob_require('padrino-admin/*.rb', __FILE__)
6
6
  FileSet.glob_require('padrino-admin/{helpers,utils}/*.rb', __FILE__)
7
7
 
8
-
9
- ##
10
- # Load our Padrino::Admin locales.
11
- #
12
- # I18n.load_path = Dir["#{File.dirname(__FILE__)}/padrino-admin/locale/*.yml"]
13
-
14
8
  module Padrino
15
9
  ##
16
10
  # Padrino::Admin is beautiful Ajax Admin, with these features:
@@ -20,19 +14,17 @@ module Padrino
20
14
  # Scaffold:: You can simply create a new "admin interface" simply providing a Model
21
15
  # Ajax Uploads:: You can upload file, manage them and attach them to any model in a quick and simple way (coming soon)
22
16
  #
23
- module Admin; end
17
+ module Admin
18
+ class << self
19
+ def registered(app)
20
+ # Load Padrino::Admin locales
21
+ I18n.load_path += Dir["#{File.dirname(__FILE__)}/padrino-admin/locale/**/*.yml"]
22
+ end
23
+ alias :included :registered
24
+ end
25
+ end
24
26
  end
25
27
 
26
- ##
27
- # We need to apply Padrino::Admin::Utils::Extensions
28
- #
29
- String.send(:include, Padrino::Admin::Utils::Crypt)
30
-
31
- ##
32
- # Load our Padrino::Admin locales
33
- #
34
- I18n.load_path += Dir["#{File.dirname(__FILE__)}/padrino-admin/locale/**/*.yml"]
35
-
36
28
  ##
37
29
  # Now we need to add admin generators to padrino-gen
38
30
  #
@@ -13,6 +13,7 @@ module Padrino
13
13
  # Method used by Padrino::Application when we register the extension.
14
14
  #
15
15
  def registered(app)
16
+ app.register Padrino::Admin unless app.extensions.include?(Padrino::Admin)
16
17
  app.set :session_id, "_padrino_#{File.basename(Padrino.root)}_#{app.app_name}".to_sym unless app.respond_to?(:session_id)
17
18
  app.set :admin_model, 'Account' unless app.respond_to?(:admin_model)
18
19
  app.helpers Padrino::Admin::Helpers::AuthenticationHelpers
@@ -15,7 +15,7 @@
15
15
  // Headings for larger alerts
16
16
  h4 {
17
17
  margin-top: 0;
18
- // Specified for the h4 to prevent conflicts of changing @headingsColor
18
+ // Specified for the h4 to prevent conflicts of changing @headings-color
19
19
  color: inherit;
20
20
  }
21
21
  // Provide class for links that match alerts
@@ -22,6 +22,16 @@
22
22
  &:empty {
23
23
  display: none;
24
24
  }
25
+
26
+ // Quick fix for badges in buttons
27
+ .btn & {
28
+ position: relative;
29
+ top: -1px;
30
+ }
31
+ .btn-xs & {
32
+ top: 0;
33
+ padding: 1px 5px;
34
+ }
25
35
  }
26
36
 
27
37
  // Hover state, but only for links
@@ -34,12 +44,6 @@ a.badge {
34
44
  }
35
45
  }
36
46
 
37
- // Quick fix for labels/badges in buttons
38
- .btn .badge {
39
- position: relative;
40
- top: -1px;
41
- }
42
-
43
47
  // Account for counters in navs
44
48
  a.list-group-item.active > .badge,
45
49
  .nav-pills > .active > a > .badge {
@@ -1,13 +1,3 @@
1
- /*!
2
- * Bootstrap v3.0.0
3
- *
4
- * Copyright 2013 Twitter, Inc
5
- * Licensed under the Apache License v2.0
6
- * http://www.apache.org/licenses/LICENSE-2.0
7
- *
8
- * Designed and built with all the love in the world by @mdo and @fat.
9
- */
10
-
11
1
  // Core variables and mixins
12
2
  @import "variables.less";
13
3
  @import "mixins.less";
@@ -4,19 +4,22 @@
4
4
 
5
5
 
6
6
  .breadcrumb {
7
- padding: 8px 15px;
7
+ padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
8
8
  margin-bottom: @line-height-computed;
9
9
  list-style: none;
10
10
  background-color: @breadcrumb-bg;
11
11
  border-radius: @border-radius-base;
12
+
12
13
  > li {
13
14
  display: inline-block;
14
- &+li:before {
15
- content: "/\00a0"; // Unicode space added since inline-block means non-collapsing white-space
15
+
16
+ + li:before {
17
+ content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
16
18
  padding: 0 5px;
17
19
  color: @breadcrumb-color;
18
20
  }
19
21
  }
22
+
20
23
  > .active {
21
24
  color: @breadcrumb-active-color;
22
25
  }
@@ -2,37 +2,6 @@
2
2
  // Button groups
3
3
  // --------------------------------------------------
4
4
 
5
- // Button carets
6
- //
7
- // Match the button text color to the arrow/caret for indicating dropdown-ness.
8
-
9
- .caret {
10
- .btn-default & {
11
- border-top-color: @btn-default-color;
12
- }
13
- .btn-primary &,
14
- .btn-success &,
15
- .btn-warning &,
16
- .btn-danger &,
17
- .btn-info & {
18
- border-top-color: #fff;
19
- }
20
- }
21
- .dropup {
22
- & .btn-default .caret {
23
- border-bottom-color: @btn-default-color;
24
- }
25
- .btn-primary,
26
- .btn-success,
27
- .btn-warning,
28
- .btn-danger,
29
- .btn-info {
30
- .caret {
31
- border-bottom-color: #fff;
32
- }
33
- }
34
- }
35
-
36
5
  // Make the div behave like a button
37
6
  .btn-group,
38
7
  .btn-group-vertical {
@@ -68,18 +37,17 @@
68
37
 
69
38
  // Optional: Group multiple button groups together for a toolbar
70
39
  .btn-toolbar {
71
- .clearfix();
40
+ margin-left: -5px; // Offset the first child's margin
41
+ &:extend(.clearfix all);
72
42
 
73
- .btn-group {
43
+ .btn-group,
44
+ .input-group {
74
45
  float: left;
75
46
  }
76
- // Space out series of button groups
77
47
  > .btn,
78
- > .btn-group {
79
- + .btn,
80
- + .btn-group {
81
- margin-left: 5px;
82
- }
48
+ > .btn-group,
49
+ > .input-group {
50
+ margin-left: 5px;
83
51
  }
84
52
  }
85
53
 
@@ -150,6 +118,11 @@
150
118
  // Remove the gradient and set the same inset shadow as the :active state
151
119
  .btn-group.open .dropdown-toggle {
152
120
  .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
121
+
122
+ // Show no shadow for `.btn-link` since it has no other button styles.
123
+ &.btn-link {
124
+ .box-shadow(none);
125
+ }
153
126
  }
154
127
 
155
128
 
@@ -173,7 +146,8 @@
173
146
 
174
147
  .btn-group-vertical {
175
148
  > .btn,
176
- > .btn-group {
149
+ > .btn-group,
150
+ > .btn-group > .btn {
177
151
  display: block;
178
152
  float: none;
179
153
  width: 100%;
@@ -182,7 +156,7 @@
182
156
 
183
157
  // Clear floats so dropdown menus can be properly placed
184
158
  > .btn-group {
185
- .clearfix();
159
+ &:extend(.clearfix all);
186
160
  > .btn {
187
161
  float: none;
188
162
  }
@@ -213,13 +187,13 @@
213
187
  .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
214
188
  border-radius: 0;
215
189
  }
216
- .btn-group-vertical > .btn-group:first-child {
190
+ .btn-group-vertical > .btn-group:first-child:not(:last-child) {
217
191
  > .btn:last-child,
218
192
  > .dropdown-toggle {
219
193
  .border-bottom-radius(0);
220
194
  }
221
195
  }
222
- .btn-group-vertical > .btn-group:last-child > .btn:first-child {
196
+ .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
223
197
  .border-top-radius(0);
224
198
  }
225
199
 
@@ -233,11 +207,15 @@
233
207
  width: 100%;
234
208
  table-layout: fixed;
235
209
  border-collapse: separate;
236
- .btn {
210
+ > .btn,
211
+ > .btn-group {
237
212
  float: none;
238
213
  display: table-cell;
239
214
  width: 1%;
240
215
  }
216
+ > .btn-group .btn {
217
+ width: 100%;
218
+ }
241
219
  }
242
220
 
243
221
 
@@ -6,20 +6,17 @@
6
6
  // Base styles
7
7
  // --------------------------------------------------
8
8
 
9
- // Core styles
10
9
  .btn {
11
10
  display: inline-block;
12
- padding: @padding-base-vertical @padding-base-horizontal;
13
11
  margin-bottom: 0; // For input.btn
14
- font-size: @font-size-base;
15
12
  font-weight: @btn-font-weight;
16
- line-height: @line-height-base;
17
13
  text-align: center;
18
14
  vertical-align: middle;
19
15
  cursor: pointer;
16
+ background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
20
17
  border: 1px solid transparent;
21
- border-radius: @border-radius-base;
22
18
  white-space: nowrap;
19
+ .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);
23
20
  .user-select(none);
24
21
 
25
22
  &:focus {
@@ -47,7 +44,6 @@
47
44
  .opacity(.65);
48
45
  .box-shadow(none);
49
46
  }
50
-
51
47
  }
52
48
 
53
49
 
@@ -60,14 +56,6 @@
60
56
  .btn-primary {
61
57
  .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
62
58
  }
63
- // Warning appears as orange
64
- .btn-warning {
65
- .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
66
- }
67
- // Danger and error appear as red
68
- .btn-danger {
69
- .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
70
- }
71
59
  // Success appears as green
72
60
  .btn-success {
73
61
  .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
@@ -76,6 +64,14 @@
76
64
  .btn-info {
77
65
  .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
78
66
  }
67
+ // Warning appears as orange
68
+ .btn-warning {
69
+ .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
70
+ }
71
+ // Danger and error appear as red
72
+ .btn-danger {
73
+ .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
74
+ }
79
75
 
80
76
 
81
77
  // Link buttons
@@ -125,13 +121,12 @@
125
121
  // line-height: ensure even-numbered height of button next to large input
126
122
  .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
127
123
  }
128
- .btn-sm,
129
- .btn-xs {
124
+ .btn-sm {
130
125
  // line-height: ensure proper height of button next to small input
131
126
  .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
132
127
  }
133
128
  .btn-xs {
134
- padding: 1px 5px;
129
+ .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small);
135
130
  }
136
131
 
137
132
 
@@ -75,7 +75,7 @@
75
75
  color: @carousel-control-color;
76
76
  text-align: center;
77
77
  text-shadow: @carousel-text-shadow;
78
- // We can't have this transition here because webkit cancels the carousel
78
+ // We can't have this transition here because WebKit cancels the carousel
79
79
  // animation if you trip this while in the middle of another animation.
80
80
 
81
81
  // Set gradients for backgrounds
@@ -91,6 +91,7 @@
91
91
  // Hover/focus state
92
92
  &:hover,
93
93
  &:focus {
94
+ outline: none;
94
95
  color: @carousel-control-color;
95
96
  text-decoration: none;
96
97
  .opacity(.9);
@@ -103,11 +104,18 @@
103
104
  .glyphicon-chevron-right {
104
105
  position: absolute;
105
106
  top: 50%;
106
- left: 50%;
107
107
  z-index: 5;
108
108
  display: inline-block;
109
109
  }
110
110
  .icon-prev,
111
+ .glyphicon-chevron-left {
112
+ left: 50%;
113
+ }
114
+ .icon-next,
115
+ .glyphicon-chevron-right {
116
+ right: 50%;
117
+ }
118
+ .icon-prev,
111
119
  .icon-next {
112
120
  width: 20px;
113
121
  height: 20px;
@@ -153,6 +161,17 @@
153
161
  border: 1px solid @carousel-indicator-border-color;
154
162
  border-radius: 10px;
155
163
  cursor: pointer;
164
+
165
+ // IE8-9 hack for event handling
166
+ //
167
+ // Internet Explorer 8-9 does not support clicks on elements without a set
168
+ // `background-color`. We cannot use `filter` since that's not viewed as a
169
+ // background color by the browser. Thus, a hack is needed.
170
+ //
171
+ // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we
172
+ // set alpha transparency for the best results possible.
173
+ background-color: #000 \9; // IE8
174
+ background-color: rgba(0,0,0,0); // IE9
156
175
  }
157
176
  .active {
158
177
  margin: 0;
@@ -183,16 +202,20 @@
183
202
 
184
203
 
185
204
  // Scale up controls for tablets and up
186
- @media screen and (min-width: @screen-tablet) {
205
+ @media screen and (min-width: @screen-sm-min) {
187
206
 
188
207
  // Scale up the controls a smidge
189
- .carousel-control .icon-prev,
190
- .carousel-control .icon-next {
191
- width: 30px;
192
- height: 30px;
193
- margin-top: -15px;
194
- margin-left: -15px;
195
- font-size: 30px;
208
+ .carousel-control {
209
+ .glyphicons-chevron-left,
210
+ .glyphicons-chevron-right,
211
+ .icon-prev,
212
+ .icon-next {
213
+ width: 30px;
214
+ height: 30px;
215
+ margin-top: -15px;
216
+ margin-left: -15px;
217
+ font-size: 30px;
218
+ }
196
219
  }
197
220
 
198
221
  // Show and left align the captions
@@ -1,11 +1,13 @@
1
1
  //
2
- // Code (inline and blocK)
2
+ // Code (inline and block)
3
3
  // --------------------------------------------------
4
4
 
5
5
 
6
6
  // Inline and block code styles
7
7
  code,
8
- pre {
8
+ kbd,
9
+ pre,
10
+ samp {
9
11
  font-family: @font-family-monospace;
10
12
  }
11
13
 
@@ -19,6 +21,16 @@ code {
19
21
  border-radius: @border-radius-base;
20
22
  }
21
23
 
24
+ // User input typically entered via keyboard
25
+ kbd {
26
+ padding: 2px 4px;
27
+ font-size: 90%;
28
+ color: @kbd-color;
29
+ background-color: @kbd-bg;
30
+ border-radius: @border-radius-small;
31
+ box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
32
+ }
33
+
22
34
  // Blocks of code
23
35
  pre {
24
36
  display: block;
@@ -33,11 +45,6 @@ pre {
33
45
  border: 1px solid @pre-border-color;
34
46
  border-radius: @border-radius-base;
35
47
 
36
- // Make prettyprint styles more spaced out for readability
37
- &.prettyprint {
38
- margin-bottom: @line-height-computed;
39
- }
40
-
41
48
  // Account for some code outputs that place code tags in pre tags
42
49
  code {
43
50
  padding: 0;
@@ -45,7 +52,7 @@ pre {
45
52
  color: inherit;
46
53
  white-space: pre-wrap;
47
54
  background-color: transparent;
48
- border: 0;
55
+ border-radius: 0;
49
56
  }
50
57
  }
51
58