active_scaffold 3.7.12 → 4.0.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.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +9 -23
- data/README.md +3 -2
- data/app/assets/config/active_scaffold_manifest.js +3 -0
- data/app/assets/javascripts/active_scaffold.js.erb +24 -34
- data/app/assets/javascripts/jquery/active_scaffold.js +41 -58
- data/app/assets/javascripts/jquery/date_picker_bridge.js.erb +1 -1
- data/app/assets/stylesheets/active_scaffold_colors.scss +0 -7
- data/app/assets/stylesheets/active_scaffold_extensions.css.erb +2 -2
- data/app/assets/stylesheets/active_scaffold_jquery_ui.css.erb +7 -7
- data/app/assets/stylesheets/active_scaffold_layout.css +57 -30
- data/app/views/active_scaffold_overrides/_add_existing_form.html.erb +10 -10
- data/app/views/active_scaffold_overrides/_base_form.html.erb +21 -21
- data/app/views/active_scaffold_overrides/_create_form.html.erb +10 -7
- data/app/views/active_scaffold_overrides/_create_form_on_list.html.erb +5 -5
- data/app/views/active_scaffold_overrides/_field_search.html.erb +6 -6
- data/app/views/active_scaffold_overrides/_form.html.erb +11 -14
- data/app/views/active_scaffold_overrides/_form_association.html.erb +21 -12
- data/app/views/active_scaffold_overrides/_form_association_footer.html.erb +19 -10
- data/app/views/active_scaffold_overrides/_form_association_record.html.erb +15 -21
- data/app/views/active_scaffold_overrides/_form_messages.html.erb +2 -2
- data/app/views/active_scaffold_overrides/_horizontal_subform.html.erb +7 -6
- data/app/views/active_scaffold_overrides/_human_conditions.html.erb +2 -2
- data/app/views/active_scaffold_overrides/_list.html.erb +15 -8
- data/app/views/active_scaffold_overrides/_list_calculations.html.erb +2 -3
- data/app/views/active_scaffold_overrides/_list_header.html.erb +2 -2
- data/app/views/active_scaffold_overrides/_list_inline_adapter.html.erb +5 -5
- data/app/views/active_scaffold_overrides/_list_messages.html.erb +12 -3
- data/app/views/active_scaffold_overrides/_list_pagination.html.erb +3 -3
- data/app/views/active_scaffold_overrides/_list_pagination_links.html.erb +4 -4
- data/app/views/active_scaffold_overrides/_list_record.html.erb +6 -6
- data/app/views/active_scaffold_overrides/_list_with_header.html.erb +4 -4
- data/app/views/active_scaffold_overrides/_messages.html.erb +1 -1
- data/app/views/active_scaffold_overrides/_refresh_list.js.erb +2 -2
- data/app/views/active_scaffold_overrides/_render_field.js.erb +4 -4
- data/app/views/active_scaffold_overrides/_row.html.erb +1 -1
- data/app/views/active_scaffold_overrides/_search.html.erb +6 -5
- data/app/views/active_scaffold_overrides/_show.html.erb +3 -3
- data/app/views/active_scaffold_overrides/_show_actions.html.erb +1 -1
- data/app/views/active_scaffold_overrides/_show_association.html.erb +1 -1
- data/app/views/active_scaffold_overrides/_show_association_horizontal.html.erb +1 -1
- data/app/views/active_scaffold_overrides/_show_association_vertical.html.erb +1 -1
- data/app/views/active_scaffold_overrides/_show_columns.html.erb +1 -1
- data/app/views/active_scaffold_overrides/_show_horizontal_record.html.erb +1 -1
- data/app/views/active_scaffold_overrides/_update_actions.html.erb +1 -1
- data/app/views/active_scaffold_overrides/_update_calculations.js.erb +2 -2
- data/app/views/active_scaffold_overrides/_update_column.js.erb +8 -7
- data/app/views/active_scaffold_overrides/_update_form.html.erb +5 -5
- data/app/views/active_scaffold_overrides/_update_messages.js.erb +1 -1
- data/app/views/active_scaffold_overrides/_vertical_subform.html.erb +4 -3
- data/app/views/active_scaffold_overrides/action_confirmation.html.erb +3 -3
- data/app/views/active_scaffold_overrides/add_existing.js.erb +6 -6
- data/app/views/active_scaffold_overrides/add_existing_form.html.erb +1 -1
- data/app/views/active_scaffold_overrides/add_tab.js.erb +15 -0
- data/app/views/active_scaffold_overrides/create.html.erb +1 -1
- data/app/views/active_scaffold_overrides/delete.html.erb +4 -4
- data/app/views/active_scaffold_overrides/destroy.js.erb +15 -13
- data/app/views/active_scaffold_overrides/edit_associated.js.erb +3 -3
- data/app/views/active_scaffold_overrides/field_search.html.erb +1 -1
- data/app/views/active_scaffold_overrides/form_messages.js.erb +1 -1
- data/app/views/active_scaffold_overrides/list.html.erb +1 -1
- data/app/views/active_scaffold_overrides/on_action_update.js.erb +13 -8
- data/app/views/active_scaffold_overrides/on_create.js.erb +34 -6
- data/app/views/active_scaffold_overrides/on_mark.js.erb +3 -3
- data/app/views/active_scaffold_overrides/on_update.js.erb +9 -9
- data/app/views/active_scaffold_overrides/render_field.js.erb +1 -1
- data/app/views/active_scaffold_overrides/render_field_inplace.html.erb +1 -1
- data/app/views/active_scaffold_overrides/row.js.erb +2 -2
- data/app/views/active_scaffold_overrides/search.html.erb +1 -1
- data/app/views/active_scaffold_overrides/show.html.erb +3 -3
- data/app/views/active_scaffold_overrides/update.html.erb +2 -2
- data/app/views/active_scaffold_overrides/update_column.js.erb +4 -4
- data/app/views/active_scaffold_overrides/update_row.js.erb +1 -1
- data/lib/active_scaffold/actions/common_search.rb +5 -3
- data/lib/active_scaffold/actions/core.rb +57 -32
- data/lib/active_scaffold/actions/create.rb +19 -17
- data/lib/active_scaffold/actions/delete.rb +10 -12
- data/lib/active_scaffold/actions/field_search.rb +28 -13
- data/lib/active_scaffold/actions/list.rb +34 -34
- data/lib/active_scaffold/actions/mark.rb +5 -5
- data/lib/active_scaffold/actions/nested.rb +64 -56
- data/lib/active_scaffold/actions/search.rb +2 -2
- data/lib/active_scaffold/actions/show.rb +5 -5
- data/lib/active_scaffold/actions/subform.rb +15 -4
- data/lib/active_scaffold/actions/update.rb +20 -20
- data/lib/active_scaffold/active_record_permissions.rb +4 -3
- data/lib/active_scaffold/attribute_params.rb +51 -50
- data/lib/active_scaffold/bridges/active_storage/active_storage_bridge.rb +4 -4
- data/lib/active_scaffold/bridges/active_storage/active_storage_helpers.rb +6 -2
- data/lib/active_scaffold/bridges/active_storage.rb +1 -1
- data/lib/active_scaffold/bridges/ancestry/ancestry_bridge.rb +3 -3
- data/lib/active_scaffold/bridges/bitfields/bitfields_bridge.rb +4 -1
- data/lib/active_scaffold/bridges/bitfields.rb +1 -1
- data/lib/active_scaffold/bridges/cancan/cancan_bridge.rb +9 -8
- data/lib/active_scaffold/bridges/cancan.rb +8 -8
- data/lib/active_scaffold/bridges/carrierwave/form_ui.rb +1 -1
- data/lib/active_scaffold/bridges/carrierwave/list_ui.rb +4 -3
- data/lib/active_scaffold/bridges/carrierwave.rb +2 -2
- data/lib/active_scaffold/bridges/chosen.rb +1 -5
- data/lib/active_scaffold/bridges/country_select/country_select_bridge_helper.rb +4 -2
- data/lib/active_scaffold/bridges/date_picker/ext.rb +20 -12
- data/lib/active_scaffold/bridges/date_picker/helper.rb +37 -33
- data/lib/active_scaffold/bridges/date_picker.rb +1 -4
- data/lib/active_scaffold/bridges/dragonfly/dragonfly_bridge.rb +1 -1
- data/lib/active_scaffold/bridges/dragonfly/list_ui.rb +3 -2
- data/lib/active_scaffold/bridges/dragonfly.rb +1 -1
- data/lib/active_scaffold/bridges/file_column/as_file_column_bridge.rb +3 -2
- data/lib/active_scaffold/bridges/file_column/file_column_helpers.rb +2 -1
- data/lib/active_scaffold/bridges/file_column/form_ui.rb +4 -9
- data/lib/active_scaffold/bridges/file_column/list_ui.rb +6 -3
- data/lib/active_scaffold/bridges/file_column/test/functional/file_column_keep_test.rb +3 -3
- data/lib/active_scaffold/bridges/file_column/test/mock_model.rb +1 -4
- data/lib/active_scaffold/bridges/file_column.rb +1 -0
- data/lib/active_scaffold/bridges/paper_trail/actions.rb +4 -2
- data/lib/active_scaffold/bridges/paper_trail/config.rb +1 -1
- data/lib/active_scaffold/bridges/paper_trail/helper.rb +1 -1
- data/lib/active_scaffold/bridges/paper_trail/paper_trail_bridge.rb +2 -1
- data/lib/active_scaffold/bridges/paperclip/list_ui.rb +3 -2
- data/lib/active_scaffold/bridges/paperclip/paperclip_bridge.rb +1 -1
- data/lib/active_scaffold/bridges/paperclip/paperclip_bridge_helpers.rb +10 -9
- data/lib/active_scaffold/bridges/paperclip.rb +2 -1
- data/lib/active_scaffold/bridges/record_select/helpers.rb +10 -11
- data/lib/active_scaffold/bridges/semantic_attributes/column.rb +3 -1
- data/lib/active_scaffold/bridges/tiny_mce/helpers.rb +3 -7
- data/lib/active_scaffold/bridges/tiny_mce.rb +2 -7
- data/lib/active_scaffold/bridges/usa_state_select/usa_state_select_helper.rb +7 -7
- data/lib/active_scaffold/bridges.rb +7 -5
- data/lib/active_scaffold/config/base.rb +20 -24
- data/lib/active_scaffold/config/core.rb +27 -39
- data/lib/active_scaffold/config/create.rb +1 -1
- data/lib/active_scaffold/config/delete.rb +9 -9
- data/lib/active_scaffold/config/field_search.rb +4 -9
- data/lib/active_scaffold/config/form.rb +3 -1
- data/lib/active_scaffold/config/list.rb +19 -15
- data/lib/active_scaffold/config/nested.rb +2 -2
- data/lib/active_scaffold/config/search.rb +5 -5
- data/lib/active_scaffold/config/show.rb +1 -1
- data/lib/active_scaffold/config/subform.rb +1 -1
- data/lib/active_scaffold/config/update.rb +4 -5
- data/lib/active_scaffold/configurable.rb +2 -1
- data/lib/active_scaffold/constraints.rb +16 -11
- data/lib/active_scaffold/core.rb +25 -27
- data/lib/active_scaffold/data_structures/action_columns.rb +10 -3
- data/lib/active_scaffold/data_structures/action_link.rb +19 -9
- data/lib/active_scaffold/data_structures/action_links.rb +20 -26
- data/lib/active_scaffold/data_structures/actions.rb +3 -3
- data/lib/active_scaffold/data_structures/association/abstract.rb +8 -4
- data/lib/active_scaffold/data_structures/association/active_mongoid.rb +1 -0
- data/lib/active_scaffold/data_structures/association/active_record.rb +1 -4
- data/lib/active_scaffold/data_structures/column.rb +368 -327
- data/lib/active_scaffold/data_structures/columns.rb +3 -2
- data/lib/active_scaffold/data_structures/nested_info.rb +6 -5
- data/lib/active_scaffold/data_structures/proxy_column.rb +68 -0
- data/lib/active_scaffold/data_structures/set.rb +7 -4
- data/lib/active_scaffold/data_structures/sorting.rb +21 -12
- data/lib/active_scaffold/engine.rb +12 -12
- data/lib/active_scaffold/extensions/action_controller_rendering.rb +5 -5
- data/lib/active_scaffold/extensions/action_controller_rescueing.rb +1 -1
- data/lib/active_scaffold/extensions/action_view_rendering.rb +29 -31
- data/lib/active_scaffold/extensions/ice_nine.rb +2 -1
- data/lib/active_scaffold/extensions/localize.rb +2 -2
- data/lib/active_scaffold/extensions/name_option_for_datetime.rb +1 -1
- data/lib/active_scaffold/extensions/routing_mapper.rb +5 -4
- data/lib/active_scaffold/extensions/unsaved_associated.rb +3 -2
- data/lib/active_scaffold/finder.rb +71 -78
- data/lib/active_scaffold/helpers/action_link_helpers.rb +37 -49
- data/lib/active_scaffold/helpers/association_helpers.rb +3 -2
- data/lib/active_scaffold/helpers/controller_helpers.rb +18 -16
- data/lib/active_scaffold/helpers/form_column_helpers.rb +69 -53
- data/lib/active_scaffold/helpers/human_condition_helpers.rb +17 -15
- data/lib/active_scaffold/helpers/id_helpers.rb +5 -5
- data/lib/active_scaffold/helpers/list_column_helpers.rb +35 -38
- data/lib/active_scaffold/helpers/pagination_helpers.rb +4 -4
- data/lib/active_scaffold/helpers/search_column_helpers.rb +25 -34
- data/lib/active_scaffold/helpers/show_column_helpers.rb +7 -4
- data/lib/active_scaffold/helpers/tabs_helpers.rb +88 -0
- data/lib/active_scaffold/helpers/view_helpers.rb +15 -13
- data/lib/active_scaffold/marked_model.rb +1 -2
- data/lib/active_scaffold/orm_checks.rb +6 -4
- data/lib/active_scaffold/paginator.rb +3 -2
- data/lib/active_scaffold/registry.rb +5 -0
- data/lib/active_scaffold/tableless.rb +24 -14
- data/lib/active_scaffold/version.rb +4 -4
- data/lib/active_scaffold.rb +8 -34
- data/lib/generators/active_scaffold/controller_generator.rb +20 -20
- data/lib/generators/active_scaffold/install_generator.rb +4 -8
- data/lib/generators/active_scaffold/resource_generator.rb +31 -31
- data/lib/tasks/brakeman.rake +1 -1
- data/shoulda_macros/macros.rb +14 -14
- metadata +11 -232
- data/app/assets/javascripts/prototype/active_scaffold.js +0 -1249
- data/app/assets/javascripts/prototype/active_scaffold_chosen.js +0 -0
- data/app/assets/javascripts/prototype/dhtml_history.js +0 -870
- data/app/assets/javascripts/prototype/form_enhancements.js +0 -117
- data/app/assets/javascripts/prototype/tiny_mce_bridge.js +0 -17
- data/app/views/active_scaffold_overrides/_list_messages_content.html.erb +0 -8
- data/app/views/active_scaffold_overrides/_new_record.js.erb +0 -15
- data/app/views/active_scaffold_overrides/_popup_adapter.html.erb +0 -20
- data/app/views/active_scaffold_overrides/_refresh_create_form.js.erb +0 -12
- data/lib/active_scaffold/bridges/calendar_date_select/as_cds_bridge.rb +0 -58
- data/lib/active_scaffold/bridges/calendar_date_select.rb +0 -17
- data/lib/active_scaffold/data_structures/action_link_separator.rb +0 -13
- data/lib/active_scaffold/extensions/cow_proxy.rb +0 -102
- data/test/active_scaffold_config_mock.rb +0 -33
- data/test/bridges/bridge_test.rb +0 -88
- data/test/bridges/date_picker_test.rb +0 -31
- data/test/bridges/paper_trail_test.rb +0 -16
- data/test/bridges/paperclip_test.rb +0 -85
- data/test/bridges/tiny_mce_test.rb +0 -61
- data/test/class_with_finder.rb +0 -42
- data/test/company.rb +0 -97
- data/test/config/base_test.rb +0 -17
- data/test/config/core_test.rb +0 -66
- data/test/config/create_test.rb +0 -72
- data/test/config/delete_test.rb +0 -35
- data/test/config/field_search_test.rb +0 -49
- data/test/config/list_test.rb +0 -134
- data/test/config/nested_test.rb +0 -55
- data/test/config/search_test.rb +0 -62
- data/test/config/show_test.rb +0 -45
- data/test/config/subform_test.rb +0 -19
- data/test/config/update_test.rb +0 -52
- data/test/const_mocker.rb +0 -32
- data/test/data_structures/action_columns_test.rb +0 -112
- data/test/data_structures/action_link_test.rb +0 -79
- data/test/data_structures/action_links_test.rb +0 -78
- data/test/data_structures/actions_test.rb +0 -25
- data/test/data_structures/association_column_test.rb +0 -41
- data/test/data_structures/column_test.rb +0 -186
- data/test/data_structures/columns_test.rb +0 -68
- data/test/data_structures/set_test.rb +0 -84
- data/test/data_structures/sorting_test.rb +0 -148
- data/test/data_structures/standard_column_test.rb +0 -23
- data/test/data_structures/validation_reflection_test.rb +0 -69
- data/test/data_structures/virtual_column_test.rb +0 -23
- data/test/extensions/action_view_rendering_test.rb +0 -20
- data/test/extensions/active_record_test.rb +0 -44
- data/test/extensions/routing_mapper_test.rb +0 -73
- data/test/helpers/form_column_helpers_test.rb +0 -34
- data/test/helpers/list_column_helpers_test.rb +0 -53
- data/test/helpers/pagination_helpers_test.rb +0 -65
- data/test/helpers/search_column_helpers_test.rb +0 -15
- data/test/misc/active_record_permissions_test.rb +0 -193
- data/test/misc/attribute_params_test.rb +0 -460
- data/test/misc/calculation_test.rb +0 -39
- data/test/misc/configurable_test.rb +0 -97
- data/test/misc/constraints_test.rb +0 -209
- data/test/misc/convert_numbers_format_test.rb +0 -171
- data/test/misc/finder_test.rb +0 -124
- data/test/misc/lang_test.rb +0 -10
- data/test/misc/parse_datetime_test.rb +0 -159
- data/test/misc/render_test.rb +0 -9
- data/test/misc/tableless_test.rb +0 -56
- data/test/mock_app/.gitignore +0 -2
- data/test/mock_app/Rakefile +0 -7
- data/test/mock_app/app/assets/config/manifest.js +0 -0
- data/test/mock_app/app/controllers/addresses_controller.rb +0 -4
- data/test/mock_app/app/controllers/application_controller.rb +0 -10
- data/test/mock_app/app/controllers/buildings_controller.rb +0 -4
- data/test/mock_app/app/controllers/cars_controller.rb +0 -5
- data/test/mock_app/app/controllers/contacts_controller.rb +0 -4
- data/test/mock_app/app/controllers/floors_controller.rb +0 -6
- data/test/mock_app/app/controllers/people_controller.rb +0 -8
- data/test/mock_app/app/controllers/roles_controller.rb +0 -4
- data/test/mock_app/app/helpers/application_helper.rb +0 -3
- data/test/mock_app/app/models/address.rb +0 -3
- data/test/mock_app/app/models/building.rb +0 -9
- data/test/mock_app/app/models/car.rb +0 -3
- data/test/mock_app/app/models/contact.rb +0 -3
- data/test/mock_app/app/models/file_model.rb +0 -31
- data/test/mock_app/app/models/floor.rb +0 -8
- data/test/mock_app/app/models/person.rb +0 -12
- data/test/mock_app/app/models/role.rb +0 -3
- data/test/mock_app/app/views/active_scaffold_overrides/_form.html.erb +0 -2
- data/test/mock_app/app/views/active_scaffold_overrides/list.html.erb +0 -2
- data/test/mock_app/app/views/people/_first_name_form_column.html.erb +0 -2
- data/test/mock_app/app/views/people/_form.html.erb +0 -2
- data/test/mock_app/app/views/people/list.html.erb +0 -2
- data/test/mock_app/config/application.rb +0 -14
- data/test/mock_app/config/boot.rb +0 -7
- data/test/mock_app/config/database.yml +0 -16
- data/test/mock_app/config/environment.rb +0 -6
- data/test/mock_app/config/environments/development.rb +0 -24
- data/test/mock_app/config/environments/production.rb +0 -49
- data/test/mock_app/config/environments/test.rb +0 -34
- data/test/mock_app/config/initializers/backtrace_silencers.rb +0 -7
- data/test/mock_app/config/initializers/inflections.rb +0 -10
- data/test/mock_app/config/initializers/mime_types.rb +0 -5
- data/test/mock_app/config/initializers/secret_token.rb +0 -11
- data/test/mock_app/config/initializers/session_store.rb +0 -8
- data/test/mock_app/config/initializers/wrap_parameters.rb +0 -14
- data/test/mock_app/config/locales/en.yml +0 -5
- data/test/mock_app/config/routes.rb +0 -17
- data/test/mock_app/config.ru +0 -4
- data/test/mock_app/db/schema.rb +0 -68
- data/test/mock_app/db/test.sqlite3 +0 -1
- data/test/model_stub.rb +0 -64
- data/test/performance/list_cars_performance_test.rb +0 -34
- data/test/performance/list_people_performance_test.rb +0 -31
- data/test/performance_test_help.rb +0 -3
- data/test/run_all.rb +0 -6
- data/test/test_helper.rb +0 -71
- data/vendor/assets/javascripts/getprototypeof.js +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ecbb34d72c3f80ed59d3e2375baf713458478c1721a7cbbd869fc9f07969b3b
|
4
|
+
data.tar.gz: 5608a6c738c0c00906b693948666324ed69e3de0edd4484d46a74c9974dabe6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2197a3ce4b166d648d48afb8530f6bc9d34e3acc64b3a2eb05e09242888093d7298920dcd8ca890bb8c936495e0a743b5d4fc9bd0ccef263a4e02fe331aea770
|
7
|
+
data.tar.gz: 375ce3cda4d6d08ee694b7ccb529a02ddde1e4982e641f15eea47e283e38b435c95a93a48e075174c7cf13d9ac805935e9e270d54909c34e95d5a7c6bdccf50a
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,26 +1,12 @@
|
|
1
|
-
|
2
|
-
- Fix
|
3
|
-
-
|
4
|
-
|
5
|
-
|
6
|
-
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
- Support selector for records body in create_record_row JS method, better support replacing list view with other way to render records
|
11
|
-
- Improve detection of member action links when list view is replaced with other structure, based on 'record' html class, instead of tags
|
12
|
-
- Support :table position for member action links, replacing the whole table
|
13
|
-
- Support changing the view partial used to render a record, default to 'list_record', better support refreshing a record when list view is replaced with other way to render records
|
14
|
-
- Support separators in action links
|
15
|
-
- Support :popup position, using jquery-ui dialog, but can be replaced with other library overriding ActiveScaffold.open_popup and ActiveScaffold.close_popup JS functions
|
16
|
-
- Use column.label in human conditions, same as form
|
17
|
-
- Don't overlap 'click to reset' with long human conditions message
|
18
|
-
|
19
|
-
= 3.7.10
|
20
|
-
- Move code from on_create.js.erb to partials, so it's easier to change parts, e.g. how new record is rendered
|
21
|
-
- Don't reload after deleting last record if pagination is disabled
|
22
|
-
|
23
|
-
= 3.7.9
|
1
|
+
- Add tabbed_by to group of columns in forms. The columns in the group must be collection associations, with a common column or association, used to partition them in different tabs.
|
2
|
+
- Fix tableless in rails >= 7.1
|
3
|
+
- Stop using cow_proxy for thread safety:
|
4
|
+
- Added ProxyColumn and require using active_scaffold_config.columns.override(:column_name) to change a column per request
|
5
|
+
- Action links can't be changed, added or removed, add all links and use ignore_method to control when they are displayed
|
6
|
+
- Require using active_scaffold_config.override_columns to exclude or add columns
|
7
|
+
- Thread safety enabled by default, can't be disabled, deprecate ActiveScaffold.threadsafe!
|
8
|
+
|
9
|
+
= 3.7.9 (not released yet)
|
24
10
|
- Add css_class to action links, to avoid changing name, it may result confusing, deprecate name setter.
|
25
11
|
- Add buttons to check all and uncheck all on :select form ui for collection associations, and draggable lists (active_scaffold_checkbox_list).
|
26
12
|
- Add hidden field with locking column in base_form partial for persisted records automatically, if model uses optimistic locking.
|
data/README.md
CHANGED
@@ -8,14 +8,15 @@ Overview
|
|
8
8
|
[](https://inch-ci.org/github/activescaffold/active_scaffold)
|
9
9
|
[](https://opensource.org/licenses/MIT)
|
10
10
|
|
11
|
-
ActiveScaffold provides a quick and powerful user interfaces for CRUD (create, read, update, delete) operations for Rails applications. It offers additonal features including searching, pagination & layout control. Rails >=
|
11
|
+
ActiveScaffold provides a quick and powerful user interfaces for CRUD (create, read, update, delete) operations for Rails applications. It offers additonal features including searching, pagination & layout control. Rails >= 6.1.0 is supported, ruby >= 3.0 required.
|
12
12
|
|
13
13
|
Branch Details
|
14
14
|
--------------
|
15
|
+
master supports rails >= 6.1.x and <= 7.2.x, and ruby >= 3.0.0
|
15
16
|
3-7-stable supports rails >= 5.2.x and <= 7.1.x, and ruby >= 2.5.0
|
16
17
|
|
17
18
|
These versions are not supported anymore:
|
18
|
-
3-6-stable supports rails >= 4.2.x and <= 6.1.x, and ruby >= 2.3.0
|
19
|
+
3-6-stable supports rails >= 4.2.x and <= 6.1.x, and ruby >= 2.3.0
|
19
20
|
3-5-stable supports rails >= 4.0.x and <= 5.1.x, and ruby >= 2.0.0
|
20
21
|
3-4-stable supports rails >= 3.2.x and <= 4.2.x, and ruby >= 1.9.3
|
21
22
|
3-3-stable supports rails 3.2.x and ruby >= 1.8
|
@@ -1,41 +1,31 @@
|
|
1
1
|
<%
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}draggable"
|
17
|
-
require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}droppable"
|
18
|
-
require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}datepicker"
|
19
|
-
end
|
2
|
+
require_asset 'jquery.ba-throttle-debounce'
|
3
|
+
if Object.const_defined?(:Jquery)
|
4
|
+
if Jquery.const_defined?(:Rails) && Jquery::Rails.const_defined?(:JQUERY_UI_VERSION)
|
5
|
+
require_asset 'jquery-ui'
|
6
|
+
elsif Jquery.const_defined? :Ui
|
7
|
+
jquery_ui_prefix = Jquery::Ui::Rails::VERSION < '5.0.0' ? 'jquery.ui.' : 'jquery-ui/'
|
8
|
+
jquery_ui_widgets_prefix = Jquery::Ui::Rails::VERSION >= '6.0.0' ? 'widgets/' : ''
|
9
|
+
require_asset "#{jquery_ui_prefix}core"
|
10
|
+
require_asset "#{jquery_ui_prefix}effect"
|
11
|
+
require_asset "#{jquery_ui_prefix}effects/effect-highlight" if Jquery::Ui::Rails::VERSION >= '6.0.0'
|
12
|
+
require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}sortable"
|
13
|
+
require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}draggable"
|
14
|
+
require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}droppable"
|
15
|
+
require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}datepicker"
|
20
16
|
end
|
21
|
-
if ActiveScaffold.jquery_ui_included?
|
22
|
-
require_asset "jquery-ui-timepicker-addon"
|
23
|
-
require_asset "jquery/date_picker_bridge"
|
24
|
-
require_asset "jquery/draggable_lists"
|
25
|
-
end
|
26
|
-
require_asset "jquery.visible.min"
|
27
|
-
require_asset "jquery/active_scaffold"
|
28
|
-
require_asset "jquery/jquery.editinplace"
|
29
|
-
when :prototype
|
30
|
-
require_asset "effects"
|
31
|
-
require_asset "controls"
|
32
|
-
require_asset "prototype/active_scaffold"
|
33
|
-
require_asset "prototype/dhtml_history"
|
34
|
-
require_asset "prototype/form_enhancements"
|
35
17
|
end
|
18
|
+
if ActiveScaffold.jquery_ui_included?
|
19
|
+
require_asset 'jquery-ui-timepicker-addon'
|
20
|
+
require_asset 'jquery/date_picker_bridge'
|
21
|
+
require_asset 'jquery/draggable_lists'
|
22
|
+
end
|
23
|
+
require_asset 'jquery.visible.min'
|
24
|
+
require_asset 'jquery/active_scaffold'
|
25
|
+
require_asset 'jquery/jquery.editinplace'
|
36
26
|
%>
|
37
27
|
ActiveScaffold.config = <%= ActiveScaffold.js_config.to_json %>;
|
38
28
|
<%
|
39
|
-
ActiveScaffold.javascripts.each {|js| require_asset js}
|
40
|
-
ActiveScaffold::Bridges.all_javascripts.each {|js| require_asset js}
|
29
|
+
ActiveScaffold.javascripts.each { |js| require_asset js }
|
30
|
+
ActiveScaffold::Bridges.all_javascripts.each { |js| require_asset js }
|
41
31
|
%>
|
@@ -390,6 +390,16 @@
|
|
390
390
|
form.find('select.as_search_date_time_option').val('BETWEEN');
|
391
391
|
});
|
392
392
|
|
393
|
+
jQuery(document).on('click', '.active-scaffold .tabbed .nav-tabs a', function(e) {
|
394
|
+
if (typeof $().tab == 'function') return; // bootstrap tab plugin is loaded and will handle tabs
|
395
|
+
e.preventDefault();
|
396
|
+
var tab_ctrl = jQuery(this), tabbed = tab_ctrl.closest('.tabbed')
|
397
|
+
tabbed.find('.nav-tabs .active').removeClass('active');
|
398
|
+
tabbed.find('.tab-content .active').removeClass('in active');
|
399
|
+
tab_ctrl.closest('li').addClass('active');
|
400
|
+
jQuery(tab_ctrl.attr('href')).addClass('in active');
|
401
|
+
});
|
402
|
+
|
393
403
|
jQuery(document).on('turbolinks:before-visit turbo:before-visit', function() {
|
394
404
|
if (history.state.active_scaffold) {
|
395
405
|
history.replaceState({turbolinks: true, url: document.location.href}, '', document.location.href);
|
@@ -637,11 +647,6 @@
|
|
637
647
|
jQuery(tbody).parent().find('tbody.messages p.empty-message').hide();
|
638
648
|
}
|
639
649
|
},
|
640
|
-
show_empty_message: function(tbody) {
|
641
|
-
if (this.records_for(tbody).length != 0) {
|
642
|
-
jQuery(tbody).parent().find('tbody.messages p.empty-message').hide();
|
643
|
-
}
|
644
|
-
},
|
645
650
|
reload_if_empty: function(tbody, url) {
|
646
651
|
if (this.records_for(tbody).length == 0) {
|
647
652
|
this.reload(url);
|
@@ -790,7 +795,7 @@
|
|
790
795
|
|
791
796
|
create_record_row: function(active_scaffold_id, html, options) {
|
792
797
|
if (typeof(active_scaffold_id) == 'string') active_scaffold_id = '#' + active_scaffold_id;
|
793
|
-
var tbody = jQuery(active_scaffold_id).find(
|
798
|
+
var tbody = jQuery(active_scaffold_id).find('tbody.records').first(), new_row;
|
794
799
|
|
795
800
|
if (options.insert_at == 'top') {
|
796
801
|
tbody.prepend(html);
|
@@ -830,10 +835,10 @@
|
|
830
835
|
});
|
831
836
|
},
|
832
837
|
|
833
|
-
delete_record_row: function(row, page_reload_url
|
838
|
+
delete_record_row: function(row, page_reload_url) {
|
834
839
|
if (typeof(row) == 'string') row = '#' + row;
|
835
840
|
row = jQuery(row);
|
836
|
-
var tbody = row.closest(
|
841
|
+
var tbody = row.closest('tbody.records');
|
837
842
|
|
838
843
|
row.find('a.disabled').each(function() {;
|
839
844
|
var action_link = ActiveScaffold.ActionLink.get(this);
|
@@ -844,7 +849,6 @@
|
|
844
849
|
ActiveScaffold.stripe(tbody);
|
845
850
|
ActiveScaffold.decrement_record_count(tbody.closest('div.active-scaffold'));
|
846
851
|
if (page_reload_url) ActiveScaffold.reload_if_empty(tbody, page_reload_url);
|
847
|
-
else ActiveScaffold.show_empty_message(tbody);
|
848
852
|
});
|
849
853
|
},
|
850
854
|
|
@@ -1219,21 +1223,8 @@
|
|
1219
1223
|
$footer.removeClass('floating');
|
1220
1224
|
if ($form.visible(true) && !$footer.visible(true)) $footer.addClass('floating');
|
1221
1225
|
});
|
1222
|
-
},
|
1223
|
-
|
1224
|
-
open_popup: function(content, link) {
|
1225
|
-
var element = jQuery(content).dialog({
|
1226
|
-
modal: true,
|
1227
|
-
close: function() { link.close(); },
|
1228
|
-
width: ActiveScaffold.config.popup_width || '80%'
|
1229
|
-
});
|
1230
|
-
link.set_adapter(element);
|
1231
|
-
},
|
1232
|
-
|
1233
|
-
close_popup: function(link, callback) {
|
1234
|
-
link.adapter.dialog('close');
|
1235
|
-
if (callback) callback();
|
1236
1226
|
}
|
1227
|
+
|
1237
1228
|
}
|
1238
1229
|
|
1239
1230
|
|
@@ -1288,15 +1279,18 @@
|
|
1288
1279
|
if (element.length > 0) {
|
1289
1280
|
element.data(); // $ 1.4.2 workaround
|
1290
1281
|
if (typeof(element.data('action_link')) === 'undefined' && !element.hasClass('as_adapter')) {
|
1291
|
-
var parent = element.
|
1292
|
-
if (parent.length === 0
|
1293
|
-
|
1282
|
+
var parent = element.closest('.actions');
|
1283
|
+
if (parent.length === 0 || parent.is('td')) {
|
1284
|
+
// maybe an column action_link
|
1285
|
+
parent = element.closest('tr.record');
|
1286
|
+
}
|
1287
|
+
if (parent.is('tr')) {
|
1294
1288
|
// record action
|
1295
1289
|
var target = parent.find('a.as_action');
|
1296
|
-
var loading_indicator = parent.find('.actions .loading-indicator');
|
1290
|
+
var loading_indicator = parent.find('td.actions .loading-indicator');
|
1297
1291
|
if (!loading_indicator.length) loading_indicator = element.parent().find('.loading-indicator');
|
1298
1292
|
new ActiveScaffold.Actions.Record(target, parent, loading_indicator);
|
1299
|
-
} else if (parent.is('
|
1293
|
+
} else if (parent && parent.is('div')) {
|
1300
1294
|
//table action
|
1301
1295
|
new ActiveScaffold.Actions.Table(parent.find('a.as_action'), parent.closest('div.active-scaffold').find('tbody.before-header').first(), parent.find('.loading-indicator').first());
|
1302
1296
|
}
|
@@ -1333,18 +1327,14 @@
|
|
1333
1327
|
},
|
1334
1328
|
|
1335
1329
|
close: function() {
|
1336
|
-
|
1337
|
-
link
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
if (this.position === 'popup') {
|
1345
|
-
ActiveScaffold.close_popup(this, callback);
|
1346
|
-
} else if (this.adapter) {
|
1347
|
-
ActiveScaffold.remove(this.adapter, callback);
|
1330
|
+
if (this.adapter) {
|
1331
|
+
var link = this;
|
1332
|
+
ActiveScaffold.remove(this.adapter, function() {
|
1333
|
+
link.enable();
|
1334
|
+
if (link.hide_target) link.target.show();
|
1335
|
+
if (link.hide_content) link.content.show();
|
1336
|
+
if (ActiveScaffold.config.scroll_on_close) ActiveScaffold.scroll_to(link.target.attr('id'), ActiveScaffold.config.scroll_on_close == 'checkInViewport');
|
1337
|
+
});
|
1348
1338
|
}
|
1349
1339
|
},
|
1350
1340
|
|
@@ -1405,7 +1395,7 @@
|
|
1405
1395
|
if (refresh) l.refresh_url = this.target.closest('.records').data('refresh-record').replace('--ID--', refresh);
|
1406
1396
|
|
1407
1397
|
if (l.position) {
|
1408
|
-
l.url = l.url.append_params({adapter:
|
1398
|
+
l.url = l.url.append_params({adapter: '_list_inline_adapter'});
|
1409
1399
|
l.tag.attr('href', l.url);
|
1410
1400
|
}
|
1411
1401
|
l.set = this;
|
@@ -1426,13 +1416,9 @@
|
|
1426
1416
|
insert: function(content) {
|
1427
1417
|
this.close_previous_adapter();
|
1428
1418
|
|
1429
|
-
if (this.position
|
1419
|
+
if (this.position == 'replace') {
|
1430
1420
|
this.position = 'after';
|
1431
1421
|
this.hide_target = true;
|
1432
|
-
} else if (this.position === 'table') {
|
1433
|
-
this.hide_content = true;
|
1434
|
-
} else if (this.position === 'popup') {
|
1435
|
-
return ActiveScaffold.open_popup(content, this);
|
1436
1422
|
}
|
1437
1423
|
|
1438
1424
|
var colspan = this.target.children().length;
|
@@ -1440,17 +1426,15 @@
|
|
1440
1426
|
content = jQuery(content);
|
1441
1427
|
content.find('.inline-adapter-cell:first').attr('colspan', colspan);
|
1442
1428
|
}
|
1443
|
-
if (this.position
|
1429
|
+
if (this.position == 'after') {
|
1444
1430
|
this.target.after(content);
|
1445
1431
|
this.set_adapter(this.target.next());
|
1446
|
-
}
|
1432
|
+
}
|
1433
|
+
else if (this.position == 'before') {
|
1447
1434
|
this.target.before(content);
|
1448
1435
|
this.set_adapter(this.target.prev());
|
1449
|
-
}
|
1450
|
-
|
1451
|
-
content_parent.prepend(content);
|
1452
|
-
this.set_adapter(content_parent.children().first())
|
1453
|
-
} else {
|
1436
|
+
}
|
1437
|
+
else {
|
1454
1438
|
return false;
|
1455
1439
|
}
|
1456
1440
|
ActiveScaffold.highlight(this.adapter.find('td'));
|
@@ -1488,10 +1472,10 @@
|
|
1488
1472
|
},
|
1489
1473
|
|
1490
1474
|
set_opened: function() {
|
1491
|
-
if (this.position
|
1475
|
+
if (this.position == 'after') {
|
1492
1476
|
this.set_adapter(this.target.next());
|
1493
1477
|
}
|
1494
|
-
else if (this.position
|
1478
|
+
else if (this.position == 'before') {
|
1495
1479
|
this.set_adapter(this.target.prev());
|
1496
1480
|
}
|
1497
1481
|
this.disable();
|
@@ -1517,14 +1501,13 @@
|
|
1517
1501
|
if (this.position == 'replace') {
|
1518
1502
|
this.position = 'top';
|
1519
1503
|
this.hide_content = true;
|
1520
|
-
} else if (this.position == 'popup') {
|
1521
|
-
return ActiveScaffold.open_popup(content, this);
|
1522
1504
|
}
|
1523
1505
|
|
1524
1506
|
if (this.position == 'top') {
|
1525
1507
|
this.target.prepend(content);
|
1526
1508
|
this.set_adapter(this.target.children().first());
|
1527
|
-
}
|
1509
|
+
}
|
1510
|
+
else {
|
1528
1511
|
throw 'Unknown position "' + this.position + '"'
|
1529
1512
|
}
|
1530
1513
|
ActiveScaffold.highlight(this.adapter.find('td').first().children().not('script'));
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%# encoding: utf-8 %>
|
2
|
-
<% I18n.available_locales.each { |locale|
|
2
|
+
<% I18n.available_locales.each { |locale| Rails.root.glob("config/locales/#{locale}.*").each { |path| depend_on path.to_s } } %>
|
3
3
|
<%= ActiveScaffold::Bridges[:date_picker].localization %>
|
4
4
|
Object.getPrototypeOf(jQuery.datepicker)._attachDatepicker_without_inlineSettings = Object.getPrototypeOf(jQuery.datepicker)._attachDatepicker;
|
5
5
|
jQuery.extend(Object.getPrototypeOf(jQuery.datepicker), {
|
@@ -110,9 +110,6 @@ color: $column_color;
|
|
110
110
|
color: $header_color;
|
111
111
|
}
|
112
112
|
|
113
|
-
.active-scaffold div.actions a.separator {
|
114
|
-
border-color: $action_group_border_color;
|
115
|
-
}
|
116
113
|
.active-scaffold-header div.actions a.disabled {
|
117
114
|
color: $actions_disabled_color;
|
118
115
|
}
|
@@ -194,10 +191,6 @@ color: $column_empty_color;
|
|
194
191
|
border-color: $column_actions_border_color;
|
195
192
|
}
|
196
193
|
|
197
|
-
.active-scaffold tr.record td.actions table td.separator {
|
198
|
-
border-color: $column_actions_border_color;
|
199
|
-
}
|
200
|
-
|
201
194
|
.active-scaffold tr.record td.actions a.disabled {
|
202
195
|
color: $actions_disabled_color;
|
203
196
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
<% ActiveScaffold.stylesheets.each {|css| require_asset css} %>
|
2
|
-
<% ActiveScaffold::Bridges.all_stylesheets.each {|css| require_asset css} %>
|
1
|
+
<% ActiveScaffold.stylesheets.each { |css| require_asset css } %>
|
2
|
+
<% ActiveScaffold::Bridges.all_stylesheets.each { |css| require_asset css } %>
|
@@ -1,12 +1,12 @@
|
|
1
|
-
<% if Object.const_defined?(
|
2
|
-
<% if Jquery.const_defined?(
|
3
|
-
<% require_asset
|
4
|
-
<% elsif Jquery.const_defined?
|
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
5
|
<% if Jquery::Ui::Rails::VERSION < '5.0.0' %>
|
6
|
-
<% require_asset
|
6
|
+
<% require_asset 'jquery.ui.datepicker' %>
|
7
7
|
<% else %>
|
8
|
-
<% require_asset
|
8
|
+
<% require_asset 'jquery-ui/datepicker' %>
|
9
9
|
<% end %>
|
10
10
|
<% end %>
|
11
11
|
<% end %>
|
12
|
-
<% require_asset
|
12
|
+
<% require_asset 'jquery-ui-theme' if ActiveScaffold.jquery_ui_included? %>
|
@@ -110,12 +110,6 @@ top: 14px;
|
|
110
110
|
top: -3px;
|
111
111
|
}
|
112
112
|
|
113
|
-
.active-scaffold div.actions a.separator {
|
114
|
-
border-right: 1px solid;
|
115
|
-
padding-right: 0;
|
116
|
-
padding-left: 0;
|
117
|
-
}
|
118
|
-
|
119
113
|
.active-scaffold div.actions a.disabled {
|
120
114
|
opacity: 0.5;
|
121
115
|
}
|
@@ -257,11 +251,6 @@ text-align: right;
|
|
257
251
|
padding: 0 2px;
|
258
252
|
}
|
259
253
|
|
260
|
-
.active-scaffold tr.record td.actions table td.separator {
|
261
|
-
border-right: solid 1px;
|
262
|
-
padding: 0;
|
263
|
-
}
|
264
|
-
|
265
254
|
.active-scaffold tr.record td.actions a,
|
266
255
|
.active-scaffold tr.record td.actions div {
|
267
256
|
font-weight: bold;
|
@@ -315,16 +304,6 @@ width: auto;
|
|
315
304
|
text-align: left;
|
316
305
|
}
|
317
306
|
|
318
|
-
.active-scaffold .actions .action_group ul li.separator {
|
319
|
-
border-top-width: 1px;
|
320
|
-
border-top-style: solid;
|
321
|
-
height: 0;
|
322
|
-
}
|
323
|
-
|
324
|
-
.active-scaffold .actions .action_group ul li.separator + li {
|
325
|
-
border-top: none;
|
326
|
-
}
|
327
|
-
|
328
307
|
.active-scaffold .actions .action_group ul li div {
|
329
308
|
margin: 0;
|
330
309
|
padding: 5px 5px 5px 25px;
|
@@ -497,12 +476,6 @@ padding: 4px;
|
|
497
476
|
text-align: center;
|
498
477
|
position: relative;
|
499
478
|
}
|
500
|
-
.active-scaffold .filtered-message {
|
501
|
-
display: flex;
|
502
|
-
}
|
503
|
-
.active-scaffold .filtered-message > * {
|
504
|
-
flex-grow: 1;
|
505
|
-
}
|
506
479
|
|
507
480
|
.active-scaffold .message, .active-scaffold-component .message {
|
508
481
|
font-size: 11px;
|
@@ -518,9 +491,10 @@ display: inline;
|
|
518
491
|
}
|
519
492
|
|
520
493
|
.active-scaffold .filtered-message .reset {
|
521
|
-
|
522
|
-
|
523
|
-
|
494
|
+
position: absolute;
|
495
|
+
display: inline;
|
496
|
+
right: 10px;
|
497
|
+
top: 4px;
|
524
498
|
padding: 0;
|
525
499
|
}
|
526
500
|
|
@@ -1005,6 +979,59 @@ font-size: 100%;
|
|
1005
979
|
margin-right: 5px;
|
1006
980
|
}
|
1007
981
|
|
982
|
+
.active-scaffold .tabbed .nav-tabs {
|
983
|
+
border-bottom: 1px solid #ddd;
|
984
|
+
padding-left: 0;
|
985
|
+
margin-bottom: 0;
|
986
|
+
list-style: none;
|
987
|
+
}
|
988
|
+
|
989
|
+
.active-scaffold .tabbed .nav-tabs:before,
|
990
|
+
.active-scaffold .tabbed .nav-tabs:after {
|
991
|
+
display: table;
|
992
|
+
content: ' ';
|
993
|
+
}
|
994
|
+
.active-scaffold .tabbed .nav-tabs:after {
|
995
|
+
clear: both;
|
996
|
+
}
|
997
|
+
|
998
|
+
.active-scaffold .tabbed .nav-tabs > li {
|
999
|
+
float: left;
|
1000
|
+
margin-bottom: -1px;
|
1001
|
+
position: relative;
|
1002
|
+
display: block;
|
1003
|
+
}
|
1004
|
+
|
1005
|
+
.active-scaffold .tabbed .nav-tabs > li > a {
|
1006
|
+
margin-right: 2px;
|
1007
|
+
border: 1px solid transparent;
|
1008
|
+
border-radius: 4px 4px 0 0;
|
1009
|
+
position: relative;
|
1010
|
+
display: block;
|
1011
|
+
padding: 10px 15px;
|
1012
|
+
}
|
1013
|
+
.active-scaffold .tabbed .nav-tabs > li > a:focus,
|
1014
|
+
.active-scaffold .tabbed .nav-tabs > li > a:hover {
|
1015
|
+
border-color: #eee #eee #ddd;
|
1016
|
+
text-decoration: none;
|
1017
|
+
background-color: #eee;
|
1018
|
+
}
|
1019
|
+
.active-scaffold .tabbed .nav-tabs > li.active > a,
|
1020
|
+
.active-scaffold .tabbed .nav-tabs > li.active > a:focus,
|
1021
|
+
.active-scaffold .tabbed .nav-tabs > li.active > a:hover {
|
1022
|
+
border-color: #ddd;
|
1023
|
+
border-bottom-color: transparent;
|
1024
|
+
cursor: default;
|
1025
|
+
background-color: #fff;
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
.active-scaffold .tabbed .tab-content > .tab-pane {
|
1029
|
+
display: none;
|
1030
|
+
}
|
1031
|
+
.active-scaffold .tabbed .tab-content > .active {
|
1032
|
+
display: block;
|
1033
|
+
}
|
1034
|
+
|
1008
1035
|
.as_touch a.inline-adapter-close {
|
1009
1036
|
width: 25px;
|
1010
1037
|
height: 27px;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<% url_options = params_for(:
|
1
|
+
<% url_options = params_for(action: :add_existing) -%>
|
2
2
|
<% xhr = request.xhr? -%>
|
3
3
|
<%=
|
4
|
-
options = {:
|
5
|
-
:
|
6
|
-
:
|
4
|
+
options = {id: element_form_id(action: :add_existing),
|
5
|
+
class: 'as_form create',
|
6
|
+
method: :post,
|
7
7
|
'data-loading' => true}
|
8
8
|
options[:remote] = true if xhr
|
9
9
|
form_tag url_options, options -%>
|
@@ -11,18 +11,18 @@ options = {:id => element_form_id(:action => :add_existing),
|
|
11
11
|
<h4><%= active_scaffold_config.nested.label -%></h4>
|
12
12
|
|
13
13
|
<% if xhr -%>
|
14
|
-
<div id="<%= element_messages_id(:
|
14
|
+
<div id="<%= element_messages_id(action: :add_existing) %>" class="messages-container"></div>
|
15
15
|
<% else -%>
|
16
|
-
<%= render
|
16
|
+
<%= render 'form_messages' %>
|
17
17
|
<% end -%>
|
18
18
|
|
19
19
|
<label for="<%= "record_#{active_scaffold_config.model}" %>"><%= active_scaffold_add_existing_label %></label>
|
20
|
-
<%= active_scaffold_add_existing_input(:
|
20
|
+
<%= active_scaffold_add_existing_input(name: 'associated_id', url_options: url_options, object: nested_parent_record) %>
|
21
21
|
|
22
22
|
<p class="form-footer">
|
23
|
-
<%= submit_tag as_(:add), :
|
24
|
-
<%= link_to as_(:cancel), main_path_to_return, :
|
25
|
-
<%= loading_indicator_tag(:
|
23
|
+
<%= submit_tag as_(:add), class: 'submit' %>
|
24
|
+
<%= link_to as_(:cancel), main_path_to_return, class: 'as_cancel', remote: true %>
|
25
|
+
<%= loading_indicator_tag(action: :add_existing, id: params[:id]) %>
|
26
26
|
</p>
|
27
27
|
|
28
28
|
</form>
|
@@ -1,17 +1,17 @@
|
|
1
1
|
<% scope ||= nil
|
2
2
|
footer_extension ||= nil
|
3
|
-
url_options ||= params_for(:
|
3
|
+
url_options ||= params_for(action: form_action)
|
4
4
|
xhr = request.xhr? if xhr.nil?
|
5
5
|
if active_scaffold_config.actions.include? form_action
|
6
6
|
action_config = active_scaffold_config.send(form_action)
|
7
|
-
multipart ||= action_config.multipart? unless local_assigns.
|
8
|
-
columns ||= action_config.columns unless local_assigns.
|
9
|
-
persistent ||= action_config.persistent unless local_assigns.
|
10
|
-
|
11
|
-
floating_footer = action_config.floating_footer
|
7
|
+
multipart ||= action_config.multipart? unless local_assigns.key? :multipart
|
8
|
+
columns ||= action_config.columns unless local_assigns.key? :columns
|
9
|
+
persistent ||= action_config.persistent unless local_assigns.key? :persistent
|
10
|
+
if !local_assigns.key?(:floating_footer) && action_config.respond_to?(:floating_footer)
|
11
|
+
floating_footer = action_config.floating_footer
|
12
12
|
end
|
13
|
-
|
14
|
-
add_locking_column = action_config.add_locking_column
|
13
|
+
if !local_assigns.key?(:add_locking_column) && action_config.respond_to?(:add_locking_column)
|
14
|
+
add_locking_column = action_config.add_locking_column
|
15
15
|
end
|
16
16
|
else
|
17
17
|
multipart ||= false
|
@@ -27,16 +27,16 @@
|
|
27
27
|
form_id = element_form_id(action: form_action, id: @record&.id)
|
28
28
|
%>
|
29
29
|
<%=
|
30
|
-
options = {:
|
31
|
-
:
|
32
|
-
:
|
33
|
-
:
|
30
|
+
options = {id: form_id,
|
31
|
+
multipart: multipart,
|
32
|
+
class: "as_form #{form_action}",
|
33
|
+
method: method,
|
34
34
|
'data-loading' => defined?(loading) ? loading : true}
|
35
|
-
cancel_options = {:
|
35
|
+
cancel_options = {class: 'as_cancel'}
|
36
36
|
options[:class] << ' floating-footer' if floating_footer
|
37
|
-
cancel_options[:remote] = true if xhr #cancel link does nt have to care about multipart forms
|
37
|
+
cancel_options[:remote] = true if xhr # cancel link does nt have to care about multipart forms
|
38
38
|
if xhr && multipart # file_uploads
|
39
|
-
form_remote_upload_tag url_options.merge(
|
39
|
+
form_remote_upload_tag url_options.merge(iframe: true), options
|
40
40
|
else
|
41
41
|
options[:remote] = true if xhr && !multipart
|
42
42
|
form_tag url_options, options
|
@@ -45,24 +45,24 @@ end
|
|
45
45
|
<%= hidden_field :record, @record.class.locking_column if add_locking_column && @record.persisted? && @record.locking_enabled? %>
|
46
46
|
<h4><%= headline -%></h4>
|
47
47
|
|
48
|
-
<div id="<%= element_messages_id(:
|
48
|
+
<div id="<%= element_messages_id(action: form_action) %>" class="messages-container">
|
49
49
|
<% unless xhr %>
|
50
50
|
<p class="error-message message server-error" style="display:none;">
|
51
51
|
<%= as_(:internal_error).html_safe %>
|
52
52
|
<a href="#" class="close" title="<%= as_(:close).html_safe %>"><%= as_(:close).html_safe %></a>
|
53
53
|
</p>
|
54
54
|
<% end %>
|
55
|
-
<%= render
|
55
|
+
<%= render 'form_messages' %>
|
56
56
|
</div>
|
57
57
|
|
58
|
-
<%= render
|
58
|
+
<%= render body_partial, columns: columns, form_action: form_action, scope: scope %>
|
59
59
|
|
60
60
|
<p class="form-footer">
|
61
|
-
<%= submit_tag as_(submit_text), :
|
62
|
-
<%= submit_tag as_(apply_text), :
|
61
|
+
<%= submit_tag as_(submit_text), class: 'submit' if !persistent || persistent == :optional %>
|
62
|
+
<%= submit_tag as_(apply_text), class: 'submit', name: 'dont_close' if persistent %>
|
63
63
|
<%= link_to(as_(:cancel), main_path_to_return, cancel_options) if cancel_link %>
|
64
64
|
<%= loading_indicator_tag(action: form_action, id: @record&.id) %>
|
65
|
-
<%= render
|
65
|
+
<%= render footer_extension, form_action: form_action if footer_extension %>
|
66
66
|
</p>
|
67
67
|
|
68
68
|
</form>
|