ajax_scaffold_generator 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/templates/style.css CHANGED
@@ -1,324 +1,345 @@
1
- .list-wrapper form,
2
- .list-wrapper table,
3
- .list-wrapper p,
4
- .list-wrapper div,
5
- .list-wrapper fieldset {
6
- margin: 0;
7
- padding: 0;
8
- }
9
-
10
- .list-wrapper {
11
- margin: 5px 0;
12
- }
13
-
14
-
15
- table.list {
16
- width: 100%;
17
- }
18
-
19
- .list-header {
20
- position: relative;
21
- background: #005CB8;
22
- clear: both;
23
- }
24
-
25
- * html .list-header {
26
- height: 1%;
27
- }
28
-
29
- .list-header div.actions a {
30
- color: #fff;
31
- background: url(/images/add.gif) 1px 50% no-repeat;
32
- font-size: 13px;
33
- font-family: Trebuchet MS;
34
- font-weight: bold;
35
- text-decoration: none;
36
- padding: 1px 2px 1px 19px;
37
- }
38
-
39
- .list-header div.actions a:hover {
40
- background: #378CDF url(/images/add.gif) 1px 50% no-repeat;
41
- }
42
-
43
- .list-header h2 {
44
- color: #fff;
45
- padding: 3px 5px;
46
- margin: 0;
47
- font-size: 18px;
48
- font-weight: normal;
49
- font-family: Verdana, sans-serif;
50
- }
51
-
52
- .list-header .actions {
53
- position: absolute;
54
- right: 5px;
55
- bottom: 2px;
56
- }
57
-
58
- table.list a {
59
- color: #0066CC;
60
- }
61
-
62
- table.list tr.header {
63
- background: #C5DBF7;
64
- }
65
-
66
- table.list th {
67
- font-size: 11px;
68
- padding: 2px;
69
- color: #fff;
70
- background: #555;
71
- letter-spacing: 0;
72
- font-family: Arial, sans-serif;
73
- text-align: left;
74
- padding-left: 5px;
75
- }
76
-
77
- table.list td {
78
- padding: 5px 4px;
79
- border-bottom: solid 1px #C5DBF7;
80
- color: #333;
81
- font-family: Verdana, sans-serif;
82
- font-size: 11px;
83
- background-color: #E6F2FF;
84
- }
85
-
86
- table.list tr.even td {
87
- background-color: #fff;
88
- }
89
-
90
-
91
- table.list .edit td,
92
- table.list .create td {
93
- padding: 0;
94
- padding: 4px;
95
- }
96
-
97
- table.list td.action {
98
- padding: 0;
99
- padding-right: 2px;
100
- }
101
-
102
- table.list td a {
103
- font-family: Verdana, sans-serif;
104
- font-size: 11px;
105
- font-weight: bold;
106
- letter-spacing: -1px;
107
- padding: 2px;
108
- line-height: 18px;
109
- }
110
-
111
- table.list td a:hover {
112
- background: #ff8;
113
- }
114
-
115
- .list-wrapper .list-footer {
116
- text-align: right;
117
- background: #005CB8;
118
- padding: 2px 0;
119
- border-bottom: none;
120
- }
121
-
122
- table.list tfoot a {
123
- color: #fff;
124
- font-size: 12px;
125
- font-weight: bold;
126
- letter-spacing: 0;
127
- font-family: Arial, sans-serif;
128
- }
129
-
130
- table.list tfoot a:hover {
131
- color: #0066CC;
132
- }
133
-
134
- table.list .edit td,
135
- table.list .create td {
136
- background: #DAFFCD;
137
- }
138
-
139
- table.list .edit td,
140
- table.list .create td {
141
- border-top: solid 2px #fff;
142
- border-bottom: solid 2px #fff;
143
- }
144
-
145
- table.list .actions div {
146
- width: 95px;
147
- right: 0;
148
- text-align: right;
149
- float: right;
150
- padding-right: 2px;
151
- }
152
-
153
- /* Messages */
154
-
155
- table.list .empty-message td {
156
- background: #e8e8e8;
157
- text-align: center;
158
- color: #666;
159
- }
160
-
161
- table.list .error-message td {
162
- border-bottom: solid 1px #fff;
163
- background: #f66;
164
- color: #333;
165
- font-size: 11px;
166
- font-weight: bold;
167
- }
168
-
169
- table.list .error-message p {
170
- padding-left: 19px;
171
- background: url(/images/error.gif) 0 0 no-repeat;
172
- }
173
-
174
- table.list .error-message td.actions {
175
- background: #f66;
176
- text-align: right;
177
- }
178
-
179
- table.list .error-message td.actions a {
180
- color: #333;
181
- }
182
-
183
- /* Error Styling */
184
-
185
- table.list #errorExplanation {
186
- background: #fcc;
187
- margin: 2px 7px;
188
- border: solid 1px #f66;
189
- }
190
-
191
- table.list #errorExplanation h2 {
192
- padding: 2px 5px 3px 20px;
193
- color: #333;
194
- font-size: 11px;
195
- margin: 0;
196
- letter-spacing: 0;
197
- font-family: Verdana;
198
- background: #f66 url(/images/error.gif) 2px 1px no-repeat;
199
- }
200
-
201
- table.list #errorExplanation ul {
202
- margin: 0;
203
- padding: 2px 2px 4px 25px;
204
- }
205
-
206
- table.list #errorExplanation p {
207
- font-size: 11px;
208
- padding: 2px 5px;
209
- font-family: Verdana;
210
- margin: 0;
211
- }
212
-
213
- table.list #errorExplanation ul li {
214
- font-size: 11px;
215
- margin: 0;
216
- font-family: Verdana;
217
- padding: 0;
218
- }
219
-
220
- table.list .fieldWithErrors input {
221
- border: solid 1px #f00;
222
- }
223
-
224
- /* Loading Indicator */
225
-
226
- .list-wrapper .loading-indicator {
227
- vertical-align: bottom;
228
- margin: 0;
229
- }
230
-
231
- .list-wrapper .list-header .loading-indicator,
232
- .list-wrapper .edit .loading-indicator,
233
- .list-wrapper .create .loading-indicator {
234
- vertical-align: bottom;
235
- margin-bottom: 3px;
236
- }
237
-
238
- /* Form Styling */
239
-
240
- .list-wrapper fieldset {
241
- border: none;
242
- }
243
-
244
- table.list label.required{
245
- font-weight: bold;
246
- }
247
-
248
- table.list label.example {
249
- font-size: 11px;
250
- font-family: arial;
251
- color: #888;
252
- }
253
-
254
- table.list h4 {
255
- padding: 2px;
256
- margin: 0;
257
- color: #1F7F00;
258
- font-size: 16px;
259
- letter-spacing: -1px;
260
- font-family: Georgia, Arial, sans-serif;
261
- }
262
-
263
- .list-wrapper .submit {
264
- font-weight: bold;
265
- font-size: 14px;
266
- font-family: Arial, sans-serif;
267
- letter-spacing: 0;
268
- margin: 0;
269
- margin-top: 5px;
270
- }
271
-
272
- table.list .edit a,
273
- table.list .create a {
274
- font-size: 14px;
275
- font-weight: bold;
276
- font-family: Arial, sans-serif;
277
- letter-spacing: 0;
278
- }
279
-
280
- table.list p {
281
- clear: both;
282
- }
283
-
284
- table.list div.row {
285
- clear: both;
286
- float: none;
287
- padding: 2px;
288
- margin-left: 5px;
289
- }
290
-
291
- table.list div.form-element {
292
- float: left;
293
- margin-right: 10px;
294
- margin-bottom: 2px;
295
- }
296
-
297
- table.list label {
298
- display: block;
299
- font-family: Verdana, sans-serif;
300
- color: #555;
301
- font-size: 11px;
302
- padding-bottom: 1px;
303
- }
304
-
305
- table.list input,
306
- table.list select {
307
- font-size: 16px;
308
- font-weight: bold;
309
- font-family: Arial, sans-serif;
310
- letter-spacing: -1px;
311
- }
312
-
313
- table.list .form-element input {
314
- padding: 1px;
315
- border: solid 1px #1F7F00;
316
- }
317
-
318
- table.list textarea {
319
- height: 65px;
320
- font-family: Arial, sans-serif;
321
- font-size: 12px;
322
- padding: 1px;
323
- border: solid 1px #1F7F00;
324
- }
1
+ .list-wrapper form,
2
+ .list-wrapper table,
3
+ .list-wrapper p,
4
+ .list-wrapper div,
5
+ .list-wrapper fieldset {
6
+ margin: 0;
7
+ padding: 0;
8
+ }
9
+
10
+ table.list a {
11
+ color: #0066CC;
12
+ }
13
+
14
+ .list-wrapper {
15
+ margin: 5px 0;
16
+ }
17
+
18
+ table.list {
19
+ width: 100%;
20
+ }
21
+
22
+ /* Header Styling
23
+ ======================== */
24
+
25
+ .list-header {
26
+ position: relative;
27
+ background: #005CB8;
28
+ }
29
+
30
+ .list-header div.actions a {
31
+ color: #fff;
32
+ background: url(/images/add.gif) 1px 50% no-repeat;
33
+ font-size: 13px;
34
+ font-family: Trebuchet MS;
35
+ font-weight: bold;
36
+ text-decoration: none;
37
+ padding: 1px 2px 1px 19px;
38
+ }
39
+
40
+ .list-header div.actions a:hover {
41
+ background: #378CDF url(/images/add.gif) 1px 50% no-repeat;
42
+ }
43
+
44
+ .list-header h2 {
45
+ color: #fff;
46
+ padding: 3px 5px;
47
+ margin: 0;
48
+ font-size: 18px;
49
+ font-weight: normal;
50
+ font-family: Verdana, sans-serif;
51
+ }
52
+
53
+ .list-header .actions {
54
+ position: absolute;
55
+ right: 5px;
56
+ bottom: 2px;
57
+ }
58
+
59
+ /* Table Column Headers
60
+ ============================= */
61
+
62
+
63
+ table.list tr.header {
64
+ background: #C5DBF7;
65
+ }
66
+
67
+ table.list th {
68
+ font-size: 11px;
69
+ padding: 2px;
70
+ color: #fff;
71
+ background: #555;
72
+ letter-spacing: 0;
73
+ font-family: Arial, sans-serif;
74
+ text-align: left;
75
+ padding-left: 5px;
76
+ }
77
+
78
+ /* Table Body Styling
79
+ ============================= */
80
+
81
+ table.list td {
82
+ padding: 5px 4px;
83
+ border-bottom: solid 1px #C5DBF7;
84
+ color: #333;
85
+ font-family: Verdana, sans-serif;
86
+ font-size: 11px;
87
+ background-color: #E6F2FF;
88
+ }
89
+
90
+ table.list tr.even td {
91
+ background-color: #fff;
92
+ }
93
+
94
+
95
+ table.list .edit td,
96
+ table.list .create td {
97
+ padding: 0;
98
+ padding: 4px;
99
+ }
100
+
101
+ table.list td.action {
102
+ padding: 0;
103
+ padding-right: 2px;
104
+ }
105
+
106
+ table.list td a {
107
+ font-family: Verdana, sans-serif;
108
+ font-size: 11px;
109
+ font-weight: bold;
110
+ letter-spacing: -1px;
111
+ padding: 2px;
112
+ line-height: 18px;
113
+ }
114
+
115
+ table.list td a:hover {
116
+ background: #ff8;
117
+ }
118
+
119
+ table.list .edit td,
120
+ table.list .create td {
121
+ background: #DAFFCD;
122
+ }
123
+
124
+ table.list .edit td,
125
+ table.list .create td {
126
+ border-top: solid 2px #fff;
127
+ border-bottom: solid 2px #fff;
128
+ }
129
+
130
+ table.list .actions div {
131
+ width: 95px;
132
+ right: 0;
133
+ text-align: right;
134
+ float: right;
135
+ padding-right: 2px;
136
+ }
137
+
138
+ /* List Footer Styling
139
+ ========================== */
140
+
141
+ .list-wrapper .list-footer {
142
+ text-align: right;
143
+ background: #005CB8;
144
+ padding: 2px 0;
145
+ border-bottom: none;
146
+ }
147
+
148
+ table.list tfoot a {
149
+ color: #fff;
150
+ font-size: 12px;
151
+ font-weight: bold;
152
+ letter-spacing: 0;
153
+ font-family: Arial, sans-serif;
154
+ }
155
+
156
+ table.list tfoot a:hover {
157
+ color: #0066CC;
158
+ }
159
+
160
+ /* Messages
161
+ ========================= */
162
+
163
+ table.list .empty-message td {
164
+ background: #e8e8e8;
165
+ text-align: center;
166
+ color: #666;
167
+ }
168
+
169
+ table.list .error-message td {
170
+ border-bottom: solid 1px #fff;
171
+ background: #f66;
172
+ color: #333;
173
+ font-size: 11px;
174
+ font-weight: bold;
175
+ }
176
+
177
+ table.list .error-message p {
178
+ padding-left: 19px;
179
+ background: url(/images/error.gif) 0 0 no-repeat;
180
+ }
181
+
182
+ table.list .error-message td.actions {
183
+ background: #f66;
184
+ text-align: right;
185
+ }
186
+
187
+ table.list .error-message td.actions a {
188
+ color: #333;
189
+ }
190
+
191
+ /* Error Styling
192
+ ========================== */
193
+
194
+ table.list #errorExplanation {
195
+ background: #fcc;
196
+ margin: 2px 7px;
197
+ border: solid 1px #f66;
198
+ }
199
+
200
+ table.list #errorExplanation h2 {
201
+ padding: 2px 5px 3px 20px;
202
+ color: #333;
203
+ font-size: 11px;
204
+ margin: 0;
205
+ letter-spacing: 0;
206
+ font-family: Verdana;
207
+ background: #f66 url(/images/error.gif) 2px 1px no-repeat;
208
+ }
209
+
210
+ table.list #errorExplanation ul {
211
+ margin: 0;
212
+ padding: 2px 2px 4px 25px;
213
+ }
214
+
215
+ table.list #errorExplanation p {
216
+ font-size: 11px;
217
+ padding: 2px 5px;
218
+ font-family: Verdana;
219
+ margin: 0;
220
+ }
221
+
222
+ table.list #errorExplanation ul li {
223
+ font-size: 11px;
224
+ margin: 0;
225
+ font-family: Verdana;
226
+ padding: 0;
227
+ }
228
+
229
+ table.list .fieldWithErrors input {
230
+ border: solid 1px #f00;
231
+ }
232
+
233
+ /* Loading Indicators
234
+ ============================== */
235
+
236
+ .list-wrapper .loading-indicator {
237
+ vertical-align: bottom;
238
+ margin: 0;
239
+ }
240
+
241
+ .list-wrapper .list-header .loading-indicator,
242
+ .list-wrapper .edit .loading-indicator,
243
+ .list-wrapper .create .loading-indicator {
244
+ vertical-align: bottom;
245
+ margin-bottom: 3px;
246
+ }
247
+
248
+
249
+
250
+
251
+ /* Form Styling
252
+ ============================== */
253
+
254
+ .list-wrapper .submit {
255
+ font-weight: bold;
256
+ font-size: 14px;
257
+ font-family: Arial, sans-serif;
258
+ letter-spacing: 0;
259
+ margin: 0;
260
+ margin-top: 5px;
261
+ }
262
+
263
+ .list-wrapper fieldset {
264
+ border: none;
265
+ }
266
+
267
+ table.list label.required{
268
+ font-weight: bold;
269
+ }
270
+
271
+ table.list label.example {
272
+ font-size: 11px;
273
+ font-family: arial;
274
+ color: #888;
275
+ }
276
+
277
+ table.list h4 {
278
+ padding: 2px;
279
+ margin: 0;
280
+ color: #1F7F00;
281
+ font-size: 16px;
282
+ letter-spacing: -1px;
283
+ font-family: Georgia, Arial, sans-serif;
284
+ }
285
+
286
+ table.list .edit a,
287
+ table.list .create a {
288
+ font-size: 14px;
289
+ font-weight: bold;
290
+ font-family: Arial, sans-serif;
291
+ letter-spacing: 0;
292
+ }
293
+
294
+ table.list p {
295
+ clear: both;
296
+ }
297
+
298
+ table.list div.row {
299
+ clear: both;
300
+ float: none;
301
+ padding: 2px;
302
+ margin-left: 5px;
303
+ }
304
+
305
+ table.list div.form-element {
306
+ float: left;
307
+ margin-right: 10px;
308
+ margin-bottom: 2px;
309
+ }
310
+
311
+ table.list label {
312
+ display: block;
313
+ font-family: Verdana, sans-serif;
314
+ color: #555;
315
+ font-size: 11px;
316
+ padding-bottom: 1px;
317
+ }
318
+
319
+ table.list input,
320
+ table.list select {
321
+ font-size: 16px;
322
+ font-weight: bold;
323
+ font-family: Arial, sans-serif;
324
+ letter-spacing: -1px;
325
+ }
326
+
327
+ table.list .form-element input {
328
+ padding: 1px;
329
+ border: solid 1px #1F7F00;
330
+ }
331
+
332
+ table.list textarea {
333
+ height: 65px;
334
+ font-family: Arial, sans-serif;
335
+ font-size: 12px;
336
+ padding: 1px;
337
+ border: solid 1px #1F7F00;
338
+ }
339
+
340
+ /* IE hacks
341
+ ==================================== */
342
+
343
+ * html .list-header {
344
+ height: 1%;
345
+ }
@@ -5,7 +5,7 @@
5
5
  :success => "AjaxScaffold.updateOnSuccess(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
6
6
  :failure => "AjaxScaffold.updateOnFailure(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
7
7
  :complete => "AjaxScaffold.updateOnComplete(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
8
- :html => { :id => "<%= singular_name %>-#{@<%= singular_name %>.id}-form" } %>
8
+ :html => { :id => "edit-<%= singular_name %>-#{@<%= singular_name %>.id}-form" } %>
9
9
  <h4>Edit <%= Inflector.titleize(singular_name) %></h4>
10
10
 
11
11
  <div id="<%%= "update-<%= singular_name %>-#{@<%= singular_name %>.id}-errors" %>" style="display: none;" ></div>
@@ -1 +1 @@
1
- <%%= render_component :controller => '<%= singular_name %>', :action => 'list' %>
1
+ <%%= render_component :controller => '<%= Inflector.underscore(controller_name) %>', :action => 'list' %>