active_scaffold 4.2.3 → 4.3.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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.rdoc +16 -1
  3. data/README.md +108 -7
  4. data/app/assets/javascripts/{jquery → active_scaffold}/active_scaffold.js +759 -762
  5. data/app/assets/javascripts/{jquery/date_picker_bridge.js.erb → active_scaffold/date_picker_bridge.js} +0 -3
  6. data/app/assets/javascripts/active_scaffold/load.js +102 -0
  7. data/app/assets/javascripts/active_scaffold.js.erb +3 -27
  8. data/app/assets/stylesheets/active_scaffold/_colours.scss +330 -0
  9. data/app/assets/stylesheets/active_scaffold/_images.scss +65 -0
  10. data/app/assets/stylesheets/{active_scaffold_layout.scss → active_scaffold/_layout.scss} +14 -0
  11. data/app/assets/stylesheets/active_scaffold/_variables.scss +194 -0
  12. data/app/assets/stylesheets/active_scaffold/core.scss +15 -0
  13. data/app/assets/stylesheets/active_scaffold.scss.erb +16 -0
  14. data/app/views/active_scaffold_overrides/_field_search_columns.html.erb +8 -0
  15. data/app/views/active_scaffold_overrides/_form.html.erb +8 -0
  16. data/app/views/active_scaffold_overrides/_form_association.html.erb +3 -1
  17. data/app/views/active_scaffold_overrides/_form_association_record.html.erb +4 -2
  18. data/app/views/active_scaffold_overrides/_show_association.html.erb +2 -1
  19. data/app/views/active_scaffold_overrides/_show_association_horizontal.html.erb +2 -2
  20. data/app/views/active_scaffold_overrides/_show_association_vertical.html.erb +1 -1
  21. data/app/views/active_scaffold_overrides/edit_associated.js.erb +10 -8
  22. data/lib/active_scaffold/actions/core.rb +34 -3
  23. data/lib/active_scaffold/assets/css_deps_generator.rb +42 -0
  24. data/lib/active_scaffold/assets/jquery_ui_manifest.rb +77 -0
  25. data/lib/active_scaffold/assets/jquery_ui_theme_generator.rb +102 -0
  26. data/lib/active_scaffold/assets.rb +109 -0
  27. data/lib/active_scaffold/attribute_params.rb +11 -2
  28. data/lib/active_scaffold/bridges/active_storage/form_ui.rb +1 -1
  29. data/lib/active_scaffold/bridges/carrierwave/form_ui.rb +1 -1
  30. data/lib/active_scaffold/bridges/chosen.rb +1 -1
  31. data/lib/active_scaffold/bridges/dragonfly/form_ui.rb +1 -1
  32. data/lib/active_scaffold/bridges/file_column/form_ui.rb +1 -1
  33. data/lib/active_scaffold/bridges/paperclip/form_ui.rb +1 -1
  34. data/lib/active_scaffold/bridges/record_select/helpers.rb +1 -1
  35. data/lib/active_scaffold/bridges/tiny_mce/helpers.rb +1 -0
  36. data/lib/active_scaffold/bridges/tiny_mce.rb +6 -1
  37. data/lib/active_scaffold/bridges.rb +7 -0
  38. data/lib/active_scaffold/config/core.rb +7 -3
  39. data/lib/active_scaffold/constraints.rb +1 -1
  40. data/lib/active_scaffold/data_structures/action_columns.rb +66 -0
  41. data/lib/active_scaffold/data_structures/bridge.rb +2 -0
  42. data/lib/active_scaffold/data_structures/column.rb +3 -0
  43. data/lib/active_scaffold/engine.rb +40 -0
  44. data/lib/active_scaffold/finder.rb +1 -1
  45. data/lib/active_scaffold/helpers/assets_helpers.rb +39 -0
  46. data/lib/active_scaffold/helpers/controller_helpers.rb +1 -1
  47. data/lib/active_scaffold/helpers/form_column_helpers.rb +57 -532
  48. data/lib/active_scaffold/helpers/form_ui_helpers.rb +530 -0
  49. data/lib/active_scaffold/helpers/human_condition_helpers.rb +1 -0
  50. data/lib/active_scaffold/helpers/list_column_helpers.rb +31 -11
  51. data/lib/active_scaffold/helpers/search_column_helpers.rb +5 -12
  52. data/lib/active_scaffold/helpers/show_column_helpers.rb +4 -2
  53. data/lib/active_scaffold/helpers/view_helpers.rb +12 -0
  54. data/lib/active_scaffold/railties/tasks.rake +10 -0
  55. data/lib/active_scaffold/testing/assert_embedded_load.rb +33 -0
  56. data/lib/active_scaffold/version.rb +2 -2
  57. data/lib/active_scaffold.rb +7 -2
  58. data/lib/tasks/active_scaffold/assets.rake +42 -0
  59. data/lib/tasks/bundle.rake +25 -0
  60. data/vendor/assets/stylesheets/{jquery-ui-theme.css.erb → jquery-ui-theme.css} +17 -17
  61. metadata +26 -28
  62. data/app/assets/stylesheets/active_scaffold.scss +0 -424
  63. data/app/assets/stylesheets/active_scaffold_extensions.css.erb +0 -2
  64. data/app/assets/stylesheets/active_scaffold_images.scss +0 -65
  65. data/app/assets/stylesheets/active_scaffold_jquery_ui.css.erb +0 -13
  66. /data/app/assets/javascripts/{jquery → active_scaffold}/active_scaffold_chosen.js +0 -0
  67. /data/app/assets/javascripts/{jquery → active_scaffold}/draggable_lists.js +0 -0
  68. /data/app/assets/javascripts/{jquery → active_scaffold}/jquery.editinplace.js +0 -0
  69. /data/app/assets/javascripts/{jquery → active_scaffold}/tiny_mce_bridge.js +0 -0
