active_scaffold 3.6.0.pre → 3.6.0.rc1

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 (118) hide show
  1. checksums.yaml +4 -4
  2. data/{CHANGELOG → CHANGELOG.rdoc} +39 -0
  3. data/app/assets/javascripts/active_scaffold.js.erb +0 -1
  4. data/app/assets/javascripts/jquery/active_scaffold.js +35 -4
  5. data/app/assets/stylesheets/active_scaffold_colors.scss +1 -1
  6. data/app/assets/stylesheets/active_scaffold_layout.css +52 -29
  7. data/app/views/active_scaffold_overrides/_list_header.html.erb +5 -7
  8. data/app/views/active_scaffold_overrides/_list_record.html.erb +4 -5
  9. data/app/views/active_scaffold_overrides/_list_with_header.html.erb +1 -1
  10. data/app/views/active_scaffold_overrides/_refresh_list.js.erb +4 -0
  11. data/config/locales/de.yml +2 -1
  12. data/config/locales/en.yml +1 -0
  13. data/config/locales/es.yml +1 -0
  14. data/config/locales/fr.yml +2 -1
  15. data/config/locales/hu.yml +1 -0
  16. data/config/locales/ja.yml +1 -0
  17. data/config/locales/ru.yml +1 -0
  18. data/lib/active_scaffold.rb +8 -3
  19. data/lib/active_scaffold/actions/common_search.rb +11 -8
  20. data/lib/active_scaffold/actions/core.rb +79 -51
  21. data/lib/active_scaffold/actions/create.rb +27 -27
  22. data/lib/active_scaffold/actions/delete.rb +1 -1
  23. data/lib/active_scaffold/actions/field_search.rb +52 -42
  24. data/lib/active_scaffold/actions/list.rb +106 -23
  25. data/lib/active_scaffold/actions/nested.rb +59 -42
  26. data/lib/active_scaffold/actions/show.rb +3 -3
  27. data/lib/active_scaffold/actions/subform.rb +9 -16
  28. data/lib/active_scaffold/actions/update.rb +95 -77
  29. data/lib/active_scaffold/attribute_params.rb +93 -68
  30. data/lib/active_scaffold/bridges/active_storage.rb +6 -0
  31. data/lib/active_scaffold/bridges/active_storage/active_storage_bridge.rb +33 -0
  32. data/lib/active_scaffold/bridges/active_storage/active_storage_helpers.rb +54 -0
  33. data/lib/active_scaffold/bridges/active_storage/form_ui.rb +22 -0
  34. data/lib/active_scaffold/bridges/active_storage/list_ui.rb +36 -0
  35. data/lib/active_scaffold/bridges/bitfields.rb +1 -0
  36. data/lib/active_scaffold/bridges/bitfields/bitfields_bridge.rb +12 -15
  37. data/lib/active_scaffold/bridges/cancan/cancan_bridge.rb +6 -0
  38. data/lib/active_scaffold/bridges/carrierwave/list_ui.rb +2 -2
  39. data/lib/active_scaffold/bridges/date_picker/helper.rb +46 -41
  40. data/lib/active_scaffold/bridges/dragonfly/list_ui.rb +1 -1
  41. data/lib/active_scaffold/bridges/file_column/file_column_helpers.rb +2 -2
  42. data/lib/active_scaffold/bridges/file_column/form_ui.rb +3 -3
  43. data/lib/active_scaffold/bridges/file_column/test/functional/file_column_keep_test.rb +3 -1
  44. data/lib/active_scaffold/bridges/paperclip/paperclip_bridge_helpers.rb +2 -2
  45. data/lib/active_scaffold/bridges/record_select/helpers.rb +3 -7
  46. data/lib/active_scaffold/bridges/shared/date_bridge.rb +19 -18
  47. data/lib/active_scaffold/bridges/tiny_mce/helpers.rb +3 -1
  48. data/lib/active_scaffold/bridges/usa_state_select/usa_state_select_helper.rb +20 -3
  49. data/lib/active_scaffold/config/base.rb +58 -34
  50. data/lib/active_scaffold/config/core.rb +31 -12
  51. data/lib/active_scaffold/config/delete.rb +12 -1
  52. data/lib/active_scaffold/config/list.rb +17 -7
  53. data/lib/active_scaffold/config/mark.rb +1 -1
  54. data/lib/active_scaffold/configurable.rb +5 -3
  55. data/lib/active_scaffold/constraints.rb +21 -19
  56. data/lib/active_scaffold/core.rb +35 -26
  57. data/lib/active_scaffold/data_structures/action_columns.rb +1 -1
  58. data/lib/active_scaffold/data_structures/action_link.rb +34 -16
  59. data/lib/active_scaffold/data_structures/action_links.rb +9 -11
  60. data/lib/active_scaffold/data_structures/association/abstract.rb +35 -13
  61. data/lib/active_scaffold/data_structures/association/active_mongoid.rb +2 -6
  62. data/lib/active_scaffold/data_structures/association/active_record.rb +5 -1
  63. data/lib/active_scaffold/data_structures/association/mongoid.rb +0 -3
  64. data/lib/active_scaffold/data_structures/column.rb +49 -58
  65. data/lib/active_scaffold/data_structures/columns.rb +3 -2
  66. data/lib/active_scaffold/data_structures/nested_info.rb +20 -18
  67. data/lib/active_scaffold/data_structures/sorting.rb +5 -0
  68. data/lib/active_scaffold/delayed_setup.rb +16 -6
  69. data/lib/active_scaffold/extensions/action_controller_rendering.rb +1 -1
  70. data/lib/active_scaffold/extensions/action_view_rendering.rb +34 -14
  71. data/lib/active_scaffold/extensions/cow_proxy.rb +50 -2
  72. data/lib/active_scaffold/extensions/localize.rb +3 -1
  73. data/lib/active_scaffold/extensions/routing_mapper.rb +2 -2
  74. data/lib/active_scaffold/extensions/to_label.rb +3 -2
  75. data/lib/active_scaffold/finder.rb +81 -46
  76. data/lib/active_scaffold/helpers/action_link_helpers.rb +47 -21
  77. data/lib/active_scaffold/helpers/association_helpers.rb +13 -11
  78. data/lib/active_scaffold/helpers/controller_helpers.rb +14 -11
  79. data/lib/active_scaffold/helpers/form_column_helpers.rb +133 -99
  80. data/lib/active_scaffold/helpers/human_condition_helpers.rb +1 -1
  81. data/lib/active_scaffold/helpers/id_helpers.rb +4 -0
  82. data/lib/active_scaffold/helpers/list_column_helpers.rb +76 -49
  83. data/lib/active_scaffold/helpers/pagination_helpers.rb +2 -2
  84. data/lib/active_scaffold/helpers/search_column_helpers.rb +25 -30
  85. data/lib/active_scaffold/helpers/show_column_helpers.rb +3 -5
  86. data/lib/active_scaffold/helpers/view_helpers.rb +31 -22
  87. data/lib/active_scaffold/orm_checks.rb +2 -2
  88. data/lib/active_scaffold/paginator.rb +1 -3
  89. data/lib/active_scaffold/registry.rb +11 -0
  90. data/lib/active_scaffold/responds_to_parent.rb +6 -5
  91. data/lib/active_scaffold/tableless.rb +6 -8
  92. data/lib/active_scaffold/version.rb +1 -1
  93. data/shoulda_macros/macros.rb +3 -1
  94. data/test/bridges/paperclip_test.rb +1 -1
  95. data/test/company.rb +2 -2
  96. data/test/data_structures/action_columns_test.rb +2 -2
  97. data/test/data_structures/column_test.rb +3 -6
  98. data/test/data_structures/columns_test.rb +2 -2
  99. data/test/extensions/active_record_test.rb +4 -4
  100. data/test/extensions/routing_mapper_test.rb +2 -2
  101. data/test/helpers/list_column_helpers_test.rb +3 -1
  102. data/test/misc/active_record_permissions_test.rb +2 -2
  103. data/test/misc/attribute_params_test.rb +4 -0
  104. data/test/misc/configurable_test.rb +10 -10
  105. data/test/misc/convert_numbers_format_test.rb +4 -0
  106. data/test/mock_app/app/assets/config/manifest.js +0 -0
  107. data/test/mock_app/app/controllers/cars_controller.rb +1 -0
  108. data/test/mock_app/app/controllers/people_controller.rb +3 -1
  109. data/test/mock_app/config/application.rb +1 -0
  110. data/test/mock_app/config/routes.rb +4 -1
  111. data/test/mock_app/db/schema.rb +2 -0
  112. data/test/performance/list_cars_performance_test.rb +34 -0
  113. data/test/performance/list_people_performance_test.rb +31 -0
  114. data/test/performance_test_help.rb +3 -0
  115. data/test/test_helper.rb +2 -1
  116. metadata +22 -12
  117. data/app/assets/javascripts/prototype/rico_corner.js +0 -370
  118. data/lib/active_scaffold/bridges/file_column/test/test_helper.rb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 089ef264fed67a42513f1317c4db56ccd736fdf9f57aeffcc469e9c672987c10
