spiderfw 0.6.21 → 0.6.22
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +33 -0
- data/Rakefile +0 -1
- data/VERSION +1 -1
- data/apps/core/admin/_init.rb +4 -0
- data/apps/core/admin/admin.rb +20 -4
- data/apps/core/admin/controllers/admin_controller.rb +63 -4
- data/apps/core/admin/controllers/app_admin_controller.rb +15 -0
- data/apps/core/admin/data/locale/it/LC_MESSAGES/admin.mo +0 -0
- data/apps/core/admin/po/admin.pot +33 -0
- data/apps/core/admin/po/it/admin.po +34 -0
- data/apps/core/admin/public/css/admin.css +13 -0
- data/apps/core/admin/public/css/login.css +51 -0
- data/apps/core/admin/public/css/sass/admin.css +198 -0
- data/apps/core/admin/public/css/sass/bootstrap/bootstrap.css +3107 -0
- data/apps/core/admin/public/img/css/header_bg.png +0 -0
- data/apps/core/admin/public/img/css/noise.png +0 -0
- data/apps/core/admin/public/img/css/side_bg.png +0 -0
- data/apps/core/admin/public/img/icons/logout.png +0 -0
- data/apps/core/admin/public/img/icons-s845a69dd9f.png +0 -0
- data/apps/core/admin/public/js/bootstrap-alerts.js +113 -0
- data/apps/core/admin/public/js/bootstrap-buttons.js +62 -0
- data/apps/core/admin/public/js/bootstrap-dropdown.js +55 -0
- data/apps/core/admin/public/js/bootstrap-modal.js +260 -0
- data/apps/core/admin/public/js/bootstrap-popover.js +90 -0
- data/apps/core/admin/public/js/bootstrap-scrollspy.js +107 -0
- data/apps/core/admin/public/js/bootstrap-tabs.js +80 -0
- data/apps/core/admin/public/js/bootstrap-twipsy.js +321 -0
- data/apps/core/admin/public/sass/admin.scss +167 -0
- data/apps/core/admin/public/sass/bootstrap/bootstrap.scss +29 -0
- data/apps/core/admin/public/sass/bootstrap/forms.scss +478 -0
- data/apps/core/admin/public/sass/bootstrap/mixins.scss +220 -0
- data/apps/core/admin/public/sass/bootstrap/patterns.scss +1062 -0
- data/apps/core/admin/public/sass/bootstrap/reset.scss +141 -0
- data/apps/core/admin/public/sass/bootstrap/scaffolding.scss +136 -0
- data/apps/core/admin/public/sass/bootstrap/tables.scss +224 -0
- data/apps/core/admin/public/sass/bootstrap/type.scss +187 -0
- data/apps/core/admin/public/sass/bootstrap/variables.scss +60 -0
- data/apps/core/admin/public/sass/grid.scss +54 -0
- data/apps/core/admin/views/_app_info.shtml +5 -0
- data/apps/core/admin/views/admin.layout.shtml +35 -0
- data/apps/core/admin/views/index.shtml +1 -1
- data/apps/core/admin/views/login.layout.shtml +13 -0
- data/apps/core/auth/controllers/mixins/auth_helper.rb +1 -1
- data/apps/core/auth/models/super_user.rb +6 -0
- data/apps/core/auth/models/user.rb +9 -0
- data/apps/core/components/assets.rb +5 -1
- data/apps/core/components/data/locale/it/LC_MESSAGES/spider_components.mo +0 -0
- data/apps/core/components/po/it/spider_components.po +23 -9
- data/apps/core/components/po/spider_components.pot +16 -8
- data/apps/core/components/public/css/admin.css +0 -12
- data/apps/core/components/public/css/crud.css +16 -19
- data/apps/core/components/public/css/table.css +11 -5
- data/apps/core/components/public/js/less-1.1.3.min.js +16 -0
- data/apps/core/components/public/widgets/table.js +1 -1
- data/apps/core/components/widgets/admin/admin.rb +10 -0
- data/apps/core/components/widgets/admin/admin.shtml +24 -4
- data/apps/core/components/widgets/confirm/confirm.rb +2 -2
- data/apps/core/components/widgets/confirm/confirm.shtml +5 -2
- data/apps/core/components/widgets/crud/crud.rb +10 -1
- data/apps/core/components/widgets/crud/crud.shtml +18 -21
- data/apps/core/components/widgets/menu/menu.shtml +1 -2
- data/apps/core/components/widgets/switcher/switcher.rb +6 -3
- data/apps/core/components/widgets/switcher/templates/default.shtml +3 -1
- data/apps/core/components/widgets/table/table.rb +3 -2
- data/apps/core/components/widgets/table/table.shtml +44 -25
- data/apps/core/forms/data/locale/it/LC_MESSAGES/spider_forms.mo +0 -0
- data/apps/core/forms/po/it/spider_forms.po +7 -2
- data/apps/core/forms/po/spider_forms.pot +5 -1
- data/apps/core/forms/public/css/form.css +3 -3
- data/apps/core/forms/public/css/html_area.css +0 -1
- data/apps/core/forms/public/date_time.js +4 -3
- data/apps/core/forms/public/select.js +5 -4
- data/apps/core/forms/tags/element_label.erb +1 -1
- data/apps/core/forms/tags/row.erb +1 -1
- data/apps/core/forms/widgets/form/form.rb +23 -1
- data/apps/core/forms/widgets/form/form.shtml +7 -8
- data/apps/core/forms/widgets/inputs/checkbox/checkbox.shtml +3 -3
- data/apps/core/forms/widgets/inputs/date_time/date_time.shtml +3 -3
- data/apps/core/forms/widgets/inputs/file_input/file_input.rb +4 -2
- data/apps/core/forms/widgets/inputs/file_input/file_input.shtml +1 -1
- data/apps/core/forms/widgets/inputs/hidden/hidden.shtml +1 -1
- data/apps/core/forms/widgets/inputs/html_area/html_area.shtml +2 -2
- data/apps/core/forms/widgets/inputs/password/password.shtml +3 -3
- data/apps/core/forms/widgets/inputs/search_select/search_select.shtml +2 -2
- data/apps/core/forms/widgets/inputs/select/select.shtml +16 -13
- data/apps/core/forms/widgets/inputs/text/text.shtml +3 -3
- data/apps/core/forms/widgets/inputs/text_area/text_area.shtml +5 -2
- data/apps/core/forms/widgets/inputs/time_span/time_span.shtml +3 -3
- data/apps/messenger/_init.rb +10 -2
- data/apps/messenger/controllers/messenger_admin_controller.rb +53 -0
- data/apps/messenger/controllers/messenger_controller.rb +2 -0
- data/apps/messenger/controllers/mixins/messenger_helper.rb +2 -2
- data/apps/messenger/models/message.rb +1 -1
- data/apps/messenger/public/app_icon.png +0 -0
- data/apps/messenger/views/admin/_admin.layout.shtml +26 -0
- data/apps/messenger/views/admin/index.shtml +13 -0
- data/apps/messenger/views/admin/queue.shtml +28 -0
- data/apps/messenger/views/index.shtml +3 -3
- data/data/locale/it/LC_MESSAGES/spider.mo +0 -0
- data/lib/spiderfw/app.rb +10 -1
- data/lib/spiderfw/cache/template_cache.rb +21 -22
- data/lib/spiderfw/cmd/commands/app.rb +3 -3
- data/lib/spiderfw/cmd/commands/setup.rb +1 -1
- data/lib/spiderfw/config/options/spider.rb +18 -2
- data/lib/spiderfw/controller/controller.rb +9 -3
- data/lib/spiderfw/controller/dispatcher.rb +25 -12
- data/lib/spiderfw/controller/home_controller.rb +3 -3
- data/lib/spiderfw/controller/http_controller.rb +11 -0
- data/lib/spiderfw/controller/mixins/static_content.rb +3 -12
- data/lib/spiderfw/controller/mixins/visual.rb +21 -20
- data/lib/spiderfw/controller/request.rb +1 -3
- data/lib/spiderfw/http/adapters/mongrel.rb +1 -1
- data/lib/spiderfw/i18n/gettext.rb +14 -0
- data/lib/spiderfw/i18n/shtml_parser.rb +2 -2
- data/lib/spiderfw/model/base_model.rb +4 -3
- data/lib/spiderfw/model/mappers/db_mapper.rb +137 -79
- data/lib/spiderfw/model/mappers/mapper.rb +6 -2
- data/lib/spiderfw/model/migrations/drop_element.rb +1 -1
- data/lib/spiderfw/model/migrations/previous_model.rb +73 -0
- data/lib/spiderfw/model/migrations/rename_element.rb +42 -0
- data/lib/spiderfw/model/migrations.rb +14 -1
- data/lib/spiderfw/model/mixins/tree.rb +65 -19
- data/lib/spiderfw/model/model_hash.rb +9 -5
- data/lib/spiderfw/model/query.rb +8 -0
- data/lib/spiderfw/model/query_funcs.rb +23 -0
- data/lib/spiderfw/model/query_set.rb +1 -1
- data/lib/spiderfw/model/request.rb +11 -3
- data/lib/spiderfw/model/storage/db/adapters/mysql.rb +28 -1
- data/lib/spiderfw/model/storage/db/adapters/oracle.rb +10 -10
- data/lib/spiderfw/model/storage/db/db_schema.rb +20 -3
- data/lib/spiderfw/model/storage/db/db_storage.rb +39 -17
- data/lib/spiderfw/setup/app_manager.rb +69 -31
- data/lib/spiderfw/setup/setup_task.rb +76 -8
- data/lib/spiderfw/spider.rb +21 -1
- data/lib/spiderfw/templates/blocks/text.rb +4 -4
- data/lib/spiderfw/templates/blocks/text_domain.rb +25 -0
- data/lib/spiderfw/templates/blocks/widget.rb +1 -1
- data/lib/spiderfw/templates/layout.rb +160 -92
- data/lib/spiderfw/templates/resources/less.rb +10 -2
- data/lib/spiderfw/templates/resources/sass.rb +66 -9
- data/lib/spiderfw/templates/template.rb +35 -10
- data/lib/spiderfw/templates/template_blocks.rb +6 -3
- data/lib/spiderfw/utils/logger.rb +20 -0
- data/lib/spiderfw/utils/memory.rb +7 -3
- data/lib/spiderfw/widget/widget.rb +13 -7
- data/lib/spiderfw/widget/widget_attributes.rb +2 -2
- data/spider.gemspec +1 -0
- metadata +68 -11
- data/apps/core/admin/views/spider_admin.layout.shtml +0 -23
@@ -0,0 +1,478 @@
|
|
1
|
+
/* Forms.scss
|
2
|
+
* Base styles for various input types, form layouts, and states
|
3
|
+
* ------------------------------------------------------------- */
|
4
|
+
|
5
|
+
|
6
|
+
// FORM STYLES
|
7
|
+
// -----------
|
8
|
+
|
9
|
+
form {
|
10
|
+
margin-bottom: $baseline;
|
11
|
+
}
|
12
|
+
|
13
|
+
// Groups of fields with labels on top (legends)
|
14
|
+
fieldset {
|
15
|
+
margin-bottom: $baseline;
|
16
|
+
padding-top: $baseline;
|
17
|
+
legend {
|
18
|
+
display: block;
|
19
|
+
padding-left: 150px;
|
20
|
+
font-size: $basefont * 1.5;
|
21
|
+
line-height: 1;
|
22
|
+
color: $grayDark;
|
23
|
+
*padding: 0 0 5px 145px; /* IE6-7 */
|
24
|
+
*line-height: 1.5; /* IE6-7 */
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
// Parent element that clears floats and wraps labels and fields together
|
29
|
+
form .formrow {
|
30
|
+
margin-bottom: $baseline;
|
31
|
+
@include clearfix();
|
32
|
+
}
|
33
|
+
|
34
|
+
// Set font for forms
|
35
|
+
label,
|
36
|
+
input,
|
37
|
+
select,
|
38
|
+
textarea {
|
39
|
+
@include sans-serif-font(normal,13px,normal);
|
40
|
+
}
|
41
|
+
|
42
|
+
// Float labels left
|
43
|
+
label {
|
44
|
+
padding-top: 6px;
|
45
|
+
font-size: $basefont;
|
46
|
+
line-height: $baseline;
|
47
|
+
float: left;
|
48
|
+
width: 130px;
|
49
|
+
text-align: right;
|
50
|
+
color: $grayDark;
|
51
|
+
}
|
52
|
+
|
53
|
+
// Shift over the inside div to align all label's relevant content
|
54
|
+
form .input {
|
55
|
+
margin-left: 150px;
|
56
|
+
}
|
57
|
+
|
58
|
+
// Checkboxs and radio buttons
|
59
|
+
input[type=checkbox],
|
60
|
+
input[type=radio] {
|
61
|
+
cursor: pointer;
|
62
|
+
}
|
63
|
+
|
64
|
+
// Inputs, Textareas, Selects
|
65
|
+
input,
|
66
|
+
textarea,
|
67
|
+
select,
|
68
|
+
.uneditable-input {
|
69
|
+
display: inline-block;
|
70
|
+
width: 210px;
|
71
|
+
height: $baseline;
|
72
|
+
padding: 4px;
|
73
|
+
font-size: $basefont;
|
74
|
+
line-height: $baseline;
|
75
|
+
color: $gray;
|
76
|
+
border: 1px solid #ccc;
|
77
|
+
@include border-radius(3px);
|
78
|
+
}
|
79
|
+
|
80
|
+
// remove padding from select
|
81
|
+
select {
|
82
|
+
padding: initial;
|
83
|
+
}
|
84
|
+
|
85
|
+
// mini reset for non-html5 file types
|
86
|
+
input[type=checkbox],
|
87
|
+
input[type=radio] {
|
88
|
+
width: auto;
|
89
|
+
height: auto;
|
90
|
+
padding: 0;
|
91
|
+
margin: 3px 0;
|
92
|
+
*margin-top: 0; /* IE6-7 */
|
93
|
+
line-height: normal;
|
94
|
+
border: none;
|
95
|
+
}
|
96
|
+
|
97
|
+
input[type=file] {
|
98
|
+
background-color: $white;
|
99
|
+
padding: initial;
|
100
|
+
border: initial;
|
101
|
+
line-height: initial;
|
102
|
+
@include box-shadow(none);
|
103
|
+
}
|
104
|
+
|
105
|
+
input[type=button],
|
106
|
+
input[type=reset],
|
107
|
+
input[type=submit] {
|
108
|
+
width: auto;
|
109
|
+
height: auto;
|
110
|
+
}
|
111
|
+
|
112
|
+
select,
|
113
|
+
input[type=file] {
|
114
|
+
height: $baseline * 1.5; // In IE7, the height of the select element cannot be changed by height, only font-size
|
115
|
+
*height: auto; // Reset for IE7
|
116
|
+
line-height: $baseline * 1.5;
|
117
|
+
*margin-top: 4px; /* For IE7, add top margin to align select with labels */
|
118
|
+
}
|
119
|
+
|
120
|
+
// Make multiple select elements height not fixed
|
121
|
+
select[multiple] {
|
122
|
+
height: inherit;
|
123
|
+
background-color: $white; // Fixes Chromium bug of unreadable items
|
124
|
+
}
|
125
|
+
|
126
|
+
textarea {
|
127
|
+
height: auto;
|
128
|
+
}
|
129
|
+
|
130
|
+
// For text that needs to appear as an input but should not be an input
|
131
|
+
.uneditable-input {
|
132
|
+
background-color: $white;
|
133
|
+
display: block;
|
134
|
+
border-color: #eee;
|
135
|
+
@include box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
|
136
|
+
cursor: not-allowed;
|
137
|
+
}
|
138
|
+
|
139
|
+
// Placeholder text gets special styles; can't be bundled together though for some reason
|
140
|
+
:-moz-placeholder {
|
141
|
+
color: $grayLight;
|
142
|
+
}
|
143
|
+
::-webkit-input-placeholder {
|
144
|
+
color: $grayLight;
|
145
|
+
}
|
146
|
+
|
147
|
+
// Focus states
|
148
|
+
input,
|
149
|
+
textarea {
|
150
|
+
$transition: border linear .2s, box-shadow linear .2s;
|
151
|
+
@include transition($transition);
|
152
|
+
@include box-shadow(inset 0 1px 3px rgba(0,0,0,.1));
|
153
|
+
}
|
154
|
+
input:focus,
|
155
|
+
textarea:focus {
|
156
|
+
outline: 0;
|
157
|
+
border-color: rgba(82,168,236,.8);
|
158
|
+
$shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);
|
159
|
+
@include box-shadow($shadow);
|
160
|
+
}
|
161
|
+
input[type=file]:focus,
|
162
|
+
input[type=checkbox]:focus,
|
163
|
+
select:focus {
|
164
|
+
@include box-shadow(none); // override for file inputs
|
165
|
+
outline: 1px dotted #666; // Select elements don't get box-shadow styles, so instead we do outline
|
166
|
+
}
|
167
|
+
|
168
|
+
// FORM FIELD FEEDBACK STATES
|
169
|
+
// --------------------------
|
170
|
+
|
171
|
+
// Mixin for form field states
|
172
|
+
@mixin formFieldState($textColor: #555, $borderColor: #ccc, $backgroundColor: #f5f5f5) {
|
173
|
+
// Set the text color
|
174
|
+
> label,
|
175
|
+
.help-block,
|
176
|
+
.help-inline {
|
177
|
+
color: $textColor;
|
178
|
+
}
|
179
|
+
// Style inputs accordingly
|
180
|
+
input,
|
181
|
+
textarea {
|
182
|
+
color: $textColor;
|
183
|
+
border-color: $borderColor;
|
184
|
+
&:focus {
|
185
|
+
border-color: darken($borderColor, 10%);
|
186
|
+
@include box-shadow(0 0 6px lighten($borderColor, 20%));
|
187
|
+
}
|
188
|
+
}
|
189
|
+
// Give a small background color for input-prepend/-append
|
190
|
+
.input-prepend .add-on,
|
191
|
+
.input-append .add-on {
|
192
|
+
color: $textColor;
|
193
|
+
background-color: $backgroundColor;
|
194
|
+
border-color: $textColor;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
// Error
|
198
|
+
form .formrow.error {
|
199
|
+
@include formFieldState(#b94a48, #ee5f5b, lighten(#ee5f5b, 30%));
|
200
|
+
}
|
201
|
+
// Warning
|
202
|
+
form .formrow.warning {
|
203
|
+
@include formFieldState(#c09853, #ccae64, lighten(#CCAE64, 5%));
|
204
|
+
}
|
205
|
+
// Success
|
206
|
+
form .formrow.success {
|
207
|
+
@include formFieldState(#468847, #57a957, lighten(#57a957, 30%));
|
208
|
+
}
|
209
|
+
|
210
|
+
|
211
|
+
// Form element sizes
|
212
|
+
// TODO v2: remove duplication here and just stick to .input-[size] in light of adding .spanN sizes
|
213
|
+
.input-mini,
|
214
|
+
input.mini,
|
215
|
+
textarea.mini,
|
216
|
+
select.mini {
|
217
|
+
width: 60px;
|
218
|
+
}
|
219
|
+
.input-small,
|
220
|
+
input.small,
|
221
|
+
textarea.small,
|
222
|
+
select.small {
|
223
|
+
width: 90px;
|
224
|
+
}
|
225
|
+
.input-medium,
|
226
|
+
input.medium,
|
227
|
+
textarea.medium,
|
228
|
+
select.medium {
|
229
|
+
width: 150px;
|
230
|
+
}
|
231
|
+
.input-large,
|
232
|
+
input.large,
|
233
|
+
textarea.large,
|
234
|
+
select.large {
|
235
|
+
width: 210px;
|
236
|
+
}
|
237
|
+
.input-xlarge,
|
238
|
+
input.xlarge,
|
239
|
+
textarea.xlarge,
|
240
|
+
select.xlarge {
|
241
|
+
width: 270px;
|
242
|
+
}
|
243
|
+
.input-xxlarge,
|
244
|
+
input.xxlarge,
|
245
|
+
textarea.xxlarge,
|
246
|
+
select.xxlarge {
|
247
|
+
width: 530px;
|
248
|
+
}
|
249
|
+
textarea.xxlarge {
|
250
|
+
overflow-y: auto;
|
251
|
+
}
|
252
|
+
|
253
|
+
// Grid style input sizes
|
254
|
+
// This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border
|
255
|
+
@mixin formColumns($columnSpan: 1 ) {
|
256
|
+
display: inline-block;
|
257
|
+
float: none;
|
258
|
+
width: (($gridColumnWidth) * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1)) - 10;
|
259
|
+
margin-left: 0;
|
260
|
+
|
261
|
+
}
|
262
|
+
input,
|
263
|
+
textarea {
|
264
|
+
// Default columns
|
265
|
+
&.span1 { @include formColumns(1); }
|
266
|
+
&.span2 { @include formColumns(2); }
|
267
|
+
&.span3 { @include formColumns(3); }
|
268
|
+
&.span4 { @include formColumns(4); }
|
269
|
+
&.span5 { @include formColumns(5); }
|
270
|
+
&.span6 { @include formColumns(6); }
|
271
|
+
&.span7 { @include formColumns(7); }
|
272
|
+
&.span8 { @include formColumns(8); }
|
273
|
+
&.span9 { @include formColumns(9); }
|
274
|
+
&.span10 { @include formColumns(10); }
|
275
|
+
&.span11 { @include formColumns(11); }
|
276
|
+
&.span12 { @include formColumns(12); }
|
277
|
+
&.span13 { @include formColumns(13); }
|
278
|
+
&.span14 { @include formColumns(14); }
|
279
|
+
&.span15 { @include formColumns(15); }
|
280
|
+
&.span16 { @include formColumns(16); }
|
281
|
+
}
|
282
|
+
|
283
|
+
// Disabled and read-only inputs
|
284
|
+
input[disabled],
|
285
|
+
select[disabled],
|
286
|
+
textarea[disabled],
|
287
|
+
input[readonly],
|
288
|
+
select[readonly],
|
289
|
+
textarea[readonly] {
|
290
|
+
background-color: #f5f5f5;
|
291
|
+
border-color: #ddd;
|
292
|
+
cursor: not-allowed;
|
293
|
+
}
|
294
|
+
|
295
|
+
// Actions (the buttons)
|
296
|
+
.actions {
|
297
|
+
background: #f5f5f5;
|
298
|
+
margin-top: $baseline;
|
299
|
+
margin-bottom: $baseline;
|
300
|
+
padding: ($baseline - 1) 20px $baseline 150px;
|
301
|
+
border-top: 1px solid #ddd;
|
302
|
+
@include border-radius(0 0 3px 3px);
|
303
|
+
.secondary-action {
|
304
|
+
float: right;
|
305
|
+
a {
|
306
|
+
line-height: 30px;
|
307
|
+
&:hover {
|
308
|
+
text-decoration: underline;
|
309
|
+
}
|
310
|
+
}
|
311
|
+
}
|
312
|
+
}
|
313
|
+
|
314
|
+
// Help Text
|
315
|
+
.help-inline,
|
316
|
+
.help-block {
|
317
|
+
font-size: $basefont;
|
318
|
+
line-height: $baseline;
|
319
|
+
color: $grayLight;
|
320
|
+
}
|
321
|
+
.help-inline {
|
322
|
+
padding-left: 5px;
|
323
|
+
*position: relative; /* IE6-7 */
|
324
|
+
*top: -5px; /* IE6-7 */
|
325
|
+
}
|
326
|
+
|
327
|
+
// Big blocks of help text
|
328
|
+
.help-block {
|
329
|
+
display: block;
|
330
|
+
max-width: 600px;
|
331
|
+
}
|
332
|
+
|
333
|
+
// Inline Fields (input fields that appear as inline objects
|
334
|
+
.inline-inputs {
|
335
|
+
color: $gray;
|
336
|
+
span {
|
337
|
+
padding: 0 2px 0 1px;
|
338
|
+
}
|
339
|
+
}
|
340
|
+
|
341
|
+
// Allow us to put symbols and text within the input field for a cleaner look
|
342
|
+
.input-prepend,
|
343
|
+
.input-append {
|
344
|
+
input {
|
345
|
+
@include border-radius(0 3px 3px 0);
|
346
|
+
}
|
347
|
+
.add-on {
|
348
|
+
position: relative;
|
349
|
+
background: #f5f5f5;
|
350
|
+
border: 1px solid #ccc;
|
351
|
+
z-index: 2;
|
352
|
+
float: left;
|
353
|
+
display: block;
|
354
|
+
width: auto;
|
355
|
+
min-width: 16px;
|
356
|
+
height: 18px;
|
357
|
+
padding: 4px 4px 4px 5px;
|
358
|
+
margin-right: -1px;
|
359
|
+
font-weight: normal;
|
360
|
+
line-height: 18px;
|
361
|
+
color: $grayLight;
|
362
|
+
text-align: center;
|
363
|
+
text-shadow: 0 1px 0 $white;
|
364
|
+
@include border-radius(3px 0 0 3px);
|
365
|
+
}
|
366
|
+
.active {
|
367
|
+
background: lighten($green, 30);
|
368
|
+
border-color: $green;
|
369
|
+
}
|
370
|
+
}
|
371
|
+
.input-prepend {
|
372
|
+
.add-on {
|
373
|
+
*margin-top: 1px; /* IE6-7 */
|
374
|
+
}
|
375
|
+
}
|
376
|
+
.input-append {
|
377
|
+
input {
|
378
|
+
float: left;
|
379
|
+
@include border-radius(3px 0 0 3px);
|
380
|
+
}
|
381
|
+
.add-on {
|
382
|
+
@include border-radius(0 3px 3px 0);
|
383
|
+
margin-right: 0;
|
384
|
+
margin-left: -1px;
|
385
|
+
}
|
386
|
+
}
|
387
|
+
|
388
|
+
// Stacked options for forms (radio buttons or checkboxes)
|
389
|
+
.inputs-list {
|
390
|
+
margin: 0 0 5px;
|
391
|
+
width: 100%;
|
392
|
+
li {
|
393
|
+
display: block;
|
394
|
+
padding: 0;
|
395
|
+
width: 100%;
|
396
|
+
}
|
397
|
+
label {
|
398
|
+
display: block;
|
399
|
+
float: none;
|
400
|
+
width: auto;
|
401
|
+
padding: 0;
|
402
|
+
margin-left: 20px;
|
403
|
+
line-height: $baseline;
|
404
|
+
text-align: left;
|
405
|
+
white-space: normal;
|
406
|
+
strong {
|
407
|
+
color: $gray;
|
408
|
+
}
|
409
|
+
small {
|
410
|
+
font-size: $basefont - 2;
|
411
|
+
font-weight: normal;
|
412
|
+
}
|
413
|
+
}
|
414
|
+
.inputs-list {
|
415
|
+
margin-left: 25px;
|
416
|
+
margin-bottom: 10px;
|
417
|
+
padding-top: 0;
|
418
|
+
}
|
419
|
+
&:first-child {
|
420
|
+
padding-top: 5px;
|
421
|
+
}
|
422
|
+
li + li {
|
423
|
+
padding-top: 2px;
|
424
|
+
}
|
425
|
+
input[type=radio],
|
426
|
+
input[type=checkbox] {
|
427
|
+
margin-bottom: 0;
|
428
|
+
margin-left: -20px;
|
429
|
+
float: left;
|
430
|
+
}
|
431
|
+
}
|
432
|
+
|
433
|
+
// Stacked forms
|
434
|
+
.form-stacked {
|
435
|
+
padding-left: 20px;
|
436
|
+
fieldset {
|
437
|
+
padding-top: $baseline / 2;
|
438
|
+
}
|
439
|
+
legend {
|
440
|
+
margin-left: 0;
|
441
|
+
}
|
442
|
+
label {
|
443
|
+
display: block;
|
444
|
+
float: none;
|
445
|
+
width: auto;
|
446
|
+
font-weight: bold;
|
447
|
+
text-align: left;
|
448
|
+
line-height: 20px;
|
449
|
+
padding-top: 0;
|
450
|
+
}
|
451
|
+
.formrow {
|
452
|
+
margin-bottom: $baseline / 2;
|
453
|
+
div.input {
|
454
|
+
margin-left: 0;
|
455
|
+
}
|
456
|
+
}
|
457
|
+
.inputs-list {
|
458
|
+
margin-bottom: 0;
|
459
|
+
li {
|
460
|
+
padding-top: 0;
|
461
|
+
label {
|
462
|
+
font-weight: normal;
|
463
|
+
padding-top: 0;
|
464
|
+
}
|
465
|
+
}
|
466
|
+
}
|
467
|
+
div.formrow.error {
|
468
|
+
padding-top: 10px;
|
469
|
+
padding-bottom: 10px;
|
470
|
+
padding-left: 10px;
|
471
|
+
margin-top: 0;
|
472
|
+
margin-left: -10px;
|
473
|
+
}
|
474
|
+
.actions {
|
475
|
+
margin-left: -20px;
|
476
|
+
padding-left: 20px;
|
477
|
+
}
|
478
|
+
}
|
@@ -0,0 +1,220 @@
|
|
1
|
+
/* Mixins.scss
|
2
|
+
* Snippets of reusable CSS to develop faster and keep code readable
|
3
|
+
* ----------------------------------------------------------------- */
|
4
|
+
|
5
|
+
// Clearfix for clearing floats like a boss h5bp.com/q
|
6
|
+
@mixin clearfix {
|
7
|
+
zoom: 1;
|
8
|
+
&:before,
|
9
|
+
&:after {
|
10
|
+
display: table;
|
11
|
+
content: "";
|
12
|
+
zoom: 1;
|
13
|
+
}
|
14
|
+
&:after {
|
15
|
+
clear: both;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
.clearfix { @include clearfix; }
|
19
|
+
|
20
|
+
// Center-align a block level element
|
21
|
+
@mixin center-block {
|
22
|
+
display: block;
|
23
|
+
margin-left: auto;
|
24
|
+
margin-right: auto;
|
25
|
+
}
|
26
|
+
|
27
|
+
// Sizing shortcuts
|
28
|
+
@mixin size($height: 5px, $width: 5px) {
|
29
|
+
height: $height;
|
30
|
+
width: $width;
|
31
|
+
}
|
32
|
+
@mixin square($size: 5px) {
|
33
|
+
@include size($size, $size);
|
34
|
+
}
|
35
|
+
|
36
|
+
// Input placeholder text
|
37
|
+
@mixin placeholder($color: $grayLight) {
|
38
|
+
:-moz-placeholder {
|
39
|
+
color: $color;
|
40
|
+
}
|
41
|
+
::-webkit-input-placeholder {
|
42
|
+
color: $color;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
// Font Stacks
|
47
|
+
@mixin shorthand-font($weight: normal, $size: 14px, $lineHeight: 20px) {
|
48
|
+
font-size: $size;
|
49
|
+
font-weight: $weight;
|
50
|
+
line-height: $lineHeight;
|
51
|
+
}
|
52
|
+
@mixin sans-serif-font($weight: normal, $size: 14px, $lineHeight: 20px) {
|
53
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
54
|
+
font-size: $size;
|
55
|
+
font-weight: $weight;
|
56
|
+
line-height: $lineHeight;
|
57
|
+
}
|
58
|
+
@mixin serif-font($weight: normal, $size: 14px, $lineHeight: 20px) {
|
59
|
+
font-family: "Georgia", Times New Roman, Times, serif;
|
60
|
+
font-size: $size;
|
61
|
+
font-weight: $weight;
|
62
|
+
line-height: $lineHeight;
|
63
|
+
}
|
64
|
+
@mixin monospace-font($weight: normal, $size: 12px, $lineHeight: 20px) {
|
65
|
+
font-family: "Monaco", Courier New, monospace;
|
66
|
+
font-size: $size;
|
67
|
+
font-weight: $weight;
|
68
|
+
line-height: $lineHeight;
|
69
|
+
}
|
70
|
+
|
71
|
+
// Grid System
|
72
|
+
@mixin fixed-container {
|
73
|
+
width: $siteWidth;
|
74
|
+
margin-left: auto;
|
75
|
+
margin-right: auto;
|
76
|
+
@include clearfix();
|
77
|
+
}
|
78
|
+
.fixed-container { @include fixed-container; }
|
79
|
+
@mixin columns($columnSpan: 1) {
|
80
|
+
width: ($gridColumnWidth * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1));
|
81
|
+
}
|
82
|
+
@mixin offset($columnOffset: 1) {
|
83
|
+
margin-left: ($gridColumnWidth * $columnOffset) + ($gridGutterWidth * ($columnOffset - 1)) + $extraSpace;
|
84
|
+
}
|
85
|
+
// Necessary grid styles for every column to make them appear next to each other horizontally
|
86
|
+
@mixin gridColumn() {
|
87
|
+
display: inline;
|
88
|
+
float: left;
|
89
|
+
margin-left: $gridGutterWidth;
|
90
|
+
}
|
91
|
+
// makeColumn can be used to mark any element (e.g., .content-primary) as a column without changing markup to .span something
|
92
|
+
@mixin makeColumn($columnSpan: 1) {
|
93
|
+
@include gridColumn();
|
94
|
+
@include columns($columnSpan);
|
95
|
+
}
|
96
|
+
|
97
|
+
// Border Radius
|
98
|
+
@mixin border-radius($radius: 5px) {
|
99
|
+
-webkit-border-radius: $radius;
|
100
|
+
-moz-border-radius: $radius;
|
101
|
+
border-radius: $radius;
|
102
|
+
}
|
103
|
+
|
104
|
+
// Drop shadows
|
105
|
+
@mixin box-shadow($shadow: 0 1px 3px rgba(0,0,0,.25)) {
|
106
|
+
-webkit-box-shadow: $shadow;
|
107
|
+
-moz-box-shadow: $shadow;
|
108
|
+
box-shadow: $shadow;
|
109
|
+
}
|
110
|
+
|
111
|
+
// Transitions
|
112
|
+
@mixin transition($transition) {
|
113
|
+
-webkit-transition: $transition;
|
114
|
+
-moz-transition: $transition;
|
115
|
+
-ms-transition: $transition;
|
116
|
+
-o-transition: $transition;
|
117
|
+
transition: $transition;
|
118
|
+
}
|
119
|
+
|
120
|
+
// Background clipping
|
121
|
+
@mixin background-clip($clip) {
|
122
|
+
-webkit-background-clip: $clip;
|
123
|
+
-moz-background-clip: $clip;
|
124
|
+
background-clip: $clip;
|
125
|
+
}
|
126
|
+
|
127
|
+
// CSS3 Content Columns
|
128
|
+
@mixin content-columns($columnCount, $columnGap: 20px) {
|
129
|
+
-webkit-column-count: $columnCount;
|
130
|
+
-moz-column-count: $columnCount;
|
131
|
+
column-count: $columnCount;
|
132
|
+
-webkit-column-gap: $columnGap;
|
133
|
+
-moz-column-gap: $columnGap;
|
134
|
+
column-gap: $columnGap;
|
135
|
+
}
|
136
|
+
|
137
|
+
// Make any element resizable for prototyping
|
138
|
+
@mixin resizable($direction: both) {
|
139
|
+
resize: $direction; // Options are horizontal, vertical, both
|
140
|
+
overflow: auto; // Safari fix
|
141
|
+
}
|
142
|
+
|
143
|
+
// Add an alphatransparency value to any background or border color (via Elyse Holladay)
|
144
|
+
@mixin translucent-background($color: $white, $alpha: 1) {
|
145
|
+
background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
|
146
|
+
}
|
147
|
+
@mixin translucent-border($color: $white, $alpha: 1) {
|
148
|
+
border-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
|
149
|
+
background-clip: padding-box;
|
150
|
+
}
|
151
|
+
|
152
|
+
// Gradients
|
153
|
+
@mixin horizontal-gradient ($startColor: #555, $endColor: #333) {
|
154
|
+
background-color: $endColor;
|
155
|
+
background-repeat: repeat-x;
|
156
|
+
background-image: -khtml-gradient(linear, left top, right top, from($startColor), to($endColor)); // Konqueror
|
157
|
+
background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
|
158
|
+
background-image: -ms-linear-gradient(left, $startColor, $endColor); // IE10
|
159
|
+
background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, $startColor), color-stop(100%, $endColor)); // Safari 4+, Chrome 2+
|
160
|
+
background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
161
|
+
background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
|
162
|
+
background-image: linear-gradient(left, $startColor, $endColor); // Le standard
|
163
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=1); // IE9 and down
|
164
|
+
}
|
165
|
+
|
166
|
+
@mixin vertical-gradient ($startColor: #555, $endColor: #333) {
|
167
|
+
background-color: $endColor;
|
168
|
+
background-repeat: repeat-x;
|
169
|
+
background-image: -khtml-gradient(linear, left top, left bottom, from($startColor), to($endColor)); // Konqueror
|
170
|
+
background-image: -moz-linear-gradient(top, $startColor, $endColor); // FF 3.6+
|
171
|
+
background-image: -ms-linear-gradient(top, $startColor, $endColor); // IE10
|
172
|
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, $startColor), color-stop(100%, $endColor)); // Safari 4+, Chrome 2+
|
173
|
+
background-image: -webkit-linear-gradient(top, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
174
|
+
background-image: -o-linear-gradient(top, $startColor, $endColor); // Opera 11.10
|
175
|
+
background-image: linear-gradient(top, $startColor, $endColor); // The standard
|
176
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down
|
177
|
+
}
|
178
|
+
|
179
|
+
@mixin directional-gradient ($startColor: #555, $endColor: #333, $deg: 45deg) {
|
180
|
+
background-color: $endColor;
|
181
|
+
background-repeat: repeat-x;
|
182
|
+
background-image: -moz-linear-gradient($deg, $startColor, $endColor); // FF 3.6+
|
183
|
+
background-image: -ms-linear-gradient($deg, $startColor, $endColor); // IE10
|
184
|
+
background-image: -webkit-linear-gradient($deg, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
185
|
+
background-image: -o-linear-gradient($deg, $startColor, $endColor); // Opera 11.10
|
186
|
+
background-image: linear-gradient($deg, $startColor, $endColor); // The standard
|
187
|
+
}
|
188
|
+
|
189
|
+
@mixin vertical-three-colors-gradient($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
|
190
|
+
background-color: $endColor;
|
191
|
+
background-repeat: no-repeat;
|
192
|
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor));
|
193
|
+
background-image: -webkit-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
194
|
+
background-image: -moz-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
195
|
+
background-image: -ms-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
196
|
+
background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
197
|
+
background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
|
198
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down, gets no color-stop at all the proper fallback
|
199
|
+
}
|
200
|
+
|
201
|
+
// Gradient Bar Colors for buttons and allerts
|
202
|
+
@mixin gradientBar($primaryColor, $secondaryColor) {
|
203
|
+
@include vertical-gradient($primaryColor, $secondaryColor);
|
204
|
+
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
205
|
+
border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
|
206
|
+
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) opacify(rgba(0,0,0,.1), .15);
|
207
|
+
}
|
208
|
+
|
209
|
+
// Reset filters for IE
|
210
|
+
@mixin reset-filter() {
|
211
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
212
|
+
}
|
213
|
+
|
214
|
+
// Opacity
|
215
|
+
@mixin opacity($opacity: 100) {
|
216
|
+
filter: alpha(opacity=$opacity);
|
217
|
+
-khtml-opacity: $opacity / 100;
|
218
|
+
-moz-opacity: $opacity / 100;
|
219
|
+
opacity: $opacity / 100;
|
220
|
+
}
|