padrino-admin 0.11.3 → 0.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +3 -3
- data/lib/padrino-admin/access_control.rb +46 -47
- data/lib/padrino-admin/bootstrap-less/alerts.less +29 -55
- data/lib/padrino-admin/bootstrap-less/badges.less +13 -15
- data/lib/padrino-admin/bootstrap-less/bootstrap.less +17 -21
- data/lib/padrino-admin/bootstrap-less/breadcrumbs.less +6 -11
- data/lib/padrino-admin/bootstrap-less/button-groups.less +114 -32
- data/lib/padrino-admin/bootstrap-less/buttons.less +41 -41
- data/lib/padrino-admin/bootstrap-less/carousel.less +43 -18
- data/lib/padrino-admin/bootstrap-less/close.less +4 -4
- data/lib/padrino-admin/bootstrap-less/code.less +8 -10
- data/lib/padrino-admin/bootstrap-less/component-animations.less +10 -4
- data/lib/padrino-admin/bootstrap-less/dropdowns.less +78 -51
- data/lib/padrino-admin/bootstrap-less/forms.less +183 -274
- data/lib/padrino-admin/bootstrap-less/glyphicons.less +232 -0
- data/lib/padrino-admin/bootstrap-less/grid.less +230 -88
- data/lib/padrino-admin/bootstrap-less/input-groups.less +127 -0
- data/lib/padrino-admin/bootstrap-less/jumbotron.less +16 -8
- data/lib/padrino-admin/bootstrap-less/labels.less +25 -37
- data/lib/padrino-admin/bootstrap-less/list-group.less +34 -35
- data/lib/padrino-admin/bootstrap-less/media.less +7 -5
- data/lib/padrino-admin/bootstrap-less/mixins.less +321 -108
- data/lib/padrino-admin/bootstrap-less/modals.less +24 -20
- data/lib/padrino-admin/bootstrap-less/navbar.less +474 -216
- data/lib/padrino-admin/bootstrap-less/navs.less +67 -85
- data/lib/padrino-admin/bootstrap-less/pager.less +4 -4
- data/lib/padrino-admin/bootstrap-less/pagination.less +64 -69
- data/lib/padrino-admin/bootstrap-less/panels.less +114 -62
- data/lib/padrino-admin/bootstrap-less/popovers.less +18 -18
- data/lib/padrino-admin/bootstrap-less/print.less +22 -7
- data/lib/padrino-admin/bootstrap-less/progress-bars.less +10 -33
- data/lib/padrino-admin/bootstrap-less/responsive-utilities.less +141 -40
- data/lib/padrino-admin/bootstrap-less/scaffolding.less +66 -19
- data/lib/padrino-admin/bootstrap-less/tables.less +154 -158
- data/lib/padrino-admin/bootstrap-less/theme.less +232 -0
- data/lib/padrino-admin/bootstrap-less/thumbnails.less +9 -20
- data/lib/padrino-admin/bootstrap-less/tooltip.less +3 -3
- data/lib/padrino-admin/bootstrap-less/type.less +47 -55
- data/lib/padrino-admin/bootstrap-less/utilities.less +2 -2
- data/lib/padrino-admin/bootstrap-less/variables.less +289 -93
- data/lib/padrino-admin/bootstrap-less/wells.less +2 -2
- data/lib/padrino-admin/generators/actions.rb +11 -10
- data/lib/padrino-admin/generators/admin_app.rb +11 -11
- data/lib/padrino-admin/generators/admin_page.rb +9 -9
- data/lib/padrino-admin/generators/orm.rb +6 -7
- data/lib/padrino-admin/generators/templates/account/activerecord.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/couchrest.rb.tt +16 -16
- data/lib/padrino-admin/generators/templates/account/datamapper.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/minirecord.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/mongoid.rb.tt +8 -8
- data/lib/padrino-admin/generators/templates/account/mongomapper.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/ohm.rb.tt +9 -9
- data/lib/padrino-admin/generators/templates/account/sequel.rb.tt +8 -8
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/affix.js +9 -3
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/alert.js +4 -2
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +4 -4
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/button.js +9 -5
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/carousel.js +19 -12
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/collapse.js +68 -45
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/dropdown.js +6 -7
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/modal.js +43 -40
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/popover.js +16 -10
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/scrollspy.js +6 -4
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tab.js +4 -2
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tooltip.js +78 -48
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/transition.js +10 -1
- data/lib/padrino-admin/generators/templates/assets/stylesheets/application.css +1 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap.css +622 -334
- data/lib/padrino-admin/generators/templates/erb/app/layouts/error.erb.tt +2 -2
- data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +9 -9
- data/lib/padrino-admin/generators/templates/erb/page/_form.erb.tt +3 -3
- data/lib/padrino-admin/generators/templates/erb/page/index.erb.tt +3 -3
- data/lib/padrino-admin/generators/templates/haml/app/layouts/error.haml.tt +1 -1
- data/lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt +9 -7
- data/lib/padrino-admin/generators/templates/haml/page/_form.haml.tt +2 -2
- data/lib/padrino-admin/generators/templates/haml/page/index.haml.tt +2 -2
- data/lib/padrino-admin/generators/templates/page/controller.rb.tt +3 -3
- data/lib/padrino-admin/generators/templates/slim/app/layouts/error.slim.tt +1 -1
- data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +9 -7
- data/lib/padrino-admin/generators/templates/slim/page/_form.slim.tt +2 -2
- data/lib/padrino-admin/generators/templates/slim/page/index.slim.tt +2 -2
- data/lib/padrino-admin/helpers/authentication_helpers.rb +35 -35
- data/lib/padrino-admin/helpers/view_helpers.rb +12 -19
- data/lib/padrino-admin/utils/crypt.rb +10 -9
- data/lib/padrino-admin.rb +4 -5
- data/test/fixtures/data_mapper.rb +10 -9
- data/test/generators/test_account_model_generator.rb +2 -2
- metadata +14 -21
@@ -3,12 +3,9 @@
|
|
3
3
|
// --------------------------------------------------
|
4
4
|
|
5
5
|
|
6
|
-
//
|
7
|
-
//
|
8
|
-
|
9
|
-
form {
|
10
|
-
margin: 0;
|
11
|
-
}
|
6
|
+
// Normalize non-controls
|
7
|
+
//
|
8
|
+
// Restyle and baseline non-control form elements.
|
12
9
|
|
13
10
|
fieldset {
|
14
11
|
padding: 0;
|
@@ -23,9 +20,9 @@ legend {
|
|
23
20
|
margin-bottom: @line-height-computed;
|
24
21
|
font-size: (@font-size-base * 1.5);
|
25
22
|
line-height: inherit;
|
26
|
-
color: @
|
23
|
+
color: @legend-color;
|
27
24
|
border: 0;
|
28
|
-
border-bottom: 1px solid
|
25
|
+
border-bottom: 1px solid @legend-border-color;
|
29
26
|
}
|
30
27
|
|
31
28
|
label {
|
@@ -34,86 +31,14 @@ label {
|
|
34
31
|
font-weight: bold;
|
35
32
|
}
|
36
33
|
|
37
|
-
// Form controls
|
38
|
-
// -------------------------
|
39
|
-
|
40
|
-
// Shared size and type resets
|
41
|
-
select,
|
42
|
-
textarea,
|
43
|
-
input[type="text"],
|
44
|
-
input[type="password"],
|
45
|
-
input[type="datetime"],
|
46
|
-
input[type="datetime-local"],
|
47
|
-
input[type="date"],
|
48
|
-
input[type="month"],
|
49
|
-
input[type="time"],
|
50
|
-
input[type="week"],
|
51
|
-
input[type="number"],
|
52
|
-
input[type="email"],
|
53
|
-
input[type="url"],
|
54
|
-
input[type="search"],
|
55
|
-
input[type="tel"],
|
56
|
-
input[type="color"] {
|
57
|
-
display: block;
|
58
|
-
min-height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
|
59
|
-
padding: @padding-base-vertical @padding-base-horizontal;
|
60
|
-
font-size: @font-size-base;
|
61
|
-
line-height: @line-height-base;
|
62
|
-
color: @gray;
|
63
|
-
vertical-align: middle;
|
64
|
-
background-color: @input-bg;
|
65
|
-
border: 1px solid @input-border;
|
66
|
-
border-radius: @input-border-radius;
|
67
|
-
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
|
68
|
-
.transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s");
|
69
34
|
|
70
|
-
|
71
|
-
border-color: rgba(82,168,236,.8);
|
72
|
-
outline: 0;
|
73
|
-
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
|
74
|
-
}
|
75
|
-
|
76
|
-
// Disabled and read-only inputs
|
77
|
-
// Note: HTML5 says that inputs under a fieldset > legend:first-child won't be
|
78
|
-
// disabled if the fieldset is disabled. Due to implementation difficulty,
|
79
|
-
// we don't honor that edge case; we style them as disabled anyway.
|
80
|
-
&[disabled],
|
81
|
-
&[readonly],
|
82
|
-
fieldset[disabled] & {
|
83
|
-
cursor: not-allowed;
|
84
|
-
background-color: @input-bg-disabled;
|
85
|
-
}
|
86
|
-
}
|
87
|
-
|
88
|
-
// Reset appearance properties for textual inputs and textarea
|
89
|
-
// Can't be on input[type=*] selectors or it's too specific
|
90
|
-
input,
|
91
|
-
select,
|
92
|
-
textarea {
|
93
|
-
width: 100%;
|
94
|
-
}
|
95
|
-
|
96
|
-
// Reset width of input images, buttons, radios, checkboxes
|
97
|
-
input[type="file"],
|
98
|
-
input[type="image"],
|
99
|
-
input[type="submit"],
|
100
|
-
input[type="reset"],
|
101
|
-
input[type="button"],
|
102
|
-
input[type="radio"],
|
103
|
-
input[type="checkbox"] {
|
104
|
-
width: auto; // Override of generic input selector
|
105
|
-
}
|
35
|
+
// Normalize form controls
|
106
36
|
|
107
37
|
// Override content-box in Normalize (* isn't specific enough)
|
108
38
|
input[type="search"] {
|
109
39
|
.box-sizing(border-box);
|
110
40
|
}
|
111
41
|
|
112
|
-
// Reset height since textareas have rows
|
113
|
-
textarea {
|
114
|
-
height: auto;
|
115
|
-
}
|
116
|
-
|
117
42
|
// Position radios and checkboxes better
|
118
43
|
input[type="radio"],
|
119
44
|
input[type="checkbox"] {
|
@@ -123,10 +48,8 @@ input[type="checkbox"] {
|
|
123
48
|
}
|
124
49
|
|
125
50
|
// Set the height of select and file controls to match text inputs
|
126
|
-
select,
|
127
51
|
input[type="file"] {
|
128
|
-
|
129
|
-
line-height: @input-height-base;
|
52
|
+
display: block;
|
130
53
|
}
|
131
54
|
|
132
55
|
// Make multiple select elements height not fixed
|
@@ -135,7 +58,7 @@ select[size] {
|
|
135
58
|
height: auto;
|
136
59
|
}
|
137
60
|
|
138
|
-
// Fix optgroup Firefox bug per https://github.com/
|
61
|
+
// Fix optgroup Firefox bug per https://github.com/twbs/bootstrap/issues/7611
|
139
62
|
select optgroup {
|
140
63
|
font-size: inherit;
|
141
64
|
font-style: inherit;
|
@@ -151,29 +74,96 @@ input[type="checkbox"]:focus {
|
|
151
74
|
|
152
75
|
// Fix for Chrome number input
|
153
76
|
// Setting certain font-sizes causes the `I` bar to appear on hover of the bottom increment button.
|
154
|
-
// See https://github.com/
|
77
|
+
// See https://github.com/twbs/bootstrap/issues/8350 for more.
|
155
78
|
input[type="number"] {
|
156
79
|
&::-webkit-outer-spin-button,
|
157
|
-
&::-webkit-inner-spin-button
|
80
|
+
&::-webkit-inner-spin-button {
|
158
81
|
height: auto;
|
159
82
|
}
|
160
83
|
}
|
161
84
|
|
162
85
|
|
163
86
|
// Placeholder
|
164
|
-
//
|
165
|
-
|
166
|
-
//
|
167
|
-
|
168
|
-
textarea {
|
87
|
+
//
|
88
|
+
// Placeholder text gets special styles because when browsers invalidate entire
|
89
|
+
// lines if it doesn't understand a selector/
|
90
|
+
.form-control {
|
169
91
|
.placeholder();
|
170
92
|
}
|
171
93
|
|
172
94
|
|
173
|
-
//
|
174
|
-
//
|
95
|
+
// Common form controls
|
96
|
+
//
|
97
|
+
// Shared size and type resets for form controls. Apply `.form-control` to any
|
98
|
+
// of the following form controls:
|
99
|
+
//
|
100
|
+
// select
|
101
|
+
// textarea
|
102
|
+
// input[type="text"]
|
103
|
+
// input[type="password"]
|
104
|
+
// input[type="datetime"]
|
105
|
+
// input[type="datetime-local"]
|
106
|
+
// input[type="date"]
|
107
|
+
// input[type="month"]
|
108
|
+
// input[type="time"]
|
109
|
+
// input[type="week"]
|
110
|
+
// input[type="number"]
|
111
|
+
// input[type="email"]
|
112
|
+
// input[type="url"]
|
113
|
+
// input[type="search"]
|
114
|
+
// input[type="tel"]
|
115
|
+
// input[type="color"]
|
116
|
+
|
117
|
+
.form-control {
|
118
|
+
display: block;
|
119
|
+
width: 100%;
|
120
|
+
height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
|
121
|
+
padding: @padding-base-vertical @padding-base-horizontal;
|
122
|
+
font-size: @font-size-base;
|
123
|
+
line-height: @line-height-base;
|
124
|
+
color: @input-color;
|
125
|
+
vertical-align: middle;
|
126
|
+
background-color: @input-bg;
|
127
|
+
border: 1px solid @input-border;
|
128
|
+
border-radius: @input-border-radius;
|
129
|
+
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
|
130
|
+
.transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s");
|
131
|
+
|
132
|
+
// Customize the `:focus` state to imitate native WebKit styles.
|
133
|
+
.form-control-focus();
|
134
|
+
|
135
|
+
// Disabled and read-only inputs
|
136
|
+
// Note: HTML5 says that controls under a fieldset > legend:first-child won't
|
137
|
+
// be disabled if the fieldset is disabled. Due to implementation difficulty,
|
138
|
+
// we don't honor that edge case; we style them as disabled anyway.
|
139
|
+
&[disabled],
|
140
|
+
&[readonly],
|
141
|
+
fieldset[disabled] & {
|
142
|
+
cursor: not-allowed;
|
143
|
+
background-color: @input-bg-disabled;
|
144
|
+
}
|
145
|
+
|
146
|
+
// Reset height for `textarea`s
|
147
|
+
textarea& {
|
148
|
+
height: auto;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
|
153
|
+
// Form groups
|
154
|
+
//
|
155
|
+
// Designed to help with the organization and spacing of vertical forms. For
|
156
|
+
// horizontal forms, use the predefined grid classes.
|
157
|
+
|
158
|
+
.form-group {
|
159
|
+
margin-bottom: 15px;
|
160
|
+
}
|
161
|
+
|
162
|
+
|
163
|
+
// Checkboxes and radios
|
164
|
+
//
|
165
|
+
// Indent the labels to position radios/checkboxes as hanging controls.
|
175
166
|
|
176
|
-
// Indent the labels to position radios/checkboxes as hanging
|
177
167
|
.radio,
|
178
168
|
.checkbox {
|
179
169
|
display: block;
|
@@ -201,19 +191,10 @@ textarea {
|
|
201
191
|
margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
|
202
192
|
}
|
203
193
|
|
204
|
-
/*
|
205
|
-
// Move the options list down to align with labels
|
206
|
-
.controls > .radio:first-child,
|
207
|
-
.controls > .checkbox:first-child {
|
208
|
-
padding-top: 5px; // has to be padding because margin collapses
|
209
|
-
}
|
210
|
-
*/
|
211
|
-
|
212
194
|
// Radios and checkboxes on same line
|
213
195
|
.radio-inline,
|
214
196
|
.checkbox-inline {
|
215
197
|
display: inline-block;
|
216
|
-
// padding-top: 5px;
|
217
198
|
padding-left: 20px;
|
218
199
|
margin-bottom: 0;
|
219
200
|
vertical-align: middle;
|
@@ -226,64 +207,64 @@ textarea {
|
|
226
207
|
margin-left: 10px; // space out consecutive inline controls
|
227
208
|
}
|
228
209
|
|
229
|
-
|
230
|
-
|
231
|
-
//
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
input[type="month"],
|
242
|
-
input[type="time"],
|
243
|
-
input[type="week"],
|
244
|
-
input[type="number"],
|
245
|
-
input[type="email"],
|
246
|
-
input[type="url"],
|
247
|
-
input[type="search"],
|
248
|
-
input[type="tel"],
|
249
|
-
input[type="color"] {
|
250
|
-
&.input-large {
|
251
|
-
min-height: @input-height-large;
|
252
|
-
padding: @padding-large-vertical @padding-large-horizontal;
|
253
|
-
font-size: @font-size-large;
|
254
|
-
border-radius: @border-radius-large;
|
255
|
-
}
|
256
|
-
&.input-small {
|
257
|
-
min-height: @input-height-small;
|
258
|
-
padding: @padding-small-vertical @padding-small-horizontal;
|
259
|
-
font-size: @font-size-small;
|
260
|
-
border-radius: @border-radius-small;
|
210
|
+
// Apply same disabled cursor tweak as for inputs
|
211
|
+
//
|
212
|
+
// Note: Neither radios nor checkboxes can be readonly.
|
213
|
+
input[type="radio"],
|
214
|
+
input[type="checkbox"],
|
215
|
+
.radio,
|
216
|
+
.radio-inline,
|
217
|
+
.checkbox,
|
218
|
+
.checkbox-inline {
|
219
|
+
&[disabled],
|
220
|
+
fieldset[disabled] & {
|
221
|
+
cursor: not-allowed;
|
261
222
|
}
|
262
223
|
}
|
263
224
|
|
225
|
+
// Form control sizing
|
226
|
+
.input-sm {
|
227
|
+
.input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
|
228
|
+
}
|
229
|
+
|
230
|
+
.input-lg {
|
231
|
+
.input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
|
232
|
+
}
|
264
233
|
|
265
234
|
|
266
|
-
//
|
267
|
-
//
|
235
|
+
// Form control feedback states
|
236
|
+
//
|
237
|
+
// Apply contextual and semantic states to individual form controls.
|
268
238
|
|
269
239
|
// Warning
|
270
240
|
.has-warning {
|
271
|
-
.form-
|
241
|
+
.form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);
|
272
242
|
}
|
273
243
|
// Error
|
274
244
|
.has-error {
|
275
|
-
.form-
|
245
|
+
.form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);
|
276
246
|
}
|
277
247
|
// Success
|
278
248
|
.has-success {
|
279
|
-
.form-
|
249
|
+
.form-control-validation(@state-success-text; @state-success-text; @state-success-bg);
|
280
250
|
}
|
281
251
|
|
282
252
|
|
253
|
+
// Static form control text
|
254
|
+
//
|
255
|
+
// Apply class to a `p` element to make any string of text align with labels in
|
256
|
+
// a horizontal form layout.
|
283
257
|
|
258
|
+
.form-control-static {
|
259
|
+
margin-bottom: 0; // Remove default margin from `p`
|
260
|
+
padding-top: (@padding-base-vertical + 1);
|
261
|
+
}
|
284
262
|
|
285
|
-
|
286
|
-
//
|
263
|
+
|
264
|
+
// Help text
|
265
|
+
//
|
266
|
+
// Apply to any element you wish to create light text for placement immediately
|
267
|
+
// below a form control. Use for general help, formatting, or instructional text.
|
287
268
|
|
288
269
|
.help-block {
|
289
270
|
display: block; // account for any element using help-block
|
@@ -294,151 +275,79 @@ input[type="color"] {
|
|
294
275
|
|
295
276
|
|
296
277
|
|
297
|
-
//
|
298
|
-
//
|
299
|
-
|
300
|
-
//
|
301
|
-
//
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
&.col {
|
308
|
-
float: none;
|
309
|
-
padding-left: 0;
|
310
|
-
padding-right: 0;
|
311
|
-
}
|
312
|
-
|
313
|
-
input,
|
314
|
-
select {
|
315
|
-
width: 100%;
|
316
|
-
margin-bottom: 0;
|
317
|
-
}
|
318
|
-
}
|
319
|
-
|
320
|
-
// Display as table-cell
|
321
|
-
// -------------------------
|
322
|
-
.input-group-addon,
|
323
|
-
.input-group-btn,
|
324
|
-
.input-group input {
|
325
|
-
display: table-cell;
|
278
|
+
// Inline forms
|
279
|
+
//
|
280
|
+
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
|
281
|
+
// forms begin stacked on extra small (mobile) devices and then go inline when
|
282
|
+
// viewports reach <768px.
|
283
|
+
//
|
284
|
+
// Requires wrapping inputs and labels with `.form-group` for proper display of
|
285
|
+
// default HTML form controls and our custom form controls (e.g., input groups).
|
286
|
+
//
|
287
|
+
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
|
326
288
|
|
327
|
-
|
328
|
-
border-radius: 0;
|
329
|
-
}
|
330
|
-
}
|
331
|
-
// Addon and addon wrapper for buttons
|
332
|
-
.input-group-addon,
|
333
|
-
.input-group-btn {
|
334
|
-
width: 1%;
|
335
|
-
white-space: nowrap;
|
336
|
-
vertical-align: middle; // Match the inputs
|
337
|
-
}
|
289
|
+
.form-inline {
|
338
290
|
|
339
|
-
//
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
291
|
+
// Kick in the inline
|
292
|
+
@media (min-width: @screen-tablet) {
|
293
|
+
// Inline-block all the things for "inline"
|
294
|
+
.form-group {
|
295
|
+
display: inline-block;
|
296
|
+
margin-bottom: 0;
|
297
|
+
vertical-align: middle;
|
298
|
+
}
|
299
|
+
|
300
|
+
// In navbar-form, allow folks to *not* use `.form-group`
|
301
|
+
.form-control {
|
302
|
+
display: inline-block;
|
303
|
+
}
|
304
|
+
|
305
|
+
// Remove default margin on radios/checkboxes that were used for stacking, and
|
306
|
+
// then undo the floating of radios and checkboxes to match (which also avoids
|
307
|
+
// a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
|
308
|
+
.radio,
|
309
|
+
.checkbox {
|
310
|
+
display: inline-block;
|
311
|
+
margin-top: 0;
|
312
|
+
margin-bottom: 0;
|
313
|
+
padding-left: 0;
|
314
|
+
}
|
315
|
+
.radio input[type="radio"],
|
316
|
+
.checkbox input[type="checkbox"] {
|
317
|
+
float: none;
|
318
|
+
margin-left: 0;
|
319
|
+
}
|
362
320
|
}
|
363
321
|
}
|
364
322
|
|
365
|
-
// Reset rounded corners
|
366
|
-
.input-group input:first-child,
|
367
|
-
.input-group-addon:first-child,
|
368
|
-
.input-group-btn:first-child > .btn,
|
369
|
-
.input-group-btn:first-child > .dropdown-toggle,
|
370
|
-
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
|
371
|
-
.border-right-radius(0);
|
372
|
-
}
|
373
|
-
.input-group-addon:first-child {
|
374
|
-
border-right: 0;
|
375
|
-
}
|
376
|
-
.input-group input:last-child,
|
377
|
-
.input-group-addon:last-child,
|
378
|
-
.input-group-btn:last-child > .btn,
|
379
|
-
.input-group-btn:last-child > .dropdown-toggle,
|
380
|
-
.input-group-btn:first-child > .btn:not(:first-child) {
|
381
|
-
.border-left-radius(0);
|
382
|
-
}
|
383
|
-
.input-group-addon:last-child {
|
384
|
-
border-left: 0;
|
385
|
-
}
|
386
|
-
|
387
|
-
// Button input groups
|
388
|
-
// -------------------------
|
389
|
-
.input-group-btn {
|
390
|
-
position: relative;
|
391
|
-
white-space: nowrap;
|
392
|
-
}
|
393
|
-
.input-group-btn > .btn {
|
394
|
-
position: relative;
|
395
|
-
float: left; // Collapse white-space
|
396
|
-
+ .btn {
|
397
|
-
margin-left: -1px;
|
398
|
-
}
|
399
|
-
// Bring the "active" button to the front
|
400
|
-
&:hover,
|
401
|
-
&:active {
|
402
|
-
z-index: 2;
|
403
|
-
}
|
404
|
-
}
|
405
323
|
|
324
|
+
// Horizontal forms
|
325
|
+
//
|
326
|
+
// Horizontal forms are built on grid classes and allow you to create forms with
|
327
|
+
// labels on the left and inputs on the right.
|
406
328
|
|
407
|
-
|
408
|
-
// --------------------------------------------------
|
329
|
+
.form-horizontal {
|
409
330
|
|
410
|
-
|
411
|
-
|
412
|
-
select,
|
413
|
-
textarea,
|
414
|
-
.radio,
|
415
|
-
.checkbox {
|
416
|
-
display: inline-block;
|
417
|
-
}
|
331
|
+
// Consistent vertical alignment of labels, radios, and checkboxes
|
332
|
+
.control-label,
|
418
333
|
.radio,
|
419
|
-
.checkbox
|
334
|
+
.checkbox,
|
335
|
+
.radio-inline,
|
336
|
+
.checkbox-inline {
|
420
337
|
margin-top: 0;
|
421
338
|
margin-bottom: 0;
|
339
|
+
padding-top: (@padding-base-vertical + 1); // Default padding plus a border
|
422
340
|
}
|
423
|
-
}
|
424
|
-
|
425
|
-
|
426
|
-
// Horizontal forms
|
427
|
-
// --------------------------------------------------
|
428
|
-
// Horizontal forms are built on grid classes.
|
429
341
|
|
430
|
-
|
431
|
-
.
|
432
|
-
|
342
|
+
// Make form groups behave like rows
|
343
|
+
.form-group {
|
344
|
+
.make-row();
|
433
345
|
}
|
434
|
-
.control-label {
|
435
|
-
padding-top: 6px;
|
436
|
-
}
|
437
|
-
}
|
438
346
|
|
439
|
-
// Only right align form labels here when the columns stop stacking
|
440
|
-
@media (min-width:
|
441
|
-
|
442
|
-
|
347
|
+
// Only right align form labels here when the columns stop stacking
|
348
|
+
@media (min-width: @screen-tablet) {
|
349
|
+
.control-label {
|
350
|
+
text-align: right;
|
351
|
+
}
|
443
352
|
}
|
444
353
|
}
|