4
- data.tar.gz: 7c2a738e0396d7644e873424e529543df14ea8336fbb26c6297670232dfa6903
3
+ metadata.gz: 6c9ea6700cdf564c8c6712df6f538251a00ab77d708a1cb6ddbaf1522f7f3c82
4
+ data.tar.gz: c71eb0579b0671fedf08104b51237f260b43ff5d6aa090c98a3ffffde943f31d
5
5
  SHA512:
6
- metadata.gz: a23bf85f720e929a7da5ad87a92c6140ec584346f24a9d2a94db1a0bf82033cd556ec971ec2dfe50346cdb9d248e1b34c0675003c224a6a0ab29185008f4bb92
7
- data.tar.gz: a72a0ad55518d03a44ae9f98cca0f9236369c55e5e2924673597712b0cadbddf9bea7a4424d9248215b32e51366845962469dce775ec7db7a903d6e73790037b
6
+ metadata.gz: dd0cb52f16d6a75545d491388cbde13f99db60cf0c951db73df00ce77dac5fdd09573331b510fcd2e9a2f637c539e754c8fab0838d5709e22fd8abb11128d9ae
7
+ data.tar.gz: b0b4558cf821b84701e42f730eb6699c49a82e3c1e70a6f570d6dd99abbb599f783dded394b94bd7aa96db89d4cd4a23e848480239d4256a5e3f596812ba4e17
@@ -1,3 +1,39 @@
1
+ = 3.6.0.rc1
2
+ - Cleanup: deprecate ActiveScaffold.set_defaults for ActiveScaffold.defaults, rename some setters
3
+ - Fix adding new action links on request with threadsafety enabled
4
+ - Fix iterating in config.columns with threadsafety enabled
5
+ - Fix changing pagination enabled/disabled with threadsafety enabled
6
+ - Allow create action in has_many through singular association
7
+ - Display no options in radio form_ui when no option is available, so column can be refreshed with update_columns
8
+ - Add as_main_div_data to override data attributes on main div
9
+ - Add loading indicator to embedded scaffolds, display error if fails
10
+ - Fix race condition in threadsafe mode with delayed setup
11
+ - Add ActiveScaffold::Config::Core.after_config_callbacks, so custom methods or procs can be added to be called after active_scaffold config block (used by bitfields bridge)
12
+ - Display loading indicator at bottom on auto pagination
13
+ - List rendering speed up
14
+ - Remove font family from CSS, it was preventing from changing it easily in body
15
+ - Fix search for mongoid models in with threadsafety enabled
16
+ - Keep nested params after calling render_field for column in subform
17
+ - Fix nested for controllers without list action (for example, for nested create on singular assocations)
18
+ - Fix delayed setup issues with threads
19
+ - Fix render_field under nested list for polymorphic association
20
+ - Add foreign_type column to constrained columns in nested list for polymorphic association
21
+ - Add return_to to action links on nested list for singular associations, so forms would return to list
22
+ - Case insensitive search with PostGIS adapter
23
+ - Use clear_storage with around_action and ensure, so empty hash is removed from session storage when exception is raised too
24
+ - Delete search from session when search is reset
25
+ - Add cache_column_counts method to get counts with one query for associations which are not preloaded, query per column is overridable with count_query_for_column
26
+ - ActiveStorage support with bridge
27
+ - Add list_row_attributes helper so more HTML attributes can be added to tr.record in list, overriding the helper
28
+ - Support column!=value param for not equal condition (column!= means column is not null)
29
+ - Don't force to use join for column's includes when sorting by method
30
+ - Add support for range conditions in url params for numeric (integer, decimal, float, bigint) columns too
31
+ - Support include_blank option in :radio form_ui
32
+ - Add add_new option for :select form_ui in singular associations, in column.options, it adds link to toggle between select and subform
33
+ - Fix subform crud in subform subgroup, when form is on nested scaffold, when record on first subform is persisted
34
+ - Add association_join_text setting to column, so it can be changed for one column only
35
+ - Use Arel.sql with sorting.clause before passing to reorder method
36
+
1
37
  = 3.6.0.pre
2
38
  - Added threadsafety as tech preview, enabled with ActiveScaffold.threadsafe! in initializer.
3
39
  - Added active_scaffold_config.build_action_columns method to easily create action columns for custom form actions.
@@ -16,6 +52,9 @@
16
52
  - Display flash messages only inside create form, when conf.list.always_show_create is enabled, instead of displaying twice (in form and above list).
17
53
  - Fix default autocomplete value for password form_ui, new-password has to be used because off is ignored by browsers in password fields now
18
54
 
55
+ = 3.5.5
56
+ - Fix creating new records, when using cancan and allowing access based on id (fixes #617)
57
+
19
58
  = 3.5.4
20
59
  - Fix chosen form_ui for plural associations
21
60
  - Eager load with includes in association options query, if includes has a hash with own association key, see #612
@@ -32,7 +32,6 @@
32
32
  require_asset "prototype/active_scaffold"
33
33
  require_asset "prototype/dhtml_history"
34
34
  require_asset "prototype/form_enhancements"
35
- require_asset "prototype/rico_corner"
36
35
  end
37
36
  %>
38
37
  ActiveScaffold.config = <%= ActiveScaffold.js_config.to_json %>;
@@ -323,6 +323,23 @@ jQuery(document).ready(function($) {
323
323
  if (jQuery(this).prop('checked')) color_field.val('');
324
324
  });
325
325
 
326
+ jQuery(document).on('click', '.show-new-subform', function(e) {
327
+ e.preventDefault();
328
+ var $this = jQuery(this), line = $this.closest('.form-element'),
329
+ select = line.find('#' + $this.data('select-id')),
330
+ subform = line.find('#' + $this.data('subform-id'));
331
+ if (select.is(':visible')) {
332
+ select.hide().prop('disabled', true);
333
+ subform.show().find("input:disabled,select:disabled,textarea:disabled").prop('disabled', false);
334
+ $this.data('select-text', $this.html());
335
+ $this.html($this.data('subform-text'));
336
+ } else {
337
+ subform.hide().find("input:enabled,select:enabled,textarea:enabled").prop('disabled', true);
338
+ select.show().prop('disabled', false);
339
+ $this.html($this.data('select-text'));
340
+ }
341
+ });
342
+
326
343
  jQuery(document).on('turbolinks:before-visit', function() {
327
344
  if (history.state.active_scaffold) {
328
345
  history.replaceState({turbolinks: true, url: document.location.href}, '', document.location.href);
@@ -480,6 +497,7 @@ var ActiveScaffold = {
480
497
  ActiveScaffold.auto_paginate(container);
481
498
  ActiveScaffold.draggable_lists('.draggable-lists', container);
482
499
  ActiveScaffold.sliders(container);
500
+ ActiveScaffold.disable_optional_subforms(container);
483
501
  },
484
502
  setup_history_state: function() {
485
503
  var data = {}, current_search_item = jQuery('.active-scaffold .filtered-message[data-search]');
@@ -505,7 +523,9 @@ var ActiveScaffold = {
505
523
  auto_paginate: function(element) {
506
524
  var paginate_link = jQuery('.active-scaffold-pagination.auto-paginate a:first', element);
507
525
  if (paginate_link.length) {
508
- jQuery('.active-scaffold-pagination.auto-paginate', element).hide();
526
+ var pagination = paginate_link.closest('.auto-paginate');
527
+ pagination.find('.as_paginate').hide();
528
+ pagination.find('.loading-indicator').css({visibility: 'visible'});
509
529
  ActiveScaffold.auto_load_page(paginate_link.attr('href'), {auto_pagination: true});
510
530
  }
511
531
  },
@@ -515,6 +535,11 @@ var ActiveScaffold = {
515
535
  enable_js_form_buttons: function(element) {
516
536
  jQuery('.as-js-button', element).show();
517
537
  },
538
+ disable_optional_subforms: function(element) {
539
+ jQuery('.form-element select + .sub-form').each(function() {
540
+ jQuery("input:enabled,select:enabled,textarea:enabled", this).prop('disabled', true);
541
+ });
542
+ },
518
543
  sliders: function(element) {
519
544
  jQuery('.as-slider', element).each(function() {
520
545
  var opts = $(this).data('slider');
@@ -525,8 +550,13 @@ var ActiveScaffold = {
525
550
  load_embedded: function(element) {
526
551
  jQuery('.active-scaffold-component .load-embedded', element).each(function(index, item) {
527
552
  item = jQuery(item);
528
- item.closest('.active-scaffold-component').load(item.attr('href'), function() {
529
- jQuery(this).trigger('as:element_updated');
553
+ var indicator = item.closest('.active-scaffold-component').find('.loading-indicator');
554
+ indicator.css({visibility: 'visible'});
555
+ item.closest('.active-scaffold-component').load(item.attr('href'), function(response, status, xhr) {
556
+ if (status == 'error') {
557
+ indicator.css({visibility: 'hidden'});
558
+ indicator.after($('<p>').html(item.data('error-msg')).addClass("error-message message server-error"));
559
+ } else jQuery(this).trigger('as:element_updated');
530
560
  });
531
561
  });
532
562
  },
@@ -679,7 +709,7 @@ var ActiveScaffold = {
679
709
 
680
710
  disable_form: function(as_form, skip_loading_indicator) {
681
711
  if (typeof(as_form) == 'string') as_form = '#' + as_form;
682
- as_form = jQuery(as_form)
712
+ as_form = jQuery(as_form);
683
713
  var loading_indicator = jQuery('#' + as_form.attr('id').replace(/-form$/, '-loading-indicator'));
684
714
  if (!skip_loading_indicator && loading_indicator) loading_indicator.css('visibility','visible');
685
715
  jQuery('input[type=submit]', as_form).attr('disabled', 'disabled');
@@ -1049,6 +1079,7 @@ var ActiveScaffold = {
1049
1079
  url: url,
1050
1080
  data: params,
1051
1081
  type: 'post',
1082
+ dataType: 'script',
1052
1083
  beforeSend: function(xhr, settings) {
1053
1084
  element.nextAll('img.loading-indicator').css('visibility','visible');
1054
1085
  /* force to blur and save previous last_focus, because disable_form will trigger
@@ -278,7 +278,7 @@ color: $msg_filtered_color;
278
278
  color: $msg_color;
279
279
  }
280
280
 
281
- .active-scaffold .error-message {
281
+ .active-scaffold .error-message, .active-scaffold-component .error-message {
282
282
  border-color: $msg_error_border_color;
283
283
  background-color: $msg_error_bg;
284
284
  }
@@ -58,13 +58,15 @@ position: relative;
58
58
  .active-scaffold-header h2 {
59
59
  padding: 2px 0px;
60
60
  margin: 0;
61
- font: bold 160% arial, sans-serif;
61
+ font-weight: bold;
62
+ font-size: 160%;
62
63
  }
63
64
 
64
65
  .active-scaffold div.actions a,
65
66
  .active-scaffold div.actions {
66
67
  float: right;
67
- font: bold 14px arial;
68
+ font-weight: bold;
69
+ font-size: 14px;
68
70
  letter-spacing: -1px;
69
71
  text-decoration: none;
70
72
  padding: 1px 2px;
@@ -150,7 +152,8 @@ text-align: left;
150
152
  .active-scaffold th a,
151
153
  .active-scaffold th p,
152
154
  .active-scaffold .show-view th {
153
- font: bold 11px arial, sans-serif;
155
+ font-weight: bold;
156
+ font-size: 11px;
154
157
  }
155
158
  .active-scaffold th a,
156
159
  .active-scaffold th p {
@@ -192,7 +195,6 @@ display: none;
192
195
  padding: 5px 4px;
193
196
  }
194
197
  .active-scaffold tr.record td {
195
- font-family: Verdana, sans-serif;
196
198
  font-size: 11px;
197
199
  border: solid 1px;
198
200
  border-width: 0 0 1px 1px;
@@ -251,7 +253,8 @@ padding: 0 2px;
251
253
 
252
254
  .active-scaffold tr.record td.actions a,
253
255
  .active-scaffold tr.record td.actions div {
254
- font: bold 11px verdana, sans-serif;
256
+ font-weight: bold;
257
+ font-size: 11px;
255
258
  letter-spacing: -1px;
256
259
  padding: 2px;
257
260
  margin: 0 2px;
@@ -378,7 +381,8 @@ right: 0px;
378
381
 
379
382
  .active-scaffold .active-scaffold .active-scaffold-header div.actions a,
380
383
  .active-scaffold .active-scaffold .active-scaffold-header div.actions div {
381
- font: bold 11px verdana, sans-serif;
384
+ font-weight: bold;
385
+ font-size: 11px;
382
386
  }
383
387
 
384
388
  .active-scaffold .active-scaffold .view {
@@ -413,13 +417,15 @@ font-size: 11px;
413
417
 
414
418
  .active-scaffold-calculations td {
415
419
  border-top: 2px solid;
416
- font: bold 12px arial, sans-serif;
420
+ font-weight: bold;
421
+ font-size: 12px;
417
422
  }
418
423
 
419
424
  .active-scaffold .active-scaffold-footer {
420
425
  padding: 3px 0px 2px 0px;
421
426
  border-bottom: none;
422
- font: bold 12px arial, sans-serif;
427
+ font-weight: bold;
428
+ font-size: 12px;
423
429
  }
424
430
  .active-scaffold .active-scaffold-footer > br {
425
431
  clear: both;
@@ -430,13 +436,17 @@ float: right;
430
436
  white-space: nowrap;
431
437
  margin-right: 5px;
432
438
  }
439
+ .active-scaffold-footer .active-scaffold-pagination.auto-paginate {
440
+ float: left;
441
+ }
433
442
 
434
443
  .active-scaffold-footer a {
435
444
  text-decoration: none;
436
445
  letter-spacing: 0;
437
446
  padding: 0 2px;
438
447
  margin: 0 -2px;
439
- font: bold 12px arial, sans-serif;
448
+ font-weight: bold;
449
+ font-size: 12px;
440
450
  }
441
451
 
442
452
  .active-scaffold-footer .next {
@@ -467,7 +477,7 @@ text-align: center;
467
477
  position: relative;
468
478
  }
469
479
 
470
- .active-scaffold .message {
480
+ .active-scaffold .message, .active-scaffold-component .message {
471
481
  font-size: 11px;
472
482
  font-weight: bold;
473
483
  padding: 5px 20px 5px 5px;
@@ -493,15 +503,16 @@ position: absolute;
493
503
  right: 10px;
494
504
  top: 4px;
495
505
  padding: 0;
496
- font: bold 11px verdana, sans-serif;
506
+ font-weight: bold;
507
+ font-size: 11px;
497
508
  letter-spacing: -1px;
498
509
  }
499
510
 
500
- .active-scaffold .messages-container .message {
511
+ .active-scaffold .messages-container .message, .active-scaffold-component .message {
501
512
  margin: 0;
502
513
  }
503
514
 
504
- .active-scaffold .error-message {
515
+ .active-scaffold .error-message, .active-scaffold-component .error-message {
505
516
  border-left: solid 5px;
506
517
  }
507
518
 
@@ -529,7 +540,6 @@ padding: 2px 5px;
529
540
  font-size: 11px;
530
541
  margin: 0;
531
542
  letter-spacing: 0;
532
- font-family: Verdana;
533
543
  }
534
544
 
535
545
  .active-scaffold .errorExplanation ul {
@@ -541,12 +551,12 @@ list-style: disc;
541
551
  .active-scaffold .errorExplanation p {
542
552
  font-size: 11px;
543
553
  padding: 2px 5px;
544
- font-family: Verdana;
545
554
  margin: 0;
546
555
  }
547
556
 
548
557
  .active-scaffold .errorExplanation ul li {
549
- font: bold 11px verdana;
558
+ font-weight: bold;
559
+ font-size: 11px;
550
560
  letter-spacing: -1px;
551
561
  margin: 0;
552
562
  padding: 0;
@@ -590,13 +600,15 @@ clear: both;
590
600
  width: 12em;
591
601
  float: left;
592
602
  clear: left;
593
- font: normal 11px verdana, sans-serif;
603
+ font-weight: normal;
604
+ font-size: 11px;
594
605
  line-height: 16px;
595
606
  }
596
607
 
597
608
  .active-scaffold .show-view dd {
598
609
  float: left;
599
- font: bold 14px arial;
610
+ font-weight: bold;
611
+ font-size: 14px;
600
612
  padding-left: 5px;
601
613
  margin-bottom: 5px;
602
614
  }
@@ -611,7 +623,6 @@ margin: 0;
611
623
  .active-scaffold .submit {
612
624
  font-weight: bold;
613
625
  font-size: 14px;
614
- font-family: Arial, sans-serif;
615
626
  letter-spacing: 0;
616
627
  margin: 0;
617
628
  margin-top: 5px;
@@ -631,7 +642,8 @@ padding: 2px;
631
642
  margin: 0;
632
643
  text-transform: none;
633
644
  letter-spacing: -1px;
634
- font: bold 16px arial;
645
+ font-weight: bold;
646
+ font-size: 16px;
635
647
  }
636
648
 
637
649
  .active-scaffold h5 {
@@ -663,7 +675,8 @@ clear: both;
663
675
 
664
676
  .active-scaffold a.as_cancel,
665
677
  .active-scaffold p.form-footer a {
666
- font: bold 14px arial, sans-serif;
678
+ font-weight: bold;
679
+ font-size: 14px;
667
680
  letter-spacing: 0;
668
681
  }
669
682
 
@@ -682,7 +695,8 @@ clear: both;
682
695
  }
683
696
 
684
697
  .active-scaffold label {
685
- font: normal 11px verdana, sans-serif;
698
+ font-weight: normal;
699
+ font-size: 11px;
686
700
  }
687
701
 
688
702
  .active-scaffold li.form-element dt {
@@ -717,12 +731,12 @@ font-weight: bold;
717
731
 
718
732
  .active-scaffold label.example {
719
733
  font-size: 11px;
720
- font-family: arial;
721
734
  }
722
735
 
723
736
  .active-scaffold input.text-input,
724
737
  .active-scaffold select {
725
- font: bold 16px arial;
738
+ font-weight: bold;
739
+ font-size: 16px;
726
740
  letter-spacing: -1px;
727
741
  border: solid 1px;
728
742
  }
@@ -746,7 +760,6 @@ padding: 1px;
746
760
 
747
761
 
748
762
  .active-scaffold textarea {
749
- font-family: Arial, sans-serif;
750
763
  font-size: 12px;
751
764
  padding: 1px;
752
765
  border: solid 1px;
@@ -828,6 +841,12 @@ clear: left;
828
841
  padding: 5px 0;
829
842
  padding-left: 5px;
830
843
  }
844
+ .active-scaffold .form-element select + .sub-form {
845
+ float: none;
846
+ }
847
+ .active-scaffold .form-element .show-new-subform {
848
+ margin-left: 5px;
849
+ }
831
850
 
832
851
  .active-scaffold .sub-form h5 {
833
852
  margin-left: -5px;
@@ -840,7 +859,8 @@ background: none;
840
859
  }
841
860
 
842
861
  .active-scaffold .sub-form table th {
843
- font: normal 10px verdana, sans-serif;
862
+ font-weight: normal;
863
+ font-size: 10px;
844
864
  padding: 0 5px 0 1px;
845
865
  background: none;
846
866
  }
@@ -891,13 +911,15 @@ display: none;
891
911
  }
892
912
 
893
913
  .active-scaffold .sub-form .association-record a {
894
- font: bold 12px arial;
914
+ font-weight: bold;
915
+ font-size: 12px;
895
916
  }
896
917
 
897
918
  .active-scaffold .sub-form input.text-input,
898
919
  .active-scaffold .sub-form select {
899
920
  letter-spacing: 0;
900
- font: bold 12px arial;
921
+ font-weight: bold;
922
+ font-size: 12px;
901
923
  }
902
924
 
903
925
  .active-scaffold .sub-form .footer-wrapper {
@@ -983,7 +1005,8 @@ padding: 4px 0px;
983
1005
 
984
1006
  .as_touch .active-scaffold div.actions a,
985
1007
  .as_touch .active-scaffold div.actions div {
986
- font: bold 14px arial;
1008
+ font-weight: bold;
1009
+ font-size: 14px;
987
1010
  }
988
1011
 
989
1012
  .as_touch .active-scaffold div.actions {
@@ -1,8 +1,6 @@
1
- <% action_links = active_scaffold_config.action_links.collection
2
- unless action_links.empty? -%>
3
- <div class="actions">
4
- <%= display_action_links(action_links, nil, :skip_unauthorized => true) %>
5
- <%= loading_indicator_tag(:action => :table) %>
6
- </div>
7
- <% end %>
1
+ <% action_links = active_scaffold_config.action_links.collection -%>
2
+ <div class="actions">
3
+ <%= display_action_links(action_links, nil, :skip_unauthorized => true) unless action_links.empty? %>
4
+ <%= loading_indicator_tag(:action => :table) %>
5
+ </div>
8
6
  <h2><%= active_scaffold_config.list.user.label %></h2>
@@ -6,14 +6,13 @@ tr_class = "#{cycle("", "even-record")} #{list_row_class(record)}"
6
6
  action_links ||= active_scaffold_config.action_links.member
7
7
  data_refresh ||= record.to_param
8
8
  -%>
9
- <tr class="record <%= tr_class %>" id="<%= row_id %>" data-refresh="<%= data_refresh %>">
9
+ <%= content_tag :tr, list_row_attributes(tr_class, row_id, data_refresh) do %>
10
10
  <% columns.each do |column| %>
11
11
  <% authorized = record.authorized_for?(:crud_type => :read, :column => column.name) -%>
12
12
  <% column_value = authorized ? get_column_value(record, column) : empty_field_text -%>
13
+ <% attrs = column_attributes(column, record).merge(:class => column_class(column, column_value, record)) %>
13
14
 
14
- <%= content_tag :td, column_attributes(column, record).merge(:class => column_class(column, column_value, record)) do %>
15
- <%= authorized ? render_list_column(column_value, column, record) : column_value %>
16
- <% end %>
15
+ <%= content_tag :td, authorized ? render_list_column(column_value, column, record) : column_value, attrs %>
17
16
  <% end -%>
18
17
 
19
18
  <% unless grouped_search? -%>
@@ -26,4 +25,4 @@ data_refresh ||= record.to_param
26
25
  </tr>
27
26
  </table></td>
28
27
  <% end -%>
29
- </tr>
28
+ <% end %>