inline_forms 8.1.21 → 8.1.40
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/.forgejo/workflows/ci.yml +63 -0
- data/.forgejo/workflows/full-gate.yml +75 -0
- data/.gitignore +4 -3
- data/.rubocop.yml +30 -0
- data/.rubocop_todo.yml +151 -0
- data/CHANGELOG.md +261 -0
- data/Gemfile +14 -2
- data/README.rdoc +23 -6
- data/Rakefile +2 -2
- data/app/assets/fonts/opensans-v44-latin-italic.woff2 +0 -0
- data/app/assets/fonts/opensans-v44-latin-regular.woff2 +0 -0
- data/app/assets/javascripts/inline_forms/inline_forms.js +30 -43
- data/app/assets/stylesheets/inline_forms/_foundation_icons.scss +6 -12
- data/app/assets/stylesheets/inline_forms/_theme.scss +134 -0
- data/app/assets/stylesheets/inline_forms/devise.scss +14 -13
- data/app/assets/stylesheets/inline_forms/foundation_and_overrides.scss +4 -0
- data/app/assets/stylesheets/inline_forms/inline_forms.scss +59 -68
- data/app/assets/stylesheets/inline_forms_fonts.css.erb +39 -0
- data/app/controllers/inline_forms_application_controller.rb +8 -4
- data/app/controllers/inline_forms_controller.rb +73 -14
- data/app/helpers/inline_forms_helper.rb +58 -15
- data/app/models/concerns/inline_forms/soft_deletable.rb +11 -12
- data/app/validators/curacao_id_number_validator.rb +5 -6
- data/app/validators/is_curacao_phone_validator.rb +2 -3
- data/app/validators/is_email_address_validator.rb +3 -3
- data/app/validators/must_be_a_value_validator.rb +6 -6
- data/app/views/inline_forms/_show.html.erb +1 -1
- data/app/views/layouts/application.html.erb +6 -3
- data/app/views/layouts/devise.html.erb +1 -0
- data/app/views/layouts/inline_forms.html.erb +7 -4
- data/archived/README.md +2 -0
- data/archived/form_elements/dns_records/README.md +25 -0
- data/archived/form_elements/question_list/README.md +25 -0
- data/inline_forms.gemspec +8 -7
- data/lib/generators/inline_forms_attribute_overrides.rb +3 -2
- data/lib/generators/templates/application_record.rb +1 -1
- data/lib/inline_forms/archived_form_elements.rb +23 -10
- data/lib/inline_forms/form_element_from_callee.rb +1 -0
- data/lib/inline_forms/form_element_registry.rb +32 -32
- data/lib/inline_forms/form_elements/color_field_helper.rb +44 -0
- data/lib/inline_forms/form_elements/date_helper.rb +4 -1
- data/lib/inline_forms/form_elements/dropdown_with_other_helper.rb +25 -113
- data/lib/inline_forms/form_elements/month_year_picker_helper.rb +13 -2
- data/lib/inline_forms/form_elements/multi_image_field_helper.rb +18 -6
- data/lib/inline_forms/form_elements/slider_with_values_helper.rb +31 -64
- data/lib/inline_forms/form_elements/time_helper.rb +3 -1
- data/lib/inline_forms/gem_files.rb +1 -0
- data/lib/inline_forms/tabs.rb +175 -0
- data/lib/inline_forms/turbo_tabs_builder.rb +20 -13
- data/lib/inline_forms/version.rb +2 -1
- data/lib/inline_forms.rb +59 -45
- data/test/archived_form_elements_test.rb +34 -4
- data/test/dummy/app/controllers/application_controller.rb +24 -0
- data/test/dummy/app/controllers/machines_controller.rb +4 -0
- data/test/dummy/app/controllers/parts_controller.rb +4 -0
- data/test/dummy/app/controllers/widgets_controller.rb +4 -0
- data/test/dummy/app/helpers/application_helper.rb +13 -0
- data/test/dummy/app/models/application_record.rb +26 -0
- data/test/dummy/app/models/kind.rb +8 -0
- data/test/dummy/app/models/machine.rb +23 -0
- data/test/dummy/app/models/part.rb +16 -0
- data/test/dummy/app/models/widget.rb +39 -0
- data/test/dummy/app/views/_inline_forms_tabs.html.erb +40 -0
- data/test/dummy/config/application.rb +34 -0
- data/test/dummy/config/database.yml +3 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/initializers/inline_forms.rb +6 -0
- data/test/dummy/config/initializers/paper_trail_yaml_safe_load.rb +28 -0
- data/test/dummy/config/routes.rb +22 -0
- data/test/integration/inline_forms_crud_test.rb +141 -0
- data/test/integration/legacy_elements_test.rb +42 -0
- data/test/integration/native_inputs_test.rb +138 -0
- data/test/integration/open_after_create_test.rb +85 -0
- data/test/integration_test_helper.rb +80 -0
- data/test/plain_text_configuration_test.rb +3 -3
- data/test/tabs_test.rb +98 -0
- data/test/user_model_config_test.rb +1 -0
- data/vendor/assets/javascripts/trix.min.js +7 -0
- data/vendor/assets/stylesheets/trix.css +470 -0
- metadata +63 -320
- data/app/assets/images/jquery-ui/animated-overlay.gif +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonal-maze_20_6e4f1c_10x10.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonal-maze_40_000000_10x10.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-medium_20_d34d17_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-small_0_aaaaaa_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-small_25_c5ddfc_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-small_40_db4865_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-small_50_262626_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-small_50_93c3cd_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-small_50_ff3853_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-small_75_ccd232_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_15_0b3e6f_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_15_444444_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_20_e69700_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_22_1484e6_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_26_2293f7_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_75_f3d8d8_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_8_333333_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_90_eeeeee_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_95_ffdc2e_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diamond_10_4f4221_10x8.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diamond_20_372806_10x8.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diamond_25_675423_10x8.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diamond_25_d5ac5d_10x8.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diamond_8_261803_10x8.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diamond_8_443113_10x8.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_dots-medium_30_0b58a2_4x4.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_dots-medium_80_ffff38_4x4.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_dots-small_20_333333_2x2.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_dots-small_30_a32d00_2x2.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_dots-small_35_35414f_2x2.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_dots-small_40_00498f_2x2.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_dots-small_65_a6a6a6_2x2.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_fine-grain_10_eceadf_60x60.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_fine-grain_10_f8f7f6_60x60.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_fine-grain_15_eceadf_60x60.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_fine-grain_15_f7f3de_60x60.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_fine-grain_15_ffffff_60x60.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_fine-grain_65_654b24_60x60.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_fine-grain_68_b83400_60x60.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_303030_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_333333_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_4c4c4c_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_e69700_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_e6b900_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_10_000000_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_15_cd0a0a_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_30_cccccc_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_40_292929_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_50_5c5c5c_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_55_994d53_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_55_999999_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_55_c0402a_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_55_eeeeee_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_55_fafafa_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_55_ffffff_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_65_ffffff_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_75_aaaaaa_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_75_ba9217_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_75_ddd4b0_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_100_e4f1fb_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_100_f5f0e5_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_100_f8f8f8_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_15_5f391b_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_20_555555_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_25_cb842e_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_35_dddddd_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_40_0078a3_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_40_0a0a0a_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_40_111111_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_40_ffc73d_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_45_0078ae_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_50_3baae3_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_1c1c1c_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_f1fbe5_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_f8da4e_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf5d0_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf8ee_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_fcf0ba_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_60_000000_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_60_eeeeee_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_70_ede4d4_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_79c9ec_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_80_d7ebf9_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_100_ece8da_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_16_121212_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_20_111111_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_20_1c160d_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_25_333333_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_25_453326_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_30_3d3644_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_30_44372c_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_45_817865_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_45_e14f1c_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_50_6eac2c_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_55_000000_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_60_fece2f_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_70_ffdd57_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_75_2191c0_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_85_9fda58_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_90_fff9e5_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_gloss-wave_95_f6ecd5_500x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_100_eeeeee_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_100_f2f5f7_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_100_f4f0ec_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_100_f5f3e5_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_100_f6f6f6_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_100_f9f9f9_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_100_fafaf4_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_15_459e00_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_15_888888_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_20_0972a5_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_30_285c00_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_40_aaaaaa_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_55_555555_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_65_fee4bd_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_70_000000_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_75_f5f5b5_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_95_cccccc_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_100_dcd9de_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_100_deedf7_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_100_eae6ea_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_100_f9f9f9_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_100_feeebd_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_15_cc0000_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_20_201913_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_20_619226_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_25_30273a_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_25_67b021_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_25_ffef8f_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_33_003147_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_33_3a8104_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_35_222222_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_35_adadad_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_44_444444_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_45_5f5964_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_50_4eb305_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_50_aaaaaa_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_60_4ca20b_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_60_dddddd_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_80_eeeeee_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_95_ffedad_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-hard_100_eeeeee_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-hard_45_cd0a0a_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-hard_55_ffeb80_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-hard_75_999999_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-soft_100_f4f0ec_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-soft_10_201913_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-soft_10_285c00_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-soft_15_121212_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-soft_15_2b2922_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-soft_25_000000_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-soft_30_f58400_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-soft_30_ffffff_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-soft_50_c9c9c9_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_loop_25_000000_21x21.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_white-lines_85_f7f7ba_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_000000_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_004276_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_00498f_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_0073ea_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_0078ae_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_056b93_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_070603_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_0a82eb_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_0b54d5_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_1f1f1f_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_217bc0_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_228ef1_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_2694e8_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_3383bb_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_3572ac_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_3d3d3d_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_3d80b3_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_469bdd_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_4b8e0b_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_4ca300_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_4eb305_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_5fa5e3_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_666666_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_6da8d5_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_70b2e1_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_72a7cf_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_72b42d_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_734d99_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_808080_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_847e71_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_88a206_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_8DC262_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_8c291d_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_8d78a5_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_98d2fb_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_999999_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_9bcc60_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_9ccdfc_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_9fda58_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_a83300_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_a8a3ae_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_aaaaaa_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_add978_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_b83400_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_b8ec79_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_bbbbbb_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_bd7b00_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_c02669_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_c47a23_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_c98000_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cb672b_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cccccc_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_d19405_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_d8e7f3_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_e0fdff_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_e1e463_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_e3ddc9_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_e8e2b5_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_e9cd86_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_eb990f_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ebccce_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ed9f26_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ededed_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_eeeeee_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ef8c08_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_efec9f_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_f08000_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_f1fd86_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_f29a00_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_f2ec64_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_f35f07_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_f5e175_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_f7a50d_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_f9bd01_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_f9f2bd_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_fadc7a_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_fbc856_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_fbdb93_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_fcd113_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_fcdd4a_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ff0084_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ff7519_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ffcf29_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ffd27a_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ffe180_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ffeb33_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/stylesheets/jquery_ui/jquery.ui.accordion.css.scss +0 -39
- data/app/assets/stylesheets/jquery_ui/jquery.ui.all.css.scss +0 -14
- data/app/assets/stylesheets/jquery_ui/jquery.ui.autocomplete.css.scss +0 -17
- data/app/assets/stylesheets/jquery_ui/jquery.ui.base.css.scss +0 -27
- data/app/assets/stylesheets/jquery_ui/jquery.ui.button.css.scss +0 -115
- data/app/assets/stylesheets/jquery_ui/jquery.ui.core.css.scss +0 -92
- data/app/assets/stylesheets/jquery_ui/jquery.ui.datepicker.css.scss +0 -179
- data/app/assets/stylesheets/jquery_ui/jquery.ui.dialog.css.scss +0 -70
- data/app/assets/stylesheets/jquery_ui/jquery.ui.menu.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/jquery.ui.progressbar.css.scss +0 -29
- data/app/assets/stylesheets/jquery_ui/jquery.ui.resizable.css.scss +0 -79
- data/app/assets/stylesheets/jquery_ui/jquery.ui.selectable.css.scss +0 -16
- data/app/assets/stylesheets/jquery_ui/jquery.ui.slider.css.scss +0 -74
- data/app/assets/stylesheets/jquery_ui/jquery.ui.spinner.css.scss +0 -66
- data/app/assets/stylesheets/jquery_ui/jquery.ui.tabs.css.scss +0 -53
- data/app/assets/stylesheets/jquery_ui/jquery.ui.theme.css.scss +0 -408
- data/app/assets/stylesheets/jquery_ui/jquery.ui.tooltip.css.scss +0 -20
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.base.css.scss +0 -78
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.black-tie.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.blitzer.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.cupertino.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.dark-hive.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.dot-luv.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.eggplant.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.excite-bike.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.flick.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.hot-sneaks.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.humanity.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.le-frog.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.mint-choc.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.overcast.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.pepper-grinder.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.redmond.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.smoothness.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.south-street.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.start.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.sunny.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.swanky-purse.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.trontastic.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.ui-darkness.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.ui-lightness.css.scss +0 -80
- data/app/assets/stylesheets/jquery_ui/themes/_jquery.ui.vader.css.scss +0 -80
- /data/{lib → archived/form_elements/dns_records/lib}/inline_forms/form_elements/dns_records_helper.rb +0 -0
- /data/{lib → archived/form_elements/question_list/lib}/inline_forms/form_elements/question_list_helper.rb +0 -0
data/README.rdoc
CHANGED
|
@@ -46,17 +46,18 @@ The installer emits +devise_for :users, class_name: "Member", path: "members"+ (
|
|
|
46
46
|
|
|
47
47
|
Then point your browser to http://localhost:3000/apartments and log in with admin@example.com / admin999. The example also adds integration and model tests; run +bundle exec rails test+ in +MyApp+, then start the server with +bundle exec rails s+ when you want the UI.
|
|
48
48
|
|
|
49
|
-
The example app
|
|
49
|
+
The example app ships four demo models (plus the +User+ / +Role+ / +Locale+ auth trio):
|
|
50
50
|
|
|
51
51
|
* +Apartment+ — top-level resource at +/apartments+ (root).
|
|
52
52
|
* +Photo+ — nested under Apartment (+has_many+ / +belongs_to+).
|
|
53
53
|
* +Owner+ — top-level resource at +/owners+. An Owner +has_many+ Apartments; an Apartment +belongs_to+ a single (optional) Owner. The Owner detail panel at +/owners/:id+ ships two sub-tabs, +NAW+ (name, birthdate, address, city, country) and +Apartments+ (name + the owned-apartments checklist). +name+ deliberately appears on both tabs.
|
|
54
|
+
* +FormElementShowcase+ — one row per kept Tier 1 form element (numbers, dates, choices, scales, uploads incl. a +multi_image_field+ gallery, rich text, HABTM checklist), seeded as "Full demo" / "Empty demo" so every show/edit branch renders and is regression-tested.
|
|
54
55
|
|
|
55
56
|
On the +Apartments+ tab, +Owner#apartments+ is rendered as a +:check_list+ of *existing* apartments rather than the default +:associated+ "build new nested row" panel, so the user re-assigns the +apartments.owner_id+ FK by ticking checkboxes (using Rails' built-in +apartment_ids=+ setter on +has_many+).
|
|
56
57
|
|
|
57
|
-
The tabs are wired with +
|
|
58
|
+
The tabs are wired with +InlineForms::Tabs+ (+set_tab+ / +current_tab?+ / +tabs_tag+ — vendored into the engine since 8.1.23, replacing the unmaintained +tabs_on_rails+ gem with the same API) and +InlineForms::TurboTabsBuilder+, a small subclass of +InlineForms::Tabs::TabsBuilder+ that threads HTML options through to the tab's +<a>+ (the classic builder can only annotate the +<li>+). Each tab link carries +data-turbo-frame+ targeting the surrounding row +<turbo-frame>+, so switching tabs is a single Turbo partial swap — no UJS, no +data-remote+. The active tab is emitted as an hrefless +<a aria-current="page" aria-selected="true">+ inside +<li class="tabs-title is-active">+ so Foundation 6's tabs CSS (+.tabs-title.is-active > a+ / +[aria-selected='true']+) styles it without needing custom overrides.
|
|
58
59
|
|
|
59
|
-
The example app also seeds three apartments (+Apt 1+, +Apt 2+, +Apt 3+, each with three CC0 placeholder photos
|
|
60
|
+
The example app also seeds three apartments (+Apt 1+, +Apt 2+, +Apt 3+, each with three CC0 placeholder photos shipped with the installer — labeled pastel PNGs like "Apt 1 / Living Room"; override with your own folder via +INLINE_FORMS_SEED_PICS+) and three owners — +Maria Martinez+ (owns +Apt 1+ + +Apt 2+), +Jean-Pierre Dupont+ (owns +Apt 3+), and +Akira Tanaka+ (owns none) — so the +has_many+ panel has at least one zero / one / many case to click through.
|
|
60
61
|
|
|
61
62
|
You can install the example application manually if you like:
|
|
62
63
|
|
|
@@ -78,9 +79,9 @@ Then point your browser to http://localhost:3000/apartments and log in with admi
|
|
|
78
79
|
|
|
79
80
|
== Per-resource Turbo tabs (+InlineForms::TurboTabsBuilder+)
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
The classic builder API (+tab_for(tab, name, url_options, item_options = {})+, inherited from the retired +tabs_on_rails+ gem and preserved verbatim in the vendored +InlineForms::Tabs::TabsBuilder+) only applies the 4th argument to the +<li>+ wrapper; nothing is forwarded to the +<a>+. That used to be fine under Rails UJS (every link with +data-remote="true"+ was hijacked into an XHR regardless), but Turbo needs the data attribute on the +<a>+ itself (typically +data-turbo-frame="..."+).
|
|
82
83
|
|
|
83
|
-
The old +acesuares/tabs_on_rails+ fork (+update_remote_before_action+) patched +tab_for+ to thread html options into +link_to+. That fork was retired in 7.13.5; +InlineForms::TurboTabsBuilder+ is its Turbo-shaped replacement. It accepts a new +:link_options+ key on the per-tab call and forwards it to +link_to+:
|
|
84
|
+
The old +acesuares/tabs_on_rails+ fork (+update_remote_before_action+) patched +tab_for+ to thread html options into +link_to+. That fork was retired in 7.13.5 (and the gem itself was vendored away in 8.1.23); +InlineForms::TurboTabsBuilder+ is its Turbo-shaped replacement. It accepts a new +:link_options+ key on the per-tab call and forwards it to +link_to+:
|
|
84
85
|
|
|
85
86
|
<%= tabs_tag builder: InlineForms::TurboTabsBuilder,
|
|
86
87
|
active_class: "is-active",
|
|
@@ -101,7 +102,7 @@ Active-tab highlighting is unchanged from upstream (still driven by +set_tab :fo
|
|
|
101
102
|
|
|
102
103
|
=== Where to put the +tabs_tag+ block (four patterns)
|
|
103
104
|
|
|
104
|
-
+
|
|
105
|
+
+InlineForms::Tabs+ and +InlineForms::TurboTabsBuilder+ don't care where you call +tabs_tag+ — they just produce the +<ul class="tabs">+ wherever you put the block. The example app's split into +show_with_tabs.html.erb+ + +_owner_tabs.html.erb+ is a stylistic choice; below are the four common shapes, from most-inline to most-decoupled. Pick whichever fits your app:
|
|
105
106
|
|
|
106
107
|
1. *Inlined in the show view* — drop the +tabs_tag+ block straight into +app/views/<resource>/show_with_tabs.html.erb+ (or similar) and skip the partial entirely.
|
|
107
108
|
|
|
@@ -282,6 +283,22 @@ For long text fields, use +:plain_text+ for a plain textarea backed by a DB +tex
|
|
|
282
283
|
|
|
283
284
|
Note: generated apps also depend on ActiveStorage transitively because the +:rich_text+ form element uses ActionText (+active_storage:install+ runs during +inline_forms create+). Image uploads still go through CarrierWave; ActiveStorage is only there to back ActionText embeds.
|
|
284
285
|
|
|
286
|
+
== Native inputs (no jQuery UI)
|
|
287
|
+
|
|
288
|
+
Since 8.1.25/8.1.26 the date/time widgets are native HTML inputs — +:date_select+ renders +<input type="date">+, +:time_select+ +<input type="time">+, +:month_year_picker+ +<input type="month">+, +:slider_with_values+ +<input type="range">+, +:dropdown_with_other+ an +<input list>+ + +<datalist>+ combobox, and the new +:color_field+ (8.1.32) +<input type="color">+. jQuery UI, its themes and the +jquery-ui-rails+ / +rails-jquery-autocomplete+ / +jquery-timepicker-rails+ gems are gone; jQuery itself remains only because Foundation 6's JS requires it.
|
|
289
|
+
|
|
290
|
+
== Per-user themes, colors and locale
|
|
291
|
+
|
|
292
|
+
Generated apps let each user pick, on their own user panel:
|
|
293
|
+
|
|
294
|
+
* a *preset theme* (+default+ / +dark+ / +sepia+ / +high-contrast+): an integer +theme+ column mapped to a +theme-<name>+ body class; palettes are CSS custom properties (+--if-color-*+) in the engine's +_theme.scss+ (8.1.29);
|
|
295
|
+
* *custom colors* (+primary_color+ / +accent_color+, edited with +:color_field+): rendered as one scoped inline +<style>+ of +--if-color-*+ overrides, so the main stylesheet stays fully cacheable (8.1.32);
|
|
296
|
+
* a *locale*: the existing +locale+ association now drives +I18n.with_locale+ per request via +around_action :switch_locale+ (8.1.31).
|
|
297
|
+
|
|
298
|
+
Host apps that are not generated by the installer opt in by making +current_user+ respond to +inline_forms_theme+ (String) and/or +inline_forms_color_overrides+ (Hash of +--if-color-+ suffix => +"#rrggbb"+). Everything is validated before interpolation. To re-theme an app globally instead, override the variables in your own CSS:
|
|
299
|
+
|
|
300
|
+
:root { --if-color-primary: #2563eb; }
|
|
301
|
+
|
|
285
302
|
= Build a vagrant virtualbox box for easier development
|
|
286
303
|
|
|
287
304
|
Go ahead and unzip lib/vagrant/vagrantbox-inline_forms.zip. Enter the created directory with
|
data/Rakefile
CHANGED
|
@@ -26,10 +26,10 @@ def validation_hints_pkg_gem
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
desc "Build both inline_forms and inline_forms_installer into pkg/"
|
|
29
|
-
task "build:all" => ["build", "installer:build"]
|
|
29
|
+
task "build:all" => [ "build", "installer:build" ]
|
|
30
30
|
|
|
31
31
|
desc "Install freshly built gems from pkg/ into the current gemset (required before inline_forms create)"
|
|
32
|
-
task "install:local" => ["build:all"] do
|
|
32
|
+
task "install:local" => [ "build:all" ] do
|
|
33
33
|
gems = inline_forms_pkg_gems
|
|
34
34
|
vh = validation_hints_pkg_gem
|
|
35
35
|
gems << vh if vh
|
|
Binary file
|
|
Binary file
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
//= require jquery
|
|
2
|
-
//= require jquery.ui.all
|
|
3
|
-
//= require jquery.timepicker.js
|
|
4
2
|
//= require foundation
|
|
5
|
-
//= require autocomplete-rails
|
|
6
3
|
|
|
7
4
|
// Turbo / Hotwire is intentionally NOT required into this Sprockets bundle.
|
|
8
5
|
// `turbo-rails` ships only an ES-module build of turbo (`app/assets/javascripts/turbo.js`
|
|
@@ -13,13 +10,11 @@
|
|
|
13
10
|
// (and `application.html.erb`) as `<script type="module">`. Inline flows use
|
|
14
11
|
// `<turbo-frame>` + HTML responses; jquery-ujs / remotipart were removed in 7.8.0.
|
|
15
12
|
|
|
13
|
+
// jQuery UI is gone (8.1.26): date/time/month inputs are native, the
|
|
14
|
+
// dropdown_with_other combobox is an <input list> + <datalist>, and
|
|
15
|
+
// slider_with_values is a native <input type="range">. jQuery itself stays
|
|
16
|
+
// only because Foundation 6's JS requires it.
|
|
16
17
|
$(function(){
|
|
17
|
-
$.datepicker.setDefaults({
|
|
18
|
-
changeMonth : true,
|
|
19
|
-
changeYear : true,
|
|
20
|
-
yearRange: '-100:+100',
|
|
21
|
-
dateFormat: 'dd-mm-yy'
|
|
22
|
-
});
|
|
23
18
|
$(document).foundation();
|
|
24
19
|
initInlineFormsWidgets(document);
|
|
25
20
|
});
|
|
@@ -28,44 +23,36 @@ document.addEventListener("turbo:load", function() {
|
|
|
28
23
|
initInlineFormsWidgets(document);
|
|
29
24
|
});
|
|
30
25
|
|
|
31
|
-
//
|
|
32
|
-
//
|
|
26
|
+
// Widget init: one path for first paint, turbo:load and turbo:frame-load.
|
|
27
|
+
// Form element helpers emit class hooks only — no inline <script> tags.
|
|
28
|
+
// Native inputs (date/time/month/range/datalist) and Trix 2 custom elements
|
|
29
|
+
// need no re-init after frame swaps; only tooltips and the range-slider
|
|
30
|
+
// label sync are wired here.
|
|
33
31
|
function initInlineFormsWidgets(root) {
|
|
34
|
-
var $root = root instanceof jQuery ? root : $(root);
|
|
35
|
-
|
|
36
32
|
initValidationHintTooltips(root);
|
|
33
|
+
initSliderValueLabels(root);
|
|
34
|
+
}
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
onClose: function() {
|
|
47
|
-
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
|
|
48
|
-
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
|
|
49
|
-
$(this).datepicker("setDate", new Date(year, month, 1));
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
$root.find("input.datepicker").not(".datepicker-month-year").each(function() {
|
|
55
|
-
var $el = $(this);
|
|
56
|
-
if (!$el.hasClass("hasDatepicker")) { $el.datepicker(); }
|
|
57
|
-
});
|
|
36
|
+
// slider_with_values: keep the <output> label in sync with the range input.
|
|
37
|
+
// Labels array rides in data-slider-values; the <output> id in
|
|
38
|
+
// data-slider-output (both emitted by slider_with_values_edit).
|
|
39
|
+
function initSliderValueLabels(root) {
|
|
40
|
+
var scope = (root && root.querySelectorAll) ? root : document;
|
|
41
|
+
scope.querySelectorAll("input[type=range].slider_with_values").forEach(function (el) {
|
|
42
|
+
if (el._ifSliderBound) { return; }
|
|
43
|
+
el._ifSliderBound = true;
|
|
58
44
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
45
|
+
var labels = [];
|
|
46
|
+
try {
|
|
47
|
+
labels = JSON.parse(el.getAttribute("data-slider-values") || "[]");
|
|
48
|
+
} catch (e) { /* keep empty; label just won't update */ }
|
|
49
|
+
var output = document.getElementById(el.getAttribute("data-slider-output"));
|
|
50
|
+
if (!output || !labels.length) { return; }
|
|
63
51
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
52
|
+
el.addEventListener("input", function () {
|
|
53
|
+
var label = labels[parseInt(el.value, 10)];
|
|
54
|
+
output.textContent = (label === undefined || label === null) ? "" : label;
|
|
55
|
+
});
|
|
69
56
|
});
|
|
70
57
|
}
|
|
71
58
|
|
|
@@ -109,7 +96,7 @@ $(document).ready(function() {
|
|
|
109
96
|
});
|
|
110
97
|
});
|
|
111
98
|
|
|
112
|
-
// Re-bind
|
|
99
|
+
// Re-bind widgets (tooltips) after Turbo Frame swaps.
|
|
113
100
|
document.addEventListener("turbo:frame-load", function(event) {
|
|
114
101
|
var root = event.target;
|
|
115
102
|
if (!root || !root.querySelectorAll) { return; }
|
|
@@ -3,20 +3,14 @@
|
|
|
3
3
|
* Made by ZURB 2013 http://zurb.com/playground/foundation-icon-fonts-3
|
|
4
4
|
* MIT License
|
|
5
5
|
*
|
|
6
|
-
* Vendored into inline_forms (replaces foundation-icons-sass-rails)
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Vendored into inline_forms (replaces foundation-icons-sass-rails). Font files
|
|
7
|
+
* live in app/assets/fonts/ (woff/ttf/svg; mirrored from cdnjs foundicons 3.0.0).
|
|
8
|
+
*
|
|
9
|
+
* The @font-face moved to inline_forms_fonts.css.erb (Sprockets ERB): from the
|
|
10
|
+
* Dart Sass build the relative url("foundation-icons.woff") resolved against
|
|
11
|
+
* /assets/inline_forms/ and 404'd. Only the fi-* glyph classes live here.
|
|
9
12
|
*/
|
|
10
13
|
|
|
11
|
-
@font-face {
|
|
12
|
-
font-family: "foundation-icons";
|
|
13
|
-
src: url("foundation-icons.woff") format("woff"),
|
|
14
|
-
url("foundation-icons.ttf") format("truetype"),
|
|
15
|
-
url("foundation-icons.svg#fontcustom") format("svg");
|
|
16
|
-
font-weight: normal;
|
|
17
|
-
font-style: normal;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
14
|
.fi-address-book:before,
|
|
21
15
|
.fi-alert:before,
|
|
22
16
|
.fi-align-center:before,
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// inline_forms theme bridge (8.1.24).
|
|
2
|
+
//
|
|
3
|
+
// Exposes the admin-chrome palette as CSS custom properties on :root so a
|
|
4
|
+
// host app (or a future per-user preferences feature — see
|
|
5
|
+
// stuff/user-preferences-and-theming.md) can re-theme the UI at runtime by
|
|
6
|
+
// overriding variables, without recompiling the Sass build:
|
|
7
|
+
//
|
|
8
|
+
// :root { --if-color-primary: #2563eb; }
|
|
9
|
+
// /* or per user: */
|
|
10
|
+
// body.theme-dark { --if-color-body-bg: #111; --if-color-body-text: #eee; }
|
|
11
|
+
//
|
|
12
|
+
// The values are computed at build time from the Sass palette below (hover
|
|
13
|
+
// shades via lighten()), and every usage site keeps working with the same
|
|
14
|
+
// visual result when nothing overrides the variables. Foundation's own
|
|
15
|
+
// components still read the Sass settings at build time; only the
|
|
16
|
+
// inline_forms chrome (bars, rows, buttons, flashes) is variable-driven.
|
|
17
|
+
//
|
|
18
|
+
// Import order matters: this partial reads Foundation's globals
|
|
19
|
+
// ($body-background, $body-font-color, $anchor-color), so it must be
|
|
20
|
+
// imported after `@import 'foundation'` (see foundation_and_overrides.scss).
|
|
21
|
+
|
|
22
|
+
@use 'sass:color';
|
|
23
|
+
|
|
24
|
+
// Palette (single source of truth for the classic inline_forms look).
|
|
25
|
+
$if-primary: #A3381E !default; // dark red: app top bar, devise chrome
|
|
26
|
+
$if-accent: #B94C32 !default; // brick red: buttons, borders, pagination
|
|
27
|
+
$if-secondary: #E1C150 !default; // gold: model top bar band
|
|
28
|
+
$if-header-band: #EFCA4B !default; // deep gold: section headers, footers
|
|
29
|
+
$if-row-odd: #FBE38E !default; // list zebra: odd rows
|
|
30
|
+
$if-row-even: #FBEEC1 !default; // list zebra: even rows
|
|
31
|
+
$if-input-bg: #fff8e0 !default; // selects / search input background
|
|
32
|
+
$if-flash-accent: #fade7a !default; // flash border band
|
|
33
|
+
$if-error-bg: #a70f0f !default;
|
|
34
|
+
$if-success-bg: #4f8d0d !default;
|
|
35
|
+
$if-on-dark: #FFFFFF !default; // text/icons on primary/secondary bands
|
|
36
|
+
|
|
37
|
+
:root {
|
|
38
|
+
--if-color-primary: #{$if-primary};
|
|
39
|
+
--if-color-accent: #{$if-accent};
|
|
40
|
+
--if-color-secondary: #{$if-secondary};
|
|
41
|
+
--if-color-header-band: #{$if-header-band};
|
|
42
|
+
--if-color-row-odd: #{$if-row-odd};
|
|
43
|
+
--if-color-row-even: #{$if-row-even};
|
|
44
|
+
--if-color-input-bg: #{$if-input-bg};
|
|
45
|
+
--if-color-input-bg-hover: #{color.adjust($if-input-bg, $lightness: 2%)};
|
|
46
|
+
--if-color-input-bg-focus: #{color.adjust($if-input-bg, $lightness: 5%)};
|
|
47
|
+
--if-color-flash-accent: #{$if-flash-accent};
|
|
48
|
+
--if-color-error-bg: #{$if-error-bg};
|
|
49
|
+
--if-color-success-bg: #{$if-success-bg};
|
|
50
|
+
--if-color-on-dark: #{$if-on-dark};
|
|
51
|
+
// Foundation globals, bridged so body/anchors can be re-themed too.
|
|
52
|
+
--if-color-body-bg: #{$body-background};
|
|
53
|
+
--if-color-body-text: #{$body-font-color};
|
|
54
|
+
--if-color-anchor: #{$anchor-color};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Re-bind the document base styles to the bridge. Foundation's
|
|
58
|
+
// foundation-global-styles emitted the same values from Sass; these rules
|
|
59
|
+
// win by cascade order and change nothing until a variable is overridden.
|
|
60
|
+
body {
|
|
61
|
+
background: var(--if-color-body-bg);
|
|
62
|
+
color: var(--if-color-body-text);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
a {
|
|
66
|
+
color: var(--if-color-anchor);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// ---------------------------------------------------------------------------
|
|
70
|
+
// Preset themes (Pattern 1, stuff/user-preferences-and-theming.md).
|
|
71
|
+
// The engine layouts put `theme-<name>` on <body> via
|
|
72
|
+
// inline_forms_body_theme_class; a host user model opts in by responding to
|
|
73
|
+
// #inline_forms_theme (installer-generated user models store an integer
|
|
74
|
+
// `theme` column and map it). `theme-default` is the :root palette above.
|
|
75
|
+
// ---------------------------------------------------------------------------
|
|
76
|
+
|
|
77
|
+
body.theme-dark {
|
|
78
|
+
--if-color-primary: #7d2a15;
|
|
79
|
+
--if-color-accent: #d0603f;
|
|
80
|
+
--if-color-secondary: #6b5a22;
|
|
81
|
+
--if-color-header-band: #7a6829;
|
|
82
|
+
--if-color-row-odd: #2e2a20;
|
|
83
|
+
--if-color-row-even: #262319;
|
|
84
|
+
--if-color-input-bg: #2c2820;
|
|
85
|
+
--if-color-input-bg-hover: #332e25;
|
|
86
|
+
--if-color-input-bg-focus: #3a352b;
|
|
87
|
+
--if-color-flash-accent: #7a6829;
|
|
88
|
+
--if-color-body-bg: #1c1a16;
|
|
89
|
+
--if-color-body-text: #e8e4da;
|
|
90
|
+
--if-color-anchor: #e0a179;
|
|
91
|
+
|
|
92
|
+
// Foundation's body/input styles are compiled from Sass (light palette);
|
|
93
|
+
// patch the pieces the chrome uses that are not variable-driven.
|
|
94
|
+
input, select, textarea, trix-editor {
|
|
95
|
+
background-color: var(--if-color-input-bg);
|
|
96
|
+
color: var(--if-color-body-text);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
body.theme-sepia {
|
|
101
|
+
--if-color-primary: #8a4a2a;
|
|
102
|
+
--if-color-accent: #a35a32;
|
|
103
|
+
--if-color-secondary: #d4b45a;
|
|
104
|
+
--if-color-header-band: #dcc078;
|
|
105
|
+
--if-color-row-odd: #ece0c0;
|
|
106
|
+
--if-color-row-even: #f2ead2;
|
|
107
|
+
--if-color-input-bg: #fdf6e3;
|
|
108
|
+
--if-color-input-bg-hover: #fffaf0;
|
|
109
|
+
--if-color-input-bg-focus: #fffdf7;
|
|
110
|
+
--if-color-flash-accent: #dcc078;
|
|
111
|
+
--if-color-body-bg: #f4ecd8;
|
|
112
|
+
--if-color-body-text: #5b4636;
|
|
113
|
+
--if-color-anchor: #8b5e3c;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
body.theme-high-contrast {
|
|
117
|
+
--if-color-primary: #000000;
|
|
118
|
+
--if-color-accent: #b30000;
|
|
119
|
+
--if-color-secondary: #ffd500;
|
|
120
|
+
--if-color-header-band: #ffe066;
|
|
121
|
+
--if-color-row-odd: #ffffff;
|
|
122
|
+
--if-color-row-even: #ededed;
|
|
123
|
+
--if-color-input-bg: #ffffff;
|
|
124
|
+
--if-color-input-bg-hover: #f5f5f5;
|
|
125
|
+
--if-color-input-bg-focus: #ffffff;
|
|
126
|
+
--if-color-flash-accent: #ffd500;
|
|
127
|
+
--if-color-body-bg: #ffffff;
|
|
128
|
+
--if-color-body-text: #000000;
|
|
129
|
+
--if-color-anchor: #0000d6;
|
|
130
|
+
|
|
131
|
+
a, .top-level a {
|
|
132
|
+
text-decoration: underline;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
@
|
|
1
|
+
// Open Sans @font-face lives in inline_forms_fonts.css.erb (self-hosted,
|
|
2
|
+
// Sprockets-served; linked from the layouts) — no external font CDN.
|
|
2
3
|
@import 'foundation_and_overrides';
|
|
3
4
|
|
|
4
5
|
// Devise pages have only `.contain-to-grid` as the top-bar wrapper (no
|
|
5
6
|
// `.fixed` variant), so constrain it directly to the F5 1000px row
|
|
6
7
|
// width and center it. Matches the logged-in chrome's banner.
|
|
7
8
|
.contain-to-grid {
|
|
8
|
-
background-color:
|
|
9
|
+
background-color: var(--if-color-body-bg) !important;
|
|
9
10
|
max-width: 62.5rem;
|
|
10
11
|
margin: 0 auto;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
#inline_forms_devise_outer_container a {
|
|
14
|
-
color:
|
|
15
|
+
color: var(--if-color-primary);
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
// Foundation 6's default `.top-bar` adds 0.5rem padding and gives every
|
|
@@ -23,13 +24,13 @@
|
|
|
23
24
|
padding: 0;
|
|
24
25
|
min-height: 0;
|
|
25
26
|
height: 45px;
|
|
26
|
-
background-color:
|
|
27
|
+
background-color: var(--if-color-primary);
|
|
27
28
|
.top-bar-left,
|
|
28
29
|
.menu,
|
|
29
30
|
.menu li,
|
|
30
31
|
.menu a {
|
|
31
|
-
background-color:
|
|
32
|
-
color:
|
|
32
|
+
background-color: var(--if-color-primary);
|
|
33
|
+
color: var(--if-color-on-dark);
|
|
33
34
|
}
|
|
34
35
|
.menu-text {
|
|
35
36
|
padding: 0 1rem;
|
|
@@ -44,15 +45,15 @@
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
#inline_forms_devise_top_nav_bar a {
|
|
47
|
-
color:
|
|
48
|
+
color: var(--if-color-on-dark);
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
#inline_forms_devise_flash_div {
|
|
51
|
-
border-top: 0.5em solid
|
|
52
|
+
border-top: 0.5em solid var(--if-color-flash-accent);
|
|
52
53
|
.flash {
|
|
53
54
|
margin-top: 0.2em;
|
|
54
55
|
padding: 0.5em;
|
|
55
|
-
color:
|
|
56
|
+
color: var(--if-color-primary);
|
|
56
57
|
font-size: 130%;
|
|
57
58
|
font-weight: bold;
|
|
58
59
|
line-height: 120%;
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
h1 {
|
|
66
67
|
text-align: center;
|
|
67
68
|
margin: 30px 0;
|
|
68
|
-
color:
|
|
69
|
+
color: var(--if-color-primary);
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
|
|
@@ -91,9 +92,9 @@
|
|
|
91
92
|
top: 15px;
|
|
92
93
|
}
|
|
93
94
|
#error_explanation {
|
|
94
|
-
color:
|
|
95
|
+
color: var(--if-color-primary);
|
|
95
96
|
h2 {
|
|
96
|
-
color:
|
|
97
|
+
color: var(--if-color-primary);
|
|
97
98
|
font-size: 120%;
|
|
98
99
|
font-weight: bolder;
|
|
99
100
|
}
|
|
@@ -112,7 +113,7 @@
|
|
|
112
113
|
h1 {
|
|
113
114
|
text-align: center;
|
|
114
115
|
margin: 0 0 0.5em 0;
|
|
115
|
-
color:
|
|
116
|
+
color: var(--if-color-primary);
|
|
116
117
|
font-weight: bolder;
|
|
117
118
|
}
|
|
118
119
|
|
|
@@ -53,6 +53,10 @@ $body-font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Roboto, Arial, sans
|
|
|
53
53
|
@include foundation-visibility-classes;
|
|
54
54
|
@include foundation-float-classes;
|
|
55
55
|
|
|
56
|
+
// Theme bridge: palette as CSS custom properties (must come after
|
|
57
|
+
// 'foundation' so it can read $body-background / $anchor-color).
|
|
58
|
+
@import 'theme';
|
|
59
|
+
|
|
56
60
|
@import '../../../vendor/assets/stylesheets/tippy.css';
|
|
57
61
|
|
|
58
62
|
.validation-hints-source[hidden] {
|