@@ -1,424 +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
- @use 'active_scaffold_layout';
11
- @use 'active_scaffold_images';
12
- @use 'active_scaffold_jquery_ui';
13
- @use 'active_scaffold_extensions';
14
-
15
- $disabled_color: #999 !default;
16
- $actions_disabled_color: #666 !default;
17
- $link_color: #06c !default;
18
- $hover_bg: #ff8 !default;
19
- $header_color: #555 !default;
20
-
21
- $column_header_bg: $header_color !default;
22
- $column_header_link_color: #fff !default;
23
- $column_header_link_hover_bg: #000 !default;
24
- $column_header_link_hover_color: #ff8 !default;
25
- $column_header_color: #eee !default;
26
- $column_header_sorted_bg: #333 !default;
27
-
28
- $column_bg: #E6F2FF !default;
29
- $column_even_bg: #fff !default;
30
- $column_color: #333 !default;
31
- $column_empty_color: #999 !default;
32
- $column_border_color: #C5DBF7 !default;
33
- $column_even_border_color: #ddd !default;
34
- $column_actions_border_color: #ccc !default;
35
- $vertical_sub_form_border_color: $column_actions_border_color !default;
36
-
37
- $column_sorted_bg: #B9DCFF !default;
38
- $column_sorted_border_color: #AFD0F5 !default;
39
- $column_even_sorted_bg: #E6F2FF !default;
40
- $column_even_sorted_border_color: #AFD0F5 !default;
41
-
42
- $calculations_bg: #eee !default;
43
- $calculations_border_color: #005CB8 !default;
44
-
45
- $action_group_color: #0066CC !default;
46
- $action_group_hover_bg: #ff8 !default;
47
- $action_group_border_color: #005CB8 !default;
48
- $action_group_items_bg: #EEE !default;
49
- $action_group_items_border_color: #222 !default;
50
- $action_group_link_color: $column_color !default;
51
- $active_filter: $link_color !default;
52
-
53
- $nested_bg: #DAFFCD !default;
54
- $nested_border_color: #7FCF00 !default;
55
- $nested_footer_color: #444 !default;
56
- $nested_column_bg: #ECFFE7 !default;
57
- $nested_column_even_bg: #fff !default;
58
- $nested_column_border_color: $column_border_color !default;
59
-
60
- $second_nested_bg: #FFFFBB !default;
61
- $second_nested_border_color: #DDDF37 !default;
62
-
63
- $third_nested_bg: $nested_bg !default;
64
- $third_nested_border_color: $nested_border_color !default;
65
-
66
- $pagination_border_color: #ccc !default;
67
- $msg_color: #333 !default;
68
- $msg_error_bg: #fbb !default;
69
- $msg_error_border_color: #f66 !default;
70
- $msg_warning_bg: #ffb !default;
71
- $msg_warning_border_color: #ff6 !default;
72
- $msg_info_bg: #bbf !default;
73
- $msg_info_border_color: #66f !default;
74
- $msg_filtered_bg: #e8e8e8 !default;
75
- $msg_filtered_color: #666 !default;
76
-
77
- $form_title_color: #1F7F00 !default;
78
- $label_color: $header_color !default;
79
- $description_color: #999 !default;
80
- $placeholder_color: #aaa !default;
81
- $input_border_color: $form_title_color !default;
82
- $input_error_border_color: #f00 !default;
83
- $input_focus_bg: #ffc !default;
84
-
85
- $draggable_list_bg: #FFFF88 !default;
86
- $draggable_list_selected_bg: #7FCF00 !default;
87
- $draggable_list_disabled_bg: $disabled_color !default;
88
- $checkbox_list_bg: #fff !default;
89
-
90
- $subform_color: #999 !default;
91
- $subform_header_color: $header_color !default;
92
- $subform_footer_color: $subform_color !default;
93
-
94
- .active-scaffold a, .active-scaffold a:visited {
95
- color: $link_color;
96
- }
97
-
98
- .active-scaffold a.disabled {
99
- color: $disabled_color;
100
- }
101
-
102
- .active-scaffold a:hover, .active-scaffold div.hover, .active-scaffold td span.hover {
103
- background-color: $hover_bg;
104
- }
105
-
106
- noscript.active-scaffold {
107
- border-color: $msg_error_border_color;
108
- background-color: $msg_error_bg;
109
- color: $column_color;
110
- }
111
-
112
- /* Header
113
- ======================== */
114
-
115
- .active-scaffold-header h2 {
116
- color: $header_color;
117
- }
118
-
119
- .active-scaffold div.actions a.separator {
120
- border-color: $action_group_border_color;
121
- }
122
- .active-scaffold-header div.actions a.disabled {
123
- color: $actions_disabled_color;
124
- }
125
- .active-scaffold .actions .filters .active {
126
- color: $active_filter;
127
- }
128
-
129
- /* Table :: Column Headers
130
- ============================= */
131
-
132
- .active-scaffold th {
133
- background-color: $column_header_bg;
134
- }
135
-
136
- .active-scaffold th a,
137
- .active-scaffold th p {
138
- background-color: $column_header_bg;
139
- }
140
-
141
- .active-scaffold th a, .active-scaffold th a:visited {
142
- color: $column_header_link_color;
143
- }
144
-
145
- .active-scaffold th p,
146
- .active-scaffold .show-view th {
147
- color: $column_header_color;
148
- }
149
-
150
- .active-scaffold th a:hover {
151
- background-color: $column_header_link_hover_bg;
152
- color: $column_header_link_hover_color;
153
- }
154
-
155
- .active-scaffold th.sorted {
156
- background-color: $column_header_sorted_bg;
157
- }
158
-
159
- .active-scaffold th.asc a,
160
- .active-scaffold th.asc a:hover,
161
- .active-scaffold th.desc a,
162
- .active-scaffold th.desc a:hover,
163
- .active-scaffold th.loading a,
164
- .active-scaffold th.loading a:hover {
165
- background-color: $column_header_sorted_bg;
166
- }
167
-
168
- /* Table :: Record Rows
169
- ============================= */
170
-
171
- .active-scaffold tr.record {
172
- background-color: $column_bg;
173
- }
174
- .active-scaffold tr.record td {
175
- color: $column_color;
176
- border-color: $column_border_color;
177
- }
178
-
179
- .active-scaffold tr.even-record {
180
- background-color: $column_even_bg;
181
- }
182
- .active-scaffold tr.even-record td {
183
- border-left-color: $column_even_border_color;
184
- }
185
-
186
- .active-scaffold tr.record td.sorted {
187
- background-color: $column_sorted_bg;
188
- border-bottom-color: $column_sorted_border_color;
189
- }
190
-
191
- .active-scaffold tr.even-record td.sorted {
192
- background-color: $column_even_sorted_bg;
193
- border-bottom-color: $column_even_sorted_border_color;
194
- }
195
-
196
- .active-scaffold tbody.records td.empty {
197
- color: $column_empty_color;
198
- }
199
-
200
- /* Table :: Actions (Edit, Delete)
201
- ============================= */
202
- .active-scaffold tr.record td.actions {
203
- border-color: $column_actions_border_color;
204
- }
205
-
206
- .active-scaffold tr.record td.actions table td.separator {
207
- border-color: $column_actions_border_color;
208
- }
209
-
210
- .active-scaffold tr.record td.actions a.disabled {
211
- color: $actions_disabled_color;
212
- }
213
-
214
- .active-scaffold .actions .action_group div:hover {
215
- background-color: $action_group_hover_bg;
216
- }
217
-
218
- .active-scaffold .actions .action_group {
219
- color: $action_group_color;
220
- }
221
-
222
- .active-scaffold .actions .action_group ul {
223
- border-color: $action_group_border_color;
224
- }
225
-
226
- .active-scaffold .actions .action_group ul li {
227
- background-color: $action_group_items_bg;
228
- border-color: $action_group_items_border_color;
229
- }
230
-
231
- .active-scaffold .actions .action_group ul li a {
232
- color: $action_group_link_color;
233
- }
234
-
235
- /* Table :: Inline Adapter
236
- ============================= */
237
-
238
- .active-scaffold .view {
239
- background-color: $nested_bg;
240
- border-color: $nested_border_color;
241
- }
242
-
243
- /* Nested
244
- ======================== */
245
-
246
- .active-scaffold .active-scaffold .active-scaffold-footer {
247
- color: $nested_footer_color;
248
- }
249
-
250
- .active-scaffold .active-scaffold tr.record {
251
- background-color: $nested_column_bg;
252
- border-color: $nested_column_border_color;
253
- }
254
- .active-scaffold .active-scaffold tr.even-record {
255
- background-color: $nested_column_even_bg;
256
- }
257
-
258
- .active-scaffold .active-scaffold td.inline-adapter-cell {
259
- background-color: $second_nested_bg;
260
- border-color: $second_nested_border_color;
261
- }
262
-
263
- .active-scaffold .active-scaffold .active-scaffold td.inline-adapter-cell {
264
- background-color: $third_nested_bg;
265
- border-color: $third_nested_border_color;
266
- }
267
-
268
- /* Footer
269
- ========================== */
270
-
271
- .active-scaffold-calculations td {
272
- background-color: $calculations_bg;
273
- border-color: $calculations_border_color;
274
- }
275
-
276
- .active-scaffold-footer .next {
277
- border-color: $pagination_border_color;
278
- }
279
-
280
- .active-scaffold-footer .previous {
281
- border-color: $pagination_border_color;
282
- }
283
-
284
- /* Messages
285
- ========================= */
286
-
287
-
288
- .active-scaffold .empty-message, .active-scaffold .filtered-message {
289
- background-color: $msg_filtered_bg;
290
- color: $msg_filtered_color;
291
- }
292
-
293
- .active-scaffold .message {
294
- color: $msg_color;
295
- }
296
-
297
- .active-scaffold .error-message, .active-scaffold-component .error-message {
298
- border-color: $msg_error_border_color;
299
- background-color: $msg_error_bg;
300
- }
301
-
302
- .active-scaffold .warning-message {
303
- border-color: $msg_warning_border_color;
304
- background-color: $msg_warning_bg;
305
- }
306
-
307
- .active-scaffold .info-message {
308
- border-color: $msg_info_border_color;
309
- background-color: $msg_info_bg;
310
- }
311
-
312
- /* Error Styling
313
- ========================== */
314
-
315
- .active-scaffold .errorExplanation {
316
- background-color: $msg_error_bg;
317
- border-color: $msg_error_border_color;
318
- }
319
-
320
- .active-scaffold .errorExplanation h2 {
321
- color: $msg_color;
322
- background-color: $msg_error_border_color;
323
- }
324
-
325
- /* Show
326
- ============================= */
327
-
328
- .active-scaffold .show-view dt {
329
- color: $label_color;
330
- }
331
-
332
- /* Form
333
- ============================== */
334
-
335
- .active-scaffold h4,
336
- .active-scaffold h5 {
337
- color: $form_title_color;
338
- }
339
-
340
- /* Form :: Fields
341
- ============================== */
342
-
343
- .active-scaffold label {
344
- color: $label_color;
345
- }
346
-
347
- .active-scaffold .description {
348
- color: $description_color;
349
- }
350
-
351
- .active-scaffold label.example {
352
- color: $placeholder_color;
353
- }
354
-
355
- .active-scaffold input.text-input,
356
- .active-scaffold select {
357
- border-color: $input_border_color;
358
- }
359
-
360
- .active-scaffold input:invalid,
361
- .active-scaffold textarea:invalid,
362
- .active-scaffold select:invalid,
363
- .active-scaffold .fieldWithErrors input,
364
- .active-scaffold .field_with_errors input,
365
- .active-scaffold .fieldWithErrors textarea,
366
- .active-scaffold .field_with_errors textarea,
367
- .active-scaffold .fieldWithErrors select,
368
- .active-scaffold .field_with_errors select {
369
- border-color: $input_error_border_color;
370
- }
371
-
372
- .active-scaffold input.example {
373
- color: $placeholder_color;
374
- }
375
-
376
- .active-scaffold select:focus,
377
- .active-scaffold input.text-input:focus {
378
- background-color: $input_focus_bg;
379
- }
380
-
381
- .active-scaffold textarea {
382
- border-color: $input_border_color;
383
- }
384
-
385
- .active-scaffold form .checkbox-list.draggable-list {
386
- background-color: $draggable_list_bg;
387
- }
388
-
389
- .active-scaffold form .checkbox-list.draggable-list.selected {
390
- background-color: $draggable_list_selected_bg;
391
- }
392
- .active-scaffold .ui-droppable-disabled, .active-scaffold .ui-droppable-disabled.selected {
393
- background-color: $draggable_list_disabled_bg;
394
- }
395
-
396
-
397
- /* Form :: Association Sub-Forms
398
- ============================== */
399
-
400
- .active-scaffold .sub-form table th {
401
- color: $subform_header_color;
402
- }
403
-
404
- .active-scaffold .sub-form .checkbox-list {
405
- background-color: $checkbox_list_bg;
406
- border-color: $input_border_color;
407
- }
408
-
409
- .active-scaffold .vertical-sub-form .sub-form-record + .sub-form-record {
410
- border-color: $vertical_sub_form_border_color;
411
- }
412
-
413
- .active-scaffold .sub-form table td {
414
- color: $subform_color;
415
- }
416
-
417
- .active-scaffold .sub-form .footer {
418
- color: $subform_footer_color;
419
- }
420
-
421
- .as_touch th a, .as_touch th a:visited {
422
- color: $column_header_link_color;
423
- }
424
-
@@ -1,2 +0,0 @@
1
- <% ActiveScaffold.stylesheets.each { |css| require_asset css } %>
2
- <% ActiveScaffold::Bridges.all_stylesheets.each { |css| require_asset css } %>
@@ -1,65 +0,0 @@
1
- .active-scaffold-header div.actions div.action_group div {
2
- background-image: image-url('active_scaffold/gears.png'); /* default icon for actions or override with css */
3
- }
4
-
5
- .active-scaffold-header div.actions a.show_config_list {
6
- background-image: image-url('active_scaffold/config.png');
7
- }
8
-
9
- .active-scaffold-header div.actions a.new,
10
- .active-scaffold-header div.actions a.new_existing {
11
- background-image: image-url('active_scaffold/add.png');
12
- }
13
-
14
- .active-scaffold-header div.actions a.show_search {
15
- background-image: image-url('active_scaffold/magnifier.png');
16
- }
17
-
18
- .active-scaffold th.asc a {
19
- background-image: image-url('active_scaffold/arrow_up.png');
20
- }
21
-
22
- .active-scaffold th.desc a {
23
- background-image: image-url('active_scaffold/arrow_down.png');
24
- }
25
-
26
-
27
- .active-scaffold .draggable-lists-container .check-buttons {
28
- .check-all, .uncheck-all {
29
- background-image: image-url('active_scaffold/fast-arrow-right.svg');
30
- background-repeat: no-repeat;
31
- background-size: contain;
32
- width: 16px;
33
- text-indent: 20px;
34
- overflow: hidden;
35
- white-space: nowrap;
36
- }
37
- .uncheck-all {
38
- background-image: image-url('active_scaffold/fast-arrow-left.svg');
39
- }
40
- }
41
-
42
- .active-scaffold th.loading a {
43
- background-image: image-url('active_scaffold/indicator-small.gif');
44
- }
45
-
46
- .active-scaffold a.inline-adapter-close {
47
- background-image: image-url('active_scaffold/close.png');
48
- }
49
-
50
- .active-scaffold .sub-form .association-record a.destroy {
51
- background-image: image-url('active_scaffold/cross.png');
52
- }
53
-
54
- .as_touch a.inline-adapter-close {
55
- background-image: image-url('active_scaffold/close_touch.png');
56
- }
57
- .active-scaffold .refresh-link {
58
- background-image: image-url('active_scaffold/refresh.png');
59
- }
60
-
61
- .ui-dialog .loading::after {
62
- background: image-url('active_scaffold/indicator.gif') no-repeat;
63
- content: 'Loading...';
64
- padding-left: 20px;
65
- }
@@ -1,13 +0,0 @@
1
- <% if Object.const_defined?(:Jquery) %>
2
- <% if Jquery.const_defined?(:Rails) && Jquery::Rails.const_defined?(:JQUERY_UI_VERSION) %>
3
- <% require_asset 'jquery-ui' %>
4
- <% elsif Jquery.const_defined? :Ui %>
5
- <% if Jquery::Ui::Rails::VERSION < '5.0.0' %>
6
- <% require_asset 'jquery.ui.datepicker' %>
7
- <% else %>
8
- <% require_asset 'jquery-ui/datepicker' %>
9
- <% end %>
10
- <% end %>
11
- <% end %>
12
- <% require_asset 'jquery-ui-theme' if ActiveScaffold.jquery_ui_included? %>
13
- .ui-front { z-index: 98; }