ajax_scaffold_generator 2.2.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/ajax_scaffold_generator.rb +97 -22
- data/templates/{style.css → ajax_scaffold.css} +451 -364
- data/templates/ajax_scaffold.js +126 -0
- data/templates/ajax_scaffold_helper.rb +95 -0
- data/templates/arrow_down.gif +0 -0
- data/templates/arrow_up.gif +0 -0
- data/templates/controller.rb +93 -42
- data/templates/error.gif +0 -0
- data/templates/form_scaffolding.rhtml +1 -1
- data/templates/helper.rb +2 -6
- data/templates/indicator.gif +0 -0
- data/templates/information.gif +0 -0
- data/templates/layout.rhtml +2 -1
- data/templates/lib_ajax_scaffold_util.rb +26 -0
- data/templates/lib_content_column_patch.rb +10 -0
- data/templates/partial_column_headings.rhtml +12 -0
- data/templates/partial_form_messages.rhtml +5 -0
- data/templates/partial_item.rhtml +30 -21
- data/templates/partial_messages.rhtml +10 -0
- data/templates/partial_new_edit.rhtml +38 -0
- data/templates/partial_pagination_links.rhtml +14 -0
- data/templates/rjs_create.rjs +17 -0
- data/templates/rjs_destroy.rjs +10 -0
- data/templates/rjs_edit.rjs +16 -0
- data/templates/rjs_new.rjs +14 -0
- data/templates/rjs_update.rjs +17 -0
- data/templates/view_component.rhtml +51 -0
- data/templates/view_list.rhtml +1 -59
- data/templates/warning.gif +0 -0
- metadata +22 -8
- data/templates/partial_form_errors.rhtml +0 -9
- data/templates/script.js +0 -423
- data/templates/view_edit.rhtml +0 -36
- data/templates/view_index.rhtml +0 -1
- data/templates/view_new.rhtml +0 -33
data/README
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
*******************************************************************************************
|
2
|
-
** For all documentation see the project website: http://ajaxscaffold.
|
2
|
+
** For all documentation see the project website: http://www.ajaxscaffold.com **
|
3
3
|
*******************************************************************************************
|
4
4
|
|
5
5
|
Description:
|
data/ajax_scaffold_generator.rb
CHANGED
@@ -4,12 +4,42 @@ class AjaxScaffoldingSandbox < ScaffoldingSandbox
|
|
4
4
|
def default_input_block
|
5
5
|
Proc.new { |record, column| "<div class=\"form-element\">\n <label for=\"#{record}_#{column.name}\">#{column.human_name}</label>\n #{input(record, column.name)}\n</div>\n" }
|
6
6
|
end
|
7
|
+
|
8
|
+
def all_input_tags(record, record_name, options)
|
9
|
+
input_block = options[:input_block] || default_input_block
|
10
|
+
|
11
|
+
if !options[:exclude].blank?
|
12
|
+
filtered_content_columns = record.class.content_columns.reject { |column| options[:exclude].include?(column.name) }
|
13
|
+
else
|
14
|
+
filtered_content_columns = record.class.content_columns
|
15
|
+
end
|
16
|
+
|
17
|
+
filtered_content_columns.collect{ |column| input_block.call(record_name, column) }.join("\n")
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
class ActionView::Helpers::InstanceTag
|
23
|
+
alias_method :base_to_input_field_tag, :to_input_field_tag
|
24
|
+
|
25
|
+
def to_input_field_tag(field_type, options={})
|
26
|
+
options[:class] = 'text-input'
|
27
|
+
base_to_input_field_tag field_type, options
|
28
|
+
end
|
29
|
+
|
30
|
+
def to_boolean_select_tag(options = {})
|
31
|
+
options = options.stringify_keys
|
32
|
+
add_default_name_and_id(options)
|
33
|
+
tag_text = "<%= select \"#{@object_name}\", \"#{@method_name}\", [[\"True\", true], [\"False\", false]], { :selected => @#{@object_name}.#{@method_name} } %>"
|
34
|
+
end
|
35
|
+
|
7
36
|
end
|
8
37
|
|
9
38
|
class AjaxScaffoldGenerator < ScaffoldGenerator
|
10
39
|
|
11
40
|
def manifest
|
12
41
|
record do |m|
|
42
|
+
|
13
43
|
# Check for class naming collisions.
|
14
44
|
m.class_collisions controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}ControllerTest", "#{controller_class_name}Helper"
|
15
45
|
|
@@ -17,11 +47,12 @@ class AjaxScaffoldGenerator < ScaffoldGenerator
|
|
17
47
|
m.directory File.join('app/controllers', controller_class_path)
|
18
48
|
m.directory File.join('app/helpers', controller_class_path)
|
19
49
|
m.directory File.join('app/views', controller_class_path, controller_file_name)
|
50
|
+
m.directory File.join('app/views/layouts', controller_class_path)
|
20
51
|
m.directory File.join('public/images')
|
21
52
|
m.directory File.join('test/functional', controller_class_path)
|
22
53
|
|
23
54
|
# Depend on model generator but skip if the model exists.
|
24
|
-
m.dependency 'model', [singular_name], :collision => :skip
|
55
|
+
m.dependency 'model', [singular_name], :collision => :skip, :skip_migration => true
|
25
56
|
|
26
57
|
# Scaffolded forms.
|
27
58
|
m.complex_template 'form.rhtml',
|
@@ -42,11 +73,13 @@ class AjaxScaffoldGenerator < ScaffoldGenerator
|
|
42
73
|
controller_file_name,
|
43
74
|
"_#{singular_name}.rhtml")
|
44
75
|
|
45
|
-
|
76
|
+
scaffold_partials.each do |name|
|
77
|
+
m.template "partial_#{name}.rhtml",
|
46
78
|
File.join('app/views',
|
47
79
|
controller_class_path,
|
48
80
|
controller_file_name,
|
49
|
-
"
|
81
|
+
"_#{name}.rhtml")
|
82
|
+
end
|
50
83
|
|
51
84
|
# Scaffolded views.
|
52
85
|
scaffold_views.each do |action|
|
@@ -57,6 +90,22 @@ class AjaxScaffoldGenerator < ScaffoldGenerator
|
|
57
90
|
"#{action}.rhtml"),
|
58
91
|
:assigns => { :action => action }
|
59
92
|
end
|
93
|
+
|
94
|
+
# RJS templates
|
95
|
+
scaffold_rjs_templates.each do |template|
|
96
|
+
m.template "rjs_#{template}.rjs",
|
97
|
+
File.join('app/views',
|
98
|
+
controller_class_path,
|
99
|
+
controller_file_name,
|
100
|
+
"#{template}.rjs")
|
101
|
+
end
|
102
|
+
|
103
|
+
# Libraries
|
104
|
+
scaffold_lib.each do |filename|
|
105
|
+
m.template "lib_#{filename}.rb",
|
106
|
+
File.join('lib',
|
107
|
+
"#{filename}.rb")
|
108
|
+
end
|
60
109
|
|
61
110
|
# Controller class, functional test, helper, and views.
|
62
111
|
m.template 'controller.rb',
|
@@ -73,37 +122,63 @@ class AjaxScaffoldGenerator < ScaffoldGenerator
|
|
73
122
|
File.join('app/helpers',
|
74
123
|
controller_class_path,
|
75
124
|
"#{controller_file_name}_helper.rb")
|
125
|
+
|
126
|
+
m.template 'ajax_scaffold_helper.rb',
|
127
|
+
File.join('app/helpers',
|
128
|
+
controller_class_path,
|
129
|
+
"ajax_scaffold_helper.rb")
|
76
130
|
|
77
131
|
# Layout and stylesheet.
|
78
|
-
m.template 'layout.rhtml',
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
m.template '
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
unscaffolded_actions.each do |action|
|
88
|
-
path = File.join('app/views',
|
89
|
-
controller_class_path,
|
90
|
-
controller_file_name,
|
91
|
-
"#{action}.rhtml")
|
92
|
-
|
93
|
-
m.template 'controller:view.rhtml', path,
|
94
|
-
:assigns => { :action => action, :path => path }
|
132
|
+
m.template 'layout.rhtml',
|
133
|
+
File.join('app/views/layouts',
|
134
|
+
controller_class_path,
|
135
|
+
"#{controller_file_name}.rhtml")
|
136
|
+
|
137
|
+
m.template 'ajax_scaffold.css', "public/stylesheets/ajax_scaffold.css"
|
138
|
+
|
139
|
+
scaffold_javascripts.each do |javascript|
|
140
|
+
m.template javascript, "public/javascripts/#{javascript}"
|
95
141
|
end
|
142
|
+
|
143
|
+
scaffold_images.each do |image|
|
144
|
+
m.template image, "public/images/#{image}"
|
145
|
+
end
|
146
|
+
|
96
147
|
end
|
97
148
|
end
|
98
149
|
|
99
150
|
protected
|
100
151
|
# Override with your own usage banner.
|
101
152
|
def banner
|
102
|
-
"Usage: #{$0} ajax_scaffold ModelName [ControllerName]
|
153
|
+
"Usage: #{$0} ajax_scaffold ModelName [ControllerName]"
|
103
154
|
end
|
104
155
|
|
105
156
|
def scaffold_views
|
106
|
-
%w( list
|
157
|
+
%w( list component )
|
158
|
+
end
|
159
|
+
|
160
|
+
def scaffold_rjs_templates
|
161
|
+
%w( create destroy edit new update )
|
162
|
+
end
|
163
|
+
|
164
|
+
def scaffold_partials
|
165
|
+
%w( form_messages messages column_headings new_edit pagination_links )
|
166
|
+
end
|
167
|
+
|
168
|
+
def scaffold_helpers
|
169
|
+
%w( helper ajax_scaffold_helper )
|
170
|
+
end
|
171
|
+
|
172
|
+
def scaffold_lib
|
173
|
+
%w( ajax_scaffold_util content_column_patch )
|
174
|
+
end
|
175
|
+
|
176
|
+
def scaffold_images
|
177
|
+
%w( indicator.gif add.gif error.gif warning.gif information.gif arrow_down.gif arrow_up.gif )
|
178
|
+
end
|
179
|
+
|
180
|
+
def scaffold_javascripts
|
181
|
+
%w( ajax_scaffold.js rico_corner.js )
|
107
182
|
end
|
108
183
|
|
109
184
|
def create_sandbox
|
@@ -1,364 +1,451 @@
|
|
1
|
-
|
2
|
-
.
|
3
|
-
.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
.ajax-scaffold
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}
|
23
|
-
|
24
|
-
.ajax-scaffold {
|
25
|
-
|
26
|
-
}
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
.ajax-scaffold
|
69
|
-
|
70
|
-
}
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
.ajax-scaffold
|
96
|
-
background
|
97
|
-
}
|
98
|
-
|
99
|
-
.ajax-scaffold .
|
100
|
-
.ajax-scaffold .
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
font-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
}
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
.ajax-scaffold .
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
.ajax-scaffold
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
padding
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
padding:
|
236
|
-
|
237
|
-
|
238
|
-
}
|
239
|
-
|
240
|
-
.ajax-scaffold
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
}
|
246
|
-
|
247
|
-
.ajax-scaffold .
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
}
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
.ajax-scaffold .
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
.ajax-scaffold
|
281
|
-
border:
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
font-family:
|
310
|
-
|
311
|
-
}
|
312
|
-
|
313
|
-
.ajax-scaffold
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
}
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
}
|
345
|
-
|
346
|
-
.ajax-scaffold .
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
1
|
+
/*
|
2
|
+
AjaxScaffoldGenerator version 3.0.0
|
3
|
+
(c) 2006 Richard White <rrwhite@gmail.com>
|
4
|
+
|
5
|
+
AjaxScaffoldGenerator is freely distributable under the terms of an MIT-style license.
|
6
|
+
|
7
|
+
For details, see the AjaxScaffoldGenerator web site: http://www.ajaxscaffold.com/
|
8
|
+
*/
|
9
|
+
|
10
|
+
.ajax-scaffold form,
|
11
|
+
.ajax-scaffold table,
|
12
|
+
.ajax-scaffold p,
|
13
|
+
.ajax-scaffold div,
|
14
|
+
.ajax-scaffold fieldset {
|
15
|
+
margin: 0;
|
16
|
+
padding: 0;
|
17
|
+
}
|
18
|
+
|
19
|
+
.ajax-scaffold a {
|
20
|
+
color: #06c;
|
21
|
+
text-decoration: none;
|
22
|
+
}
|
23
|
+
|
24
|
+
.ajax-scaffold {
|
25
|
+
margin: 5px 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
.ajax-scaffold table {
|
29
|
+
width: 100%;
|
30
|
+
}
|
31
|
+
|
32
|
+
/* Header Styling
|
33
|
+
======================== */
|
34
|
+
|
35
|
+
.ajax-scaffold-header {
|
36
|
+
background: #005CB8;
|
37
|
+
position: relative;
|
38
|
+
}
|
39
|
+
|
40
|
+
.ajax-scaffold-header h2 {
|
41
|
+
color: #fff;
|
42
|
+
padding: 2px 5px 4px 5px;
|
43
|
+
margin: 0;
|
44
|
+
font: normal 17px verdana, sans-serif;
|
45
|
+
}
|
46
|
+
|
47
|
+
.ajax-scaffold-header div.actions a {
|
48
|
+
color: #fff;
|
49
|
+
background: url(/images/add.gif) 1px 50% no-repeat;
|
50
|
+
font: bold 14px arial, sans-serif;
|
51
|
+
letter-spacing: -1px;
|
52
|
+
text-decoration: none;
|
53
|
+
padding: 1px 2px 1px 19px;
|
54
|
+
}
|
55
|
+
|
56
|
+
.ajax-scaffold-header div.actions a:hover {
|
57
|
+
background: #378CDF url(/images/add.gif) 1px 50% no-repeat;
|
58
|
+
}
|
59
|
+
|
60
|
+
.ajax-scaffold-header div.actions {
|
61
|
+
position: absolute;
|
62
|
+
right: 5px;
|
63
|
+
top: 3px;
|
64
|
+
width: 120px;
|
65
|
+
text-align: right;
|
66
|
+
}
|
67
|
+
|
68
|
+
.ajax-scaffold-header div.actions img {
|
69
|
+
margin-bottom: -3px;
|
70
|
+
}
|
71
|
+
|
72
|
+
/* Table Column Headers
|
73
|
+
============================= */
|
74
|
+
|
75
|
+
.ajax-scaffold th {
|
76
|
+
font-size: 11px;
|
77
|
+
color: #fff;
|
78
|
+
background: #555;
|
79
|
+
letter-spacing: 0;
|
80
|
+
font-family: Arial, sans-serif;
|
81
|
+
text-align: left;
|
82
|
+
}
|
83
|
+
|
84
|
+
.ajax-scaffold th a {
|
85
|
+
color: #fff;
|
86
|
+
padding: 2px 15px 2px 5px;
|
87
|
+
display: block;
|
88
|
+
}
|
89
|
+
|
90
|
+
.ajax-scaffold th a:hover {
|
91
|
+
background: #000;
|
92
|
+
}
|
93
|
+
|
94
|
+
.ajax-scaffold th.asc a,
|
95
|
+
.ajax-scaffold th.asc a:hover {
|
96
|
+
background: #333 url(/images/arrow_up.gif) right 50% no-repeat;
|
97
|
+
}
|
98
|
+
|
99
|
+
.ajax-scaffold th.desc a,
|
100
|
+
.ajax-scaffold th.desc a:hover {
|
101
|
+
background: #333 url(/images/arrow_down.gif) right 50% no-repeat;
|
102
|
+
}
|
103
|
+
|
104
|
+
/* Table Body Styling
|
105
|
+
============================= */
|
106
|
+
|
107
|
+
.ajax-scaffold td {
|
108
|
+
padding: 5px 4px;
|
109
|
+
border-bottom: solid 1px #C5DBF7;
|
110
|
+
color: #333;
|
111
|
+
font-family: Verdana, sans-serif;
|
112
|
+
font-size: 11px;
|
113
|
+
background-color: #E6F2FF;
|
114
|
+
border-left: solid 1px #C5DBF7;
|
115
|
+
}
|
116
|
+
|
117
|
+
.ajax-scaffold td.actions {
|
118
|
+
border-right: solid 1px #ccc;
|
119
|
+
}
|
120
|
+
|
121
|
+
.ajax-scaffold tr.even td {
|
122
|
+
background-color: #fff;
|
123
|
+
border-left: solid 1px #ddd;
|
124
|
+
}
|
125
|
+
|
126
|
+
.ajax-scaffold tr td.sorted {
|
127
|
+
background-color: #ffa;
|
128
|
+
border-bottom: solid 1px #ccc;
|
129
|
+
}
|
130
|
+
|
131
|
+
.ajax-scaffold tr.even td.sorted {
|
132
|
+
background-color: #ffd;
|
133
|
+
border-bottom: solid 1px #ccc;
|
134
|
+
}
|
135
|
+
|
136
|
+
.ajax-scaffold .update td,
|
137
|
+
.ajax-scaffold .create td {
|
138
|
+
padding: 4px;
|
139
|
+
}
|
140
|
+
|
141
|
+
.ajax-scaffold td.empty {
|
142
|
+
color: #999;
|
143
|
+
text-align: center;
|
144
|
+
}
|
145
|
+
|
146
|
+
/* Table Actions (Edit, Delete) Styling
|
147
|
+
============================= */
|
148
|
+
|
149
|
+
.ajax-scaffold td a {
|
150
|
+
font: bold 11px verdana, sans-serif;
|
151
|
+
letter-spacing: -1px;
|
152
|
+
padding: 2px;
|
153
|
+
line-height: 16px;
|
154
|
+
}
|
155
|
+
|
156
|
+
.ajax-scaffold td a:hover {
|
157
|
+
background: #ff8;
|
158
|
+
}
|
159
|
+
|
160
|
+
.ajax-scaffold .update td,
|
161
|
+
.ajax-scaffold .create td {
|
162
|
+
background: #DAFFCD;
|
163
|
+
}
|
164
|
+
|
165
|
+
.ajax-scaffold .update td,
|
166
|
+
.ajax-scaffold .create td {
|
167
|
+
border-left: solid 1px #7FcF00;
|
168
|
+
border-bottom: solid 1px #7FcF00;
|
169
|
+
border-right: solid 1px #7FcF00;
|
170
|
+
}
|
171
|
+
|
172
|
+
.ajax-scaffold .actions {
|
173
|
+
padding: 0;
|
174
|
+
width: 95px;
|
175
|
+
}
|
176
|
+
|
177
|
+
.ajax-scaffold .actions table {
|
178
|
+
float: right;
|
179
|
+
width: auto;
|
180
|
+
margin-right: 5px;
|
181
|
+
}
|
182
|
+
|
183
|
+
.ajax-scaffold .actions img {
|
184
|
+
width: 16px;
|
185
|
+
display: static;
|
186
|
+
}
|
187
|
+
|
188
|
+
.ajax-scaffold .actions table td {
|
189
|
+
border: none;
|
190
|
+
text-align: right;
|
191
|
+
padding: 0 0 0 2px;
|
192
|
+
}
|
193
|
+
|
194
|
+
/* ajax-scaffold Footer Styling
|
195
|
+
========================== */
|
196
|
+
|
197
|
+
.ajax-scaffold .ajax-scaffold-footer {
|
198
|
+
text-align: right;
|
199
|
+
background: #005CB8;
|
200
|
+
padding: 3px 5px 2px 5px;
|
201
|
+
border-bottom: none;
|
202
|
+
color: #ccc;
|
203
|
+
font: bold 12px arial, sans-serif;
|
204
|
+
}
|
205
|
+
|
206
|
+
.ajax-scaffold-footer a {
|
207
|
+
color: #fff;
|
208
|
+
text-decoration: none;
|
209
|
+
letter-spacing: 0;
|
210
|
+
padding: 0 2px;
|
211
|
+
margin: 0 -2px;
|
212
|
+
font: bold 12px arial, sans-serif;
|
213
|
+
}
|
214
|
+
|
215
|
+
.ajax-scaffold-footer a:hover {
|
216
|
+
background: #378CDF;
|
217
|
+
}
|
218
|
+
|
219
|
+
.ajax-scaffold-footer .next {
|
220
|
+
margin-left: 0;
|
221
|
+
padding-left: 5px;
|
222
|
+
border-left: solid 1px #ccc;
|
223
|
+
}
|
224
|
+
|
225
|
+
.ajax-scaffold-footer .previous {
|
226
|
+
margin-right: 0;
|
227
|
+
padding-right: 5px;
|
228
|
+
border-right: solid 1px #ccc;
|
229
|
+
}
|
230
|
+
|
231
|
+
/* Messages
|
232
|
+
========================= */
|
233
|
+
|
234
|
+
.ajax-scaffold .messages-container {
|
235
|
+
padding: 0;
|
236
|
+
margin: 0 7px;
|
237
|
+
border: none;
|
238
|
+
}
|
239
|
+
|
240
|
+
.ajax-scaffold .empty-message {
|
241
|
+
background: #e8e8e8;
|
242
|
+
padding: 4px;
|
243
|
+
text-align: center;
|
244
|
+
color: #666;
|
245
|
+
}
|
246
|
+
|
247
|
+
.ajax-scaffold .message {
|
248
|
+
font-size: 11px;
|
249
|
+
font-weight: bold;
|
250
|
+
padding: 5px 20px 5px 21px;
|
251
|
+
color: #333;
|
252
|
+
position: relative;
|
253
|
+
margin: 2px 7px;
|
254
|
+
line-height: 12px;
|
255
|
+
}
|
256
|
+
|
257
|
+
.ajax-scaffold td .message a {
|
258
|
+
position: absolute;
|
259
|
+
right: 10px;
|
260
|
+
top: 4px;
|
261
|
+
padding: 0;
|
262
|
+
font: bold 11px verdana, sans-serif;
|
263
|
+
letter-spacing: -1px;
|
264
|
+
}
|
265
|
+
|
266
|
+
.ajax-scaffold .messages-container .message {
|
267
|
+
margin: 0;
|
268
|
+
}
|
269
|
+
|
270
|
+
.ajax-scaffold .error-message {
|
271
|
+
border-left: solid 5px #f66;
|
272
|
+
background: #fbb url(/images/error.gif) 2px 3px no-repeat;
|
273
|
+
}
|
274
|
+
|
275
|
+
.ajax-scaffold .warning-message {
|
276
|
+
border-left: solid 5px #ff6;
|
277
|
+
background: #ffb url(/images/warning.gif) 2px 3px no-repeat;
|
278
|
+
}
|
279
|
+
|
280
|
+
.ajax-scaffold .info-message {
|
281
|
+
border-left: solid 5px #66f;
|
282
|
+
background: #bbf url(/images/information.gif) 2px 3px no-repeat;
|
283
|
+
}
|
284
|
+
|
285
|
+
* html .ajax-scaffold .messages-container .message {
|
286
|
+
background-position: 7px 3px;
|
287
|
+
}
|
288
|
+
|
289
|
+
/* Error Styling
|
290
|
+
========================== */
|
291
|
+
|
292
|
+
.ajax-scaffold #errorExplanation {
|
293
|
+
background: #fcc;
|
294
|
+
margin: 2px 7px;
|
295
|
+
border: solid 1px #f66;
|
296
|
+
float: left;
|
297
|
+
}
|
298
|
+
|
299
|
+
.ajax-scaffold fieldset {
|
300
|
+
clear: both;
|
301
|
+
}
|
302
|
+
|
303
|
+
.ajax-scaffold #errorExplanation h2 {
|
304
|
+
padding: 2px 5px 3px 20px;
|
305
|
+
color: #333;
|
306
|
+
font-size: 11px;
|
307
|
+
margin: 0;
|
308
|
+
letter-spacing: 0;
|
309
|
+
font-family: Verdana;
|
310
|
+
background: #f66 url(/images/error.gif) 2px 1px no-repeat;
|
311
|
+
}
|
312
|
+
|
313
|
+
.ajax-scaffold #errorExplanation ul {
|
314
|
+
margin: 0;
|
315
|
+
padding: 0 2px 4px 25px;
|
316
|
+
list-style: disc;
|
317
|
+
}
|
318
|
+
|
319
|
+
.ajax-scaffold #errorExplanation p {
|
320
|
+
font-size: 11px;
|
321
|
+
padding: 2px 5px;
|
322
|
+
font-family: Verdana;
|
323
|
+
margin: 0;
|
324
|
+
}
|
325
|
+
|
326
|
+
.ajax-scaffold #errorExplanation ul li {
|
327
|
+
font: bold 11px verdana;
|
328
|
+
letter-spacing: -1px;
|
329
|
+
margin: 0;
|
330
|
+
padding: 0;
|
331
|
+
background: transparent;
|
332
|
+
}
|
333
|
+
|
334
|
+
.ajax-scaffold .fieldWithErrors input {
|
335
|
+
border: solid 1px #f00;
|
336
|
+
}
|
337
|
+
|
338
|
+
/* Loading Indicators
|
339
|
+
============================== */
|
340
|
+
|
341
|
+
.ajax-scaffold .loading-indicator {
|
342
|
+
vertical-align: bottom;
|
343
|
+
margin: 0;
|
344
|
+
}
|
345
|
+
|
346
|
+
.ajax-scaffold .ajax-scaffold-header .loading-indicator,
|
347
|
+
.ajax-scaffold .update .loading-indicator,
|
348
|
+
.ajax-scaffold .create .loading-indicator {
|
349
|
+
vertical-align: bottom;
|
350
|
+
margin-bottom: 3px;
|
351
|
+
}
|
352
|
+
|
353
|
+
/* Form Styling
|
354
|
+
============================== */
|
355
|
+
|
356
|
+
.ajax-scaffold .submit {
|
357
|
+
font-weight: bold;
|
358
|
+
font-size: 14px;
|
359
|
+
font-family: Arial, sans-serif;
|
360
|
+
letter-spacing: 0;
|
361
|
+
margin: 0;
|
362
|
+
margin-top: 5px;
|
363
|
+
}
|
364
|
+
|
365
|
+
.ajax-scaffold fieldset {
|
366
|
+
border: none;
|
367
|
+
}
|
368
|
+
|
369
|
+
.ajax-scaffold label.required{
|
370
|
+
font-weight: bold;
|
371
|
+
}
|
372
|
+
|
373
|
+
.ajax-scaffold label.example {
|
374
|
+
font-size: 11px;
|
375
|
+
font-family: arial;
|
376
|
+
color: #888;
|
377
|
+
}
|
378
|
+
|
379
|
+
.ajax-scaffold h4 {
|
380
|
+
padding: 2px;
|
381
|
+
margin: 0;
|
382
|
+
text-transform: none;
|
383
|
+
color: #1F7F00;
|
384
|
+
letter-spacing: -1px;
|
385
|
+
font: bold 16px arial;
|
386
|
+
}
|
387
|
+
|
388
|
+
.ajax-scaffold .update a,
|
389
|
+
.ajax-scaffold .create a {
|
390
|
+
font-size: 14px;
|
391
|
+
font-weight: bold;
|
392
|
+
font-family: Arial, sans-serif;
|
393
|
+
letter-spacing: 0;
|
394
|
+
}
|
395
|
+
|
396
|
+
.ajax-scaffold p {
|
397
|
+
clear: both;
|
398
|
+
}
|
399
|
+
|
400
|
+
.ajax-scaffold div.row {
|
401
|
+
clear: both;
|
402
|
+
float: none;
|
403
|
+
padding: 2px;
|
404
|
+
margin-left: 5px;
|
405
|
+
}
|
406
|
+
|
407
|
+
.ajax-scaffold div.form-element {
|
408
|
+
float: left;
|
409
|
+
margin-right: 10px;
|
410
|
+
margin-bottom: 2px;
|
411
|
+
}
|
412
|
+
|
413
|
+
.ajax-scaffold label {
|
414
|
+
display: block;
|
415
|
+
font-family: Verdana, sans-serif;
|
416
|
+
color: #555;
|
417
|
+
font-size: 11px;
|
418
|
+
padding-bottom: 1px;
|
419
|
+
}
|
420
|
+
|
421
|
+
.ajax-scaffold input.text-input,
|
422
|
+
.ajax-scaffold select {
|
423
|
+
font-size: 16px;
|
424
|
+
font-weight: bold;
|
425
|
+
font-family: Arial, sans-serif;
|
426
|
+
letter-spacing: -1px;
|
427
|
+
border: solid 1px #1F7F00;
|
428
|
+
}
|
429
|
+
|
430
|
+
.ajax-scaffold .form-element input {
|
431
|
+
padding: 1px;
|
432
|
+
}
|
433
|
+
|
434
|
+
.ajax-scaffold textarea {
|
435
|
+
height: 65px;
|
436
|
+
font-family: Arial, sans-serif;
|
437
|
+
font-size: 12px;
|
438
|
+
padding: 1px;
|
439
|
+
border: solid 1px #1F7F00;
|
440
|
+
}
|
441
|
+
|
442
|
+
/* IE hacks
|
443
|
+
==================================== */
|
444
|
+
|
445
|
+
* html .ajax-scaffold-header {
|
446
|
+
height: 1%;
|
447
|
+
}
|
448
|
+
|
449
|
+
* html .ajax-scaffold td .messages-container {
|
450
|
+
border-top: solid 1px #DAFFCD;
|
451
|
+
}
|