ajax_scaffold_generator 2.2.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README CHANGED
@@ -1,5 +1,5 @@
1
1
  *******************************************************************************************
2
- ** For all documentation see the project website: http://ajaxscaffold.height1percent.com **
2
+ ** For all documentation see the project website: http://www.ajaxscaffold.com **
3
3
  *******************************************************************************************
4
4
 
5
5
  Description:
@@ -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
- m.template "partial_form_errors.rhtml",
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
- "_form_errors.rhtml")
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', "app/views/layouts/#{controller_file_name}.rhtml"
79
- m.template 'style.css', 'public/stylesheets/ajax_scaffold.css'
80
- m.template 'script.js', 'public/javascripts/ajax_scaffold.js'
81
- m.template 'rico_corner.js', 'public/javascripts/rico_corner.js'
82
- m.template 'indicator.gif', 'public/images/indicator.gif'
83
- m.template 'add.gif', 'public/images/add.gif'
84
- m.template 'error.gif', 'public/images/error.gif'
85
-
86
- # Unscaffolded views.
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] [action, ...]"
153
+ "Usage: #{$0} ajax_scaffold ModelName [ControllerName]"
103
154
  end
104
155
 
105
156
  def scaffold_views
106
- %w( list edit new index )
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
- .ajax-scaffold-wrapper form,
2
- .ajax-scaffold-wrapper table,
3
- .ajax-scaffold-wrapper p,
4
- .ajax-scaffold-wrapper div,
5
- .ajax-scaffold-wrapper fieldset,
6
- .ajax-scaffold form,
7
- .ajax-scaffold table,
8
- .ajax-scaffold p,
9
- .ajax-scaffold div,
10
- .ajax-scaffold fieldset {
11
- margin: 0;
12
- padding: 0;
13
- }
14
-
15
- .ajax-scaffold a {
16
- color: #0066CC;
17
- text-decoration: none;
18
- }
19
-
20
- .ajax-scaffold-wrapper {
21
- margin: 5px 0;
22
- }
23
-
24
- .ajax-scaffold {
25
- width: 100%;
26
- }
27
-
28
- /* Header Styling
29
- ======================== */
30
-
31
- .ajax-scaffold-header {
32
- position: relative;
33
- background: #005CB8;
34
- }
35
-
36
- .ajax-scaffold-header div.actions a {
37
- color: #fff;
38
- background: url(/images/add.gif) 1px 50% no-repeat;
39
- font-size: 13px;
40
- font-family: Trebuchet MS;
41
- font-weight: bold;
42
- text-decoration: none;
43
- padding: 1px 2px 1px 19px;
44
- }
45
-
46
- .ajax-scaffold-header div.actions a:hover {
47
- background: #378CDF url(/images/add.gif) 1px 50% no-repeat;
48
- }
49
-
50
- .ajax-scaffold-header h2 {
51
- color: #fff;
52
- padding: 3px 5px;
53
- margin: 0;
54
- font-size: 18px;
55
- font-weight: normal;
56
- font-family: Verdana, sans-serif;
57
- }
58
-
59
- .ajax-scaffold-header .actions {
60
- position: absolute;
61
- right: 5px;
62
- bottom: 2px;
63
- }
64
-
65
- /* Table Column Headers
66
- ============================= */
67
-
68
- .ajax-scaffold tr.header {
69
- background: #C5DBF7;
70
- }
71
-
72
- .ajax-scaffold th {
73
- font-size: 11px;
74
- padding: 2px;
75
- color: #fff;
76
- background: #555;
77
- letter-spacing: 0;
78
- font-family: Arial, sans-serif;
79
- text-align: left;
80
- padding-left: 5px;
81
- }
82
-
83
- /* Table Body Styling
84
- ============================= */
85
-
86
- .ajax-scaffold td {
87
- padding: 5px 4px;
88
- border-bottom: solid 1px #C5DBF7;
89
- color: #333;
90
- font-family: Verdana, sans-serif;
91
- font-size: 11px;
92
- background-color: #E6F2FF;
93
- }
94
-
95
- .ajax-scaffold tr.even td {
96
- background-color: #fff;
97
- }
98
-
99
- .ajax-scaffold .edit td,
100
- .ajax-scaffold .create td {
101
- padding: 0;
102
- padding: 4px;
103
- }
104
-
105
- /* Table Actions (Edit, Delete) Styling
106
- ============================= */
107
-
108
- .ajax-scaffold td a {
109
- font-family: Verdana, sans-serif;
110
- font-size: 11px;
111
- font-weight: bold;
112
- letter-spacing: -1px;
113
- padding: 2px;
114
- line-height: 18px;
115
- }
116
-
117
- /* The following fixes some very weird
118
- layout issue in IE where the edit link
119
- is too close to the delete link after
120
- the introduction of the taconite JS library
121
- .ajax-scaffold .actions a {
122
- display: block;
123
- float: right;
124
- padding: 0 2px;
125
- margin-left: 3px;
126
- }
127
- */
128
-
129
- .ajax-scaffold td a:hover {
130
- background: #ff8;
131
- }
132
-
133
- .ajax-scaffold .edit td,
134
- .ajax-scaffold .create td {
135
- background: #DAFFCD;
136
- }
137
-
138
- .ajax-scaffold .edit td,
139
- .ajax-scaffold .create td {
140
- border-top: solid 2px #fff;
141
- border-bottom: solid 2px #fff;
142
- }
143
-
144
- .ajax-scaffold .actions div {
145
- width: 95px;
146
- text-align: right;
147
- float: right;
148
- padding-right: 2px;
149
- }
150
-
151
- /* ajax-scaffold Footer Styling
152
- ========================== */
153
-
154
- .ajax-scaffold-wrapper .ajax-scaffold-footer {
155
- text-align: right;
156
- background: #005CB8;
157
- padding: 2px 0;
158
- border-bottom: none;
159
- }
160
-
161
- .ajax-scaffold tfoot a {
162
- color: #fff;
163
- font-size: 12px;
164
- font-weight: bold;
165
- letter-spacing: 0;
166
- font-family: Arial, sans-serif;
167
- }
168
-
169
- .ajax-scaffold tfoot a:hover {
170
- color: #0066CC;
171
- }
172
-
173
- /* Messages
174
- ========================= */
175
-
176
- .ajax-scaffold .empty-message td {
177
- background: #e8e8e8;
178
- text-align: center;
179
- color: #666;
180
- }
181
-
182
- .ajax-scaffold .error-message td {
183
- border-bottom: solid 1px #fff;
184
- background: #f66;
185
- color: #333;
186
- font-size: 11px;
187
- font-weight: bold;
188
- }
189
-
190
- .ajax-scaffold .error-message p {
191
- padding-left: 19px;
192
- background: url(/images/error.gif) 0 0 no-repeat;
193
- }
194
-
195
- .ajax-scaffold .error-message td.actions {
196
- background: #f66;
197
- text-align: right;
198
- }
199
-
200
- .ajax-scaffold .error-message td.actions a {
201
- color: #333;
202
- }
203
-
204
- /* Error Styling
205
- ========================== */
206
-
207
- .ajax-scaffold #errorExplanation {
208
- background: #fcc;
209
- margin: 2px 7px;
210
- border: solid 1px #f66;
211
- float: left;
212
- }
213
-
214
- .ajax-scaffold fieldset {
215
- clear: both;
216
- }
217
-
218
- .ajax-scaffold #errorExplanation h2 {
219
- padding: 2px 5px 3px 20px;
220
- color: #333;
221
- font-size: 11px;
222
- margin: 0;
223
- letter-spacing: 0;
224
- font-family: Verdana;
225
- background: #f66 url(/images/error.gif) 2px 1px no-repeat;
226
- }
227
-
228
- .ajax-scaffold #errorExplanation ul {
229
- margin: 0;
230
- padding: 2px 2px 4px 25px;
231
- }
232
-
233
- .ajax-scaffold #errorExplanation p {
234
- font-size: 11px;
235
- padding: 2px 5px;
236
- font-family: Verdana;
237
- margin: 0;
238
- }
239
-
240
- .ajax-scaffold #errorExplanation ul li {
241
- font-size: 11px;
242
- margin: 0;
243
- font-family: Verdana;
244
- padding: 0;
245
- }
246
-
247
- .ajax-scaffold .fieldWithErrors input {
248
- border: solid 1px #f00;
249
- }
250
-
251
- /* Loading Indicators
252
- ============================== */
253
-
254
- .ajax-scaffold-wrapper .loading-indicator {
255
- vertical-align: bottom;
256
- margin: 0;
257
- }
258
-
259
- .ajax-scaffold-wrapper .ajax-scaffold-header .loading-indicator,
260
- .ajax-scaffold-wrapper .edit .loading-indicator,
261
- .ajax-scaffold-wrapper .create .loading-indicator {
262
- vertical-align: bottom;
263
- margin-bottom: 3px;
264
- }
265
-
266
- /* Form Styling
267
- ============================== */
268
-
269
- .ajax-scaffold-wrapper .submit,
270
- .ajax-scaffold .submit {
271
- font-weight: bold;
272
- font-size: 14px;
273
- font-family: Arial, sans-serif;
274
- letter-spacing: 0;
275
- margin: 0;
276
- margin-top: 5px;
277
- }
278
-
279
- .ajax-scaffold-wrapper fieldset,
280
- .ajax-scaffold fieldset {
281
- border: none;
282
- }
283
-
284
- .ajax-scaffold label.required{
285
- font-weight: bold;
286
- }
287
-
288
- .ajax-scaffold label.example {
289
- font-size: 11px;
290
- font-family: arial;
291
- color: #888;
292
- }
293
-
294
- .ajax-scaffold h4 {
295
- padding: 2px;
296
- margin: 0;
297
- font-weight: bold;
298
- text-transform: none;
299
- color: #1F7F00;
300
- font-size: 16px;
301
- letter-spacing: -1px;
302
- font-family: Georgia, Arial, sans-serif;
303
- }
304
-
305
- .ajax-scaffold .edit a,
306
- .ajax-scaffold .create a {
307
- font-size: 14px;
308
- font-weight: bold;
309
- font-family: Arial, sans-serif;
310
- letter-spacing: 0;
311
- }
312
-
313
- .ajax-scaffold p {
314
- clear: both;
315
- }
316
-
317
- .ajax-scaffold div.row {
318
- clear: both;
319
- float: none;
320
- padding: 2px;
321
- margin-left: 5px;
322
- }
323
-
324
- .ajax-scaffold div.form-element {
325
- float: left;
326
- margin-right: 10px;
327
- margin-bottom: 2px;
328
- }
329
-
330
- .ajax-scaffold label {
331
- display: block;
332
- font-family: Verdana, sans-serif;
333
- color: #555;
334
- font-size: 11px;
335
- padding-bottom: 1px;
336
- }
337
-
338
- .ajax-scaffold input,
339
- .ajax-scaffold select {
340
- font-size: 16px;
341
- font-weight: bold;
342
- font-family: Arial, sans-serif;
343
- letter-spacing: -1px;
344
- }
345
-
346
- .ajax-scaffold .form-element input {
347
- padding: 1px;
348
- border: solid 1px #1F7F00;
349
- }
350
-
351
- .ajax-scaffold textarea {
352
- height: 65px;
353
- font-family: Arial, sans-serif;
354
- font-size: 12px;
355
- padding: 1px;
356
- border: solid 1px #1F7F00;
357
- }
358
-
359
- /* IE hacks
360
- ==================================== */
361
-
362
- * html .ajax-scaffold-header {
363
- height: 1%;
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
+ }