active_scaffold 4.0.13 → 4.1.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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.rdoc +19 -0
  3. data/README.md +11 -5
  4. data/app/assets/javascripts/active_scaffold.js.erb +1 -1
  5. data/app/assets/javascripts/jquery/active_scaffold.js +67 -20
  6. data/app/assets/javascripts/jquery/date_picker_bridge.js.erb +1 -1
  7. data/app/assets/javascripts/jquery/draggable_lists.js +1 -1
  8. data/app/assets/javascripts/jquery/tiny_mce_bridge.js +1 -0
  9. data/app/assets/stylesheets/active_scaffold.scss +415 -6
  10. data/app/assets/stylesheets/active_scaffold_layout.css +11 -1
  11. data/app/views/active_scaffold_overrides/_form.html.erb +1 -1
  12. data/app/views/active_scaffold_overrides/_form_association_footer.html.erb +2 -1
  13. data/app/views/active_scaffold_overrides/_form_association_record.html.erb +1 -1
  14. data/app/views/active_scaffold_overrides/_human_filters.html.erb +1 -0
  15. data/app/views/active_scaffold_overrides/_list_header.html.erb +2 -0
  16. data/app/views/active_scaffold_overrides/_list_messages.html.erb +11 -0
  17. data/app/views/active_scaffold_overrides/_render_field.js.erb +1 -1
  18. data/app/views/active_scaffold_overrides/_show_association.html.erb +1 -0
  19. data/app/views/active_scaffold_overrides/_show_columns.html.erb +17 -2
  20. data/app/views/active_scaffold_overrides/_update_field_on_create.js.erb +20 -0
  21. data/app/views/active_scaffold_overrides/add_tab.js.erb +3 -3
  22. data/app/views/active_scaffold_overrides/edit_associated.js.erb +1 -1
  23. data/app/views/active_scaffold_overrides/on_create.js.erb +21 -17
  24. data/app/views/active_scaffold_overrides/on_update.js.erb +1 -1
  25. data/lib/active_scaffold/actions/core.rb +34 -16
  26. data/lib/active_scaffold/actions/field_search.rb +21 -8
  27. data/lib/active_scaffold/actions/list.rb +40 -5
  28. data/lib/active_scaffold/actions/nested.rb +1 -1
  29. data/lib/active_scaffold/actions/subform.rb +2 -1
  30. data/lib/active_scaffold/attribute_params.rb +12 -2
  31. data/lib/active_scaffold/bridges/cancan/cancan_bridge.rb +1 -1
  32. data/lib/active_scaffold/bridges/paper_trail/helper.rb +1 -1
  33. data/lib/active_scaffold/bridges/record_select/helpers.rb +1 -1
  34. data/lib/active_scaffold/config/core.rb +5 -1
  35. data/lib/active_scaffold/config/list.rb +35 -1
  36. data/lib/active_scaffold/constraints.rb +4 -2
  37. data/lib/active_scaffold/data_structures/action_columns.rb +2 -2
  38. data/lib/active_scaffold/data_structures/action_link.rb +16 -11
  39. data/lib/active_scaffold/data_structures/action_links.rb +3 -3
  40. data/lib/active_scaffold/data_structures/actions.rb +2 -2
  41. data/lib/active_scaffold/data_structures/column.rb +21 -0
  42. data/lib/active_scaffold/data_structures/columns.rb +2 -2
  43. data/lib/active_scaffold/data_structures/filter.rb +85 -0
  44. data/lib/active_scaffold/data_structures/filter_option.rb +32 -0
  45. data/lib/active_scaffold/data_structures/filters.rb +51 -0
  46. data/lib/active_scaffold/data_structures/set.rb +2 -2
  47. data/lib/active_scaffold/data_structures/sorting.rb +2 -2
  48. data/lib/active_scaffold/extensions/action_controller_rendering.rb +2 -2
  49. data/lib/active_scaffold/extensions/action_view_rendering.rb +3 -3
  50. data/lib/active_scaffold/finder.rb +16 -6
  51. data/lib/active_scaffold/helpers/action_link_helpers.rb +21 -17
  52. data/lib/active_scaffold/helpers/filter_helpers.rb +36 -0
  53. data/lib/active_scaffold/helpers/form_column_helpers.rb +116 -26
  54. data/lib/active_scaffold/helpers/human_condition_helpers.rb +4 -0
  55. data/lib/active_scaffold/helpers/list_column_helpers.rb +26 -12
  56. data/lib/active_scaffold/helpers/search_column_helpers.rb +4 -2
  57. data/lib/active_scaffold/helpers/show_column_helpers.rb +4 -3
  58. data/lib/active_scaffold/helpers/tabs_helpers.rb +4 -3
  59. data/lib/active_scaffold/helpers/view_helpers.rb +7 -1
  60. data/lib/active_scaffold/registry.rb +1 -1
  61. data/lib/active_scaffold/responds_to_parent.rb +3 -3
  62. data/lib/active_scaffold/tableless.rb +2 -2
  63. data/lib/active_scaffold/version.rb +2 -2
  64. data/lib/active_scaffold.rb +3 -7
  65. metadata +22 -17
  66. data/app/assets/stylesheets/active_scaffold_colors.scss +0 -414
@@ -1,414 +0,0 @@
1
- /*
2
- ActiveScaffold
3
- (c) 2007 Richard White <rrwhite@gmail.com>
4
-
5
- ActiveScaffold is freely distributable under the terms of an MIT-style license.
6
-
7
- For details, see the ActiveScaffold web site: https://github.com/activescaffold/active_scaffold
8
-
9
- */
10
-
11
- $disabled_color: #999 !default;
12
- $actions_disabled_color: #666 !default;
13
- $link_color: #06c !default;
14
- $hover_bg: #ff8 !default;
15
- $header_color: #555 !default;
16
-
17
- $column_header_bg: $header_color !default;
18
- $column_header_link_color: #fff !default;
19
- $column_header_link_hover_bg: #000 !default;
20
- $column_header_link_hover_color: #ff8 !default;
21
- $column_header_color: #eee !default;
22
- $column_header_sorted_bg: #333 !default;
23
-
24
- $column_bg: #E6F2FF !default;
25
- $column_even_bg: #fff !default;
26
- $column_color: #333 !default;
27
- $column_empty_color: #999 !default;
28
- $column_border_color: #C5DBF7 !default;
29
- $column_even_border_color: #ddd !default;
30
- $column_actions_border_color: #ccc !default;
31
-
32
- $column_sorted_bg: #B9DCFF !default;
33
- $column_sorted_border_color: #AFD0F5 !default;
34
- $column_even_sorted_bg: #E6F2FF !default;
35
- $column_even_sorted_border_color: #AFD0F5 !default;
36
-
37
- $calculations_bg: #eee !default;
38
- $calculations_border_color: #005CB8 !default;
39
-
40
- $action_group_color: #0066CC !default;
41
- $action_group_hover_bg: #ff8 !default;
42
- $action_group_border_color: #005CB8 !default;
43
- $action_group_items_bg: #EEE !default;
44
- $action_group_items_border_color: #222 !default;
45
- $action_group_link_color: $column_color !default;
46
-
47
- $nested_bg: #DAFFCD !default;
48
- $nested_border_color: #7FCF00 !default;
49
- $nested_footer_color: #444 !default;
50
- $nested_column_bg: #ECFFE7 !default;
51
- $nested_column_even_bg: #fff !default;
52
- $nested_column_border_color: $column_border_color !default;
53
-
54
- $second_nested_bg: #FFFFBB !default;
55
- $second_nested_border_color: #DDDF37 !default;
56
-
57
- $third_nested_bg: $nested_bg !default;
58
- $third_nested_border_color: $nested_border_color !default;
59
-
60
- $pagination_border_color: #ccc !default;
61
- $msg_color: #333 !default;
62
- $msg_error_bg: #fbb !default;
63
- $msg_error_border_color: #f66 !default;
64
- $msg_warning_bg: #ffb !default;
65
- $msg_warning_border_color: #ff6 !default;
66
- $msg_info_bg: #bbf !default;
67
- $msg_info_border_color: #66f !default;
68
- $msg_filtered_bg: #e8e8e8 !default;
69
- $msg_filtered_color: #666 !default;
70
-
71
- $form_title_color: #1F7F00 !default;
72
- $label_color: $header_color !default;
73
- $description_color: #999 !default;
74
- $placeholder_color: #aaa !default;
75
- $input_border_color: $form_title_color !default;
76
- $input_error_border_color: #f00 !default;
77
- $input_focus_bg: #ffc !default;
78
-
79
- $draggable_list_bg: #FFFF88 !default;
80
- $draggable_list_selected_bg: #7FCF00 !default;
81
- $draggable_list_disabled_bg: $disabled_color !default;
82
- $checkbox_list_bg: #fff !default;
83
-
84
- $subform_color: #999 !default;
85
- $subform_header_color: $header_color !default;
86
- $subform_footer_color: $subform_color !default;
87
-
88
- .active-scaffold a, .active-scaffold a:visited {
89
- color: $link_color;
90
- }
91
-
92
- .active-scaffold a.disabled {
93
- color: $disabled_color;
94
- }
95
-
96
- .active-scaffold a:hover, .active-scaffold div.hover, .active-scaffold td span.hover {
97
- background-color: $hover_bg;
98
- }
99
-
100
- noscript.active-scaffold {
101
- border-color: $msg_error_border_color;
102
- background-color: $msg_error_bg;
103
- color: $column_color;
104
- }
105
-
106
- /* Header
107
- ======================== */
108
-
109
- .active-scaffold-header h2 {
110
- color: $header_color;
111
- }
112
-
113
- .active-scaffold div.actions a.separator {
114
- border-color: $action_group_border_color;
115
- }
116
- .active-scaffold-header div.actions a.disabled {
117
- color: $actions_disabled_color;
118
- }
119
-
120
- /* Table :: Column Headers
121
- ============================= */
122
-
123
- .active-scaffold th {
124
- background-color: $column_header_bg;
125
- }
126
-
127
- .active-scaffold th a,
128
- .active-scaffold th p {
129
- background-color: $column_header_bg;
130
- }
131
-
132
- .active-scaffold th a, .active-scaffold th a:visited {
133
- color: $column_header_link_color;
134
- }
135
-
136
- .active-scaffold th p,
137
- .active-scaffold .show-view th {
138
- color: $column_header_color;
139
- }
140
-
141
- .active-scaffold th a:hover {
142
- background-color: $column_header_link_hover_bg;
143
- color: $column_header_link_hover_color;
144
- }
145
-
146
- .active-scaffold th.sorted {
147
- background-color: $column_header_sorted_bg;
148
- }
149
-
150
- .active-scaffold th.asc a,
151
- .active-scaffold th.asc a:hover,
152
- .active-scaffold th.desc a,
153
- .active-scaffold th.desc a:hover,
154
- .active-scaffold th.loading a,
155
- .active-scaffold th.loading a:hover {
156
- background-color: $column_header_sorted_bg;
157
- }
158
-
159
- /* Table :: Record Rows
160
- ============================= */
161
-
162
- .active-scaffold tr.record {
163
- background-color: $column_bg;
164
- }
165
- .active-scaffold tr.record td {
166
- color: $column_color;
167
- border-color: $column_border_color;
168
- }
169
-
170
- .active-scaffold tr.even-record {
171
- background-color: $column_even_bg;
172
- }
173
- .active-scaffold tr.even-record td {
174
- border-left-color: $column_even_border_color;
175
- }
176
-
177
- .active-scaffold tr.record td.sorted {
178
- background-color: $column_sorted_bg;
179
- border-bottom-color: $column_sorted_border_color;
180
- }
181
-
182
- .active-scaffold tr.even-record td.sorted {
183
- background-color: $column_even_sorted_bg;
184
- border-bottom-color: $column_even_sorted_border_color;
185
- }
186
-
187
- .active-scaffold tbody.records td.empty {
188
- color: $column_empty_color;
189
- }
190
-
191
- /* Table :: Actions (Edit, Delete)
192
- ============================= */
193
- .active-scaffold tr.record td.actions {
194
- border-color: $column_actions_border_color;
195
- }
196
-
197
- .active-scaffold tr.record td.actions table td.separator {
198
- border-color: $column_actions_border_color;
199
- }
200
-
201
- .active-scaffold tr.record td.actions a.disabled {
202
- color: $actions_disabled_color;
203
- }
204
-
205
- .active-scaffold .actions .action_group div:hover {
206
- background-color: $action_group_hover_bg;
207
- }
208
-
209
- .active-scaffold .actions .action_group {
210
- color: $action_group_color;
211
- }
212
-
213
- .active-scaffold .actions .action_group ul {
214
- border-color: $action_group_border_color;
215
- }
216
-
217
- .active-scaffold .actions .action_group ul li {
218
- background-color: $action_group_items_bg;
219
- border-color: $action_group_items_border_color;
220
- }
221
-
222
- .active-scaffold .actions .action_group ul li a {
223
- color: $action_group_link_color;
224
- }
225
-
226
- /* Table :: Inline Adapter
227
- ============================= */
228
-
229
- .active-scaffold .view {
230
- background-color: $nested_bg;
231
- border-color: $nested_border_color;
232
- }
233
-
234
- /* Nested
235
- ======================== */
236
-
237
- .active-scaffold .active-scaffold .active-scaffold-footer {
238
- color: $nested_footer_color;
239
- }
240
-
241
- .active-scaffold .active-scaffold tr.record {
242
- background-color: $nested_column_bg;
243
- border-color: $nested_column_border_color;
244
- }
245
- .active-scaffold .active-scaffold tr.even-record {
246
- background-color: $nested_column_even_bg;
247
- }
248
-
249
- .active-scaffold .active-scaffold td.inline-adapter-cell {
250
- background-color: $second_nested_bg;
251
- border-color: $second_nested_border_color;
252
- }
253
-
254
- .active-scaffold .active-scaffold .active-scaffold td.inline-adapter-cell {
255
- background-color: $third_nested_bg;
256
- border-color: $third_nested_border_color;
257
- }
258
-
259
- /* Footer
260
- ========================== */
261
-
262
- .active-scaffold-calculations td {
263
- background-color: $calculations_bg;
264
- border-color: $calculations_border_color;
265
- }
266
-
267
- .active-scaffold-footer .next {
268
- border-color: $pagination_border_color;
269
- }
270
-
271
- .active-scaffold-footer .previous {
272
- border-color: $pagination_border_color;
273
- }
274
-
275
- /* Messages
276
- ========================= */
277
-
278
-
279
- .active-scaffold .empty-message, .active-scaffold .filtered-message {
280
- background-color: $msg_filtered_bg;
281
- color: $msg_filtered_color;
282
- }
283
-
284
- .active-scaffold .message {
285
- color: $msg_color;
286
- }
287
-
288
- .active-scaffold .error-message, .active-scaffold-component .error-message {
289
- border-color: $msg_error_border_color;
290
- background-color: $msg_error_bg;
291
- }
292
-
293
- .active-scaffold .warning-message {
294
- border-color: $msg_warning_border_color;
295
- background-color: $msg_warning_bg;
296
- }
297
-
298
- .active-scaffold .info-message {
299
- border-color: $msg_info_border_color;
300
- background-color: $msg_info_bg;
301
- }
302
-
303
- /* Error Styling
304
- ========================== */
305
-
306
- .active-scaffold .errorExplanation {
307
- background-color: $msg_error_bg;
308
- border-color: $msg_error_border_color;
309
- }
310
-
311
- .active-scaffold .errorExplanation h2 {
312
- color: $msg_color;
313
- background-color: $msg_error_border_color;
314
- }
315
-
316
- /* Show
317
- ============================= */
318
-
319
- .active-scaffold .show-view dt {
320
- color: $label_color;
321
- }
322
-
323
- /* Form
324
- ============================== */
325
-
326
- .active-scaffold h4,
327
- .active-scaffold h5 {
328
- color: $form_title_color;
329
- }
330
-
331
- /* Form :: Fields
332
- ============================== */
333
-
334
- .active-scaffold label {
335
- color: $label_color;
336
- }
337
-
338
- .active-scaffold .description {
339
- color: $description_color;
340
- }
341
-
342
- .active-scaffold label.example {
343
- color: $placeholder_color;
344
- }
345
-
346
- .active-scaffold input.text-input,
347
- .active-scaffold select {
348
- border-color: $input_border_color;
349
- }
350
-
351
- .active-scaffold input:invalid,
352
- .active-scaffold textarea:invalid,
353
- .active-scaffold select:invalid,
354
- .active-scaffold .fieldWithErrors input,
355
- .active-scaffold .field_with_errors input,
356
- .active-scaffold .fieldWithErrors textarea,
357
- .active-scaffold .field_with_errors textarea,
358
- .active-scaffold .fieldWithErrors select,
359
- .active-scaffold .field_with_errors select {
360
- border-color: $input_error_border_color;
361
- }
362
-
363
- .active-scaffold input.example {
364
- color: $placeholder_color;
365
- }
366
-
367
- .active-scaffold select:focus,
368
- .active-scaffold input.text-input:focus {
369
- background-color: $input_focus_bg;
370
- }
371
-
372
- .active-scaffold textarea {
373
- border-color: $input_border_color;
374
- }
375
-
376
- .active-scaffold form .checkbox-list.draggable-list {
377
- background-color: $draggable_list_bg;
378
- }
379
-
380
- .active-scaffold form .checkbox-list.draggable-list.selected {
381
- background-color: $draggable_list_selected_bg;
382
- }
383
- .active-scaffold .ui-droppable-disabled, .active-scaffold .ui-droppable-disabled.selected {
384
- background-color: $draggable_list_disabled_bg;
385
- }
386
-
387
-
388
- /* Form :: Association Sub-Forms
389
- ============================== */
390
-
391
- .active-scaffold .sub-form table th {
392
- color: $subform_header_color;
393
- }
394
-
395
- .active-scaffold .sub-form .checkbox-list {
396
- background-color: $checkbox_list_bg;
397
- border-color: $input_border_color;
398
- }
399
-
400
- .active-scaffold .sub-form .checkbox-list label {
401
- display: block;
402
- }
403
-
404
- .active-scaffold .sub-form table td {
405
- color: $subform_color;
406
- }
407
-
408
- .active-scaffold .sub-form .footer {
409
- color: $subform_footer_color;
410
- }
411
-
412
- .as_touch th a, .as_touch th a:visited {
413
- color: $column_header_link_color;
414
- }