alchemy_cms 7.0.0.pre.a → 7.0.0.pre.c
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/brakeman-analysis.yml +2 -2
- data/.github/workflows/lint.yml +37 -0
- data/.github/workflows/{ci.yml → test.yml} +8 -8
- data/.gitignore +0 -5
- data/.hound.yml +2 -3
- data/.rubocop.yml +4 -350
- data/.standard.yml +3 -0
- data/CHANGELOG.md +33 -0
- data/Gemfile +3 -2
- data/README.md +10 -12
- data/Rakefile +0 -19
- data/alchemy_cms.gemspec +4 -2
- data/app/assets/config/alchemy_manifest.js +1 -0
- data/app/assets/javascripts/alchemy/admin.js +0 -2
- data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +5 -12
- data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +6 -1
- data/app/assets/stylesheets/alchemy/base.scss +2 -2
- data/app/components/alchemy/ingredients/audio_view.rb +37 -0
- data/app/components/alchemy/ingredients/base_view.rb +38 -0
- data/app/components/alchemy/ingredients/boolean_view.rb +13 -0
- data/app/components/alchemy/ingredients/datetime_view.rb +22 -0
- data/app/components/alchemy/ingredients/file_view.rb +40 -0
- data/app/components/alchemy/ingredients/headline_view.rb +20 -0
- data/app/components/alchemy/ingredients/html_view.rb +9 -0
- data/app/components/alchemy/ingredients/link_view.rb +25 -0
- data/app/components/alchemy/ingredients/node_view.rb +11 -0
- data/app/components/alchemy/ingredients/page_view.rb +15 -0
- data/app/components/alchemy/ingredients/picture_view.rb +108 -0
- data/app/components/alchemy/ingredients/richtext_view.rb +22 -0
- data/app/components/alchemy/ingredients/select_view.rb +6 -0
- data/app/components/alchemy/ingredients/text_view.rb +41 -0
- data/app/components/alchemy/ingredients/video_view.rb +39 -0
- data/app/controllers/alchemy/admin/attachments_controller.rb +3 -3
- data/app/controllers/alchemy/admin/base_controller.rb +7 -7
- data/app/controllers/alchemy/admin/clipboard_controller.rb +2 -2
- data/app/controllers/alchemy/admin/elements_controller.rb +26 -11
- data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
- data/app/controllers/alchemy/admin/nodes_controller.rb +2 -2
- data/app/controllers/alchemy/admin/pages_controller.rb +10 -10
- data/app/controllers/alchemy/admin/pictures_controller.rb +14 -14
- data/app/controllers/alchemy/admin/resources_controller.rb +27 -28
- data/app/controllers/alchemy/admin/styleguide_controller.rb +1 -0
- data/app/controllers/alchemy/admin/tags_controller.rb +11 -11
- data/app/controllers/alchemy/api/base_controller.rb +2 -2
- data/app/controllers/alchemy/api/elements_controller.rb +11 -11
- data/app/controllers/alchemy/api/ingredients_controller.rb +1 -1
- data/app/controllers/alchemy/api/nodes_controller.rb +1 -1
- data/app/controllers/alchemy/api/pages_controller.rb +11 -11
- data/app/controllers/alchemy/attachments_controller.rb +3 -3
- data/app/controllers/alchemy/base_controller.rb +1 -8
- data/app/controllers/alchemy/messages_controller.rb +9 -9
- data/app/controllers/alchemy/pages_controller.rb +8 -19
- data/app/controllers/concerns/alchemy/admin/archive_overlay.rb +1 -0
- data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +5 -7
- data/app/controllers/concerns/alchemy/legacy_page_redirects.rb +5 -5
- data/app/decorators/alchemy/element_editor.rb +4 -4
- data/app/decorators/alchemy/ingredient_editor.rb +6 -6
- data/app/helpers/alchemy/admin/attachments_helper.rb +1 -1
- data/app/helpers/alchemy/admin/base_helper.rb +21 -22
- data/app/helpers/alchemy/admin/elements_helper.rb +1 -1
- data/app/helpers/alchemy/admin/form_helper.rb +1 -1
- data/app/helpers/alchemy/admin/navigation_helper.rb +7 -7
- data/app/helpers/alchemy/admin/pages_helper.rb +2 -2
- data/app/helpers/alchemy/admin/tags_helper.rb +3 -3
- data/app/helpers/alchemy/base_helper.rb +2 -2
- data/app/helpers/alchemy/elements_block_helper.rb +9 -7
- data/app/helpers/alchemy/elements_helper.rb +12 -12
- data/app/helpers/alchemy/pages_helper.rb +11 -11
- data/app/helpers/alchemy/url_helper.rb +1 -1
- data/{package/src → app/javascript/alchemy_admin}/datepicker.js +1 -0
- data/{package/src → app/javascript/alchemy_admin}/node_tree.js +2 -2
- data/{package/src → app/javascript/alchemy_admin}/page_publication_fields.js +1 -1
- data/{package/src → app/javascript/alchemy_admin}/page_sorter.js +1 -1
- data/{package/src → app/javascript/alchemy_admin}/picture_editors.js +2 -2
- data/{package/src → app/javascript/alchemy_admin}/sitemap.js +4 -4
- data/app/javascript/alchemy_admin/tinymce.js +142 -0
- data/app/javascript/alchemy_admin.js +34 -0
- data/app/mailers/alchemy/messages_mailer.rb +1 -1
- data/app/models/alchemy/attachment.rb +6 -6
- data/app/models/alchemy/base_record.rb +1 -0
- data/app/models/alchemy/eager_loading.rb +6 -6
- data/app/models/alchemy/element/definitions.rb +1 -1
- data/app/models/alchemy/element/element_ingredients.rb +3 -3
- data/app/models/alchemy/element.rb +2 -2
- data/app/models/alchemy/elements_repository.rb +1 -1
- data/app/models/alchemy/image_cropper_settings.rb +2 -2
- data/app/models/alchemy/ingredient.rb +14 -12
- data/app/models/alchemy/ingredient_validator.rb +1 -1
- data/app/models/alchemy/ingredients/datetime.rb +1 -1
- data/app/models/alchemy/ingredients/file.rb +5 -5
- data/app/models/alchemy/ingredients/headline.rb +4 -4
- data/app/models/alchemy/ingredients/picture.rb +27 -9
- data/app/models/alchemy/ingredients/richtext.rb +15 -12
- data/app/models/alchemy/ingredients/text.rb +6 -6
- data/app/models/alchemy/language/code.rb +1 -1
- data/app/models/alchemy/language.rb +4 -4
- data/app/models/alchemy/legacy_page_url.rb +1 -1
- data/app/models/alchemy/node.rb +2 -2
- data/app/models/alchemy/page/page_elements.rb +14 -14
- data/app/models/alchemy/page/page_naming.rb +4 -4
- data/app/models/alchemy/page/page_natures.rb +1 -1
- data/app/models/alchemy/page/page_scopes.rb +5 -5
- data/app/models/alchemy/page.rb +11 -11
- data/app/models/alchemy/picture/calculations.rb +2 -2
- data/app/models/alchemy/picture/transformations.rb +2 -2
- data/app/models/alchemy/picture/url.rb +4 -4
- data/app/models/alchemy/picture.rb +11 -10
- data/app/models/alchemy/picture_thumb/create.rb +1 -1
- data/app/models/alchemy/picture_thumb.rb +1 -1
- data/app/models/alchemy/picture_variant.rb +2 -3
- data/app/models/alchemy/tag.rb +8 -0
- data/app/models/concerns/alchemy/picture_thumbnails.rb +6 -6
- data/app/serializers/alchemy/base_serializer.rb +1 -1
- data/app/serializers/alchemy/page_tree_serializer.rb +7 -7
- data/app/services/alchemy/duplicate_element.rb +3 -3
- data/app/services/alchemy/tag_validations.rb +1 -1
- data/app/views/alchemy/_menubar.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/_replace_button.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/destroy.js.erb +1 -1
- data/app/views/alchemy/admin/elements/_element.html.erb +3 -0
- data/app/views/alchemy/admin/nodes/index.html.erb +4 -2
- data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +1 -1
- data/app/views/alchemy/admin/pages/edit.html.erb +3 -7
- data/app/views/alchemy/admin/pages/index.html.erb +1 -1
- data/app/views/alchemy/admin/pages/update.js.erb +12 -6
- data/app/views/alchemy/admin/pictures/_infos.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_filter_bar.html.erb +1 -1
- data/app/views/alchemy/admin/styleguide/index.html.erb +1 -1
- data/app/views/alchemy/admin/uploader/_button.html.erb +1 -1
- data/app/views/alchemy/base/permission_denied.js.erb +1 -1
- data/app/views/alchemy/base/redirect.js.erb +1 -1
- data/app/views/alchemy/ingredients/_audio_view.html.erb +1 -14
- data/app/views/alchemy/ingredients/_boolean_view.html.erb +1 -1
- data/app/views/alchemy/ingredients/_datetime_view.html.erb +3 -9
- data/app/views/alchemy/ingredients/_file_view.html.erb +3 -16
- data/app/views/alchemy/ingredients/_headline_view.html.erb +4 -10
- data/app/views/alchemy/ingredients/_html_view.html.erb +1 -1
- data/app/views/alchemy/ingredients/_link_view.html.erb +4 -9
- data/app/views/alchemy/ingredients/_node_view.html.erb +1 -1
- data/app/views/alchemy/ingredients/_page_view.html.erb +1 -4
- data/app/views/alchemy/ingredients/_picture_view.html.erb +4 -5
- data/app/views/alchemy/ingredients/_richtext_editor.html.erb +11 -2
- data/app/views/alchemy/ingredients/_richtext_view.html.erb +3 -3
- data/app/views/alchemy/ingredients/_select_view.html.erb +1 -1
- data/app/views/alchemy/ingredients/_text_view.html.erb +3 -19
- data/app/views/alchemy/ingredients/_video_view.html.erb +3 -18
- data/app/views/alchemy/ingredients/shared/_link_tools.html.erb +1 -0
- data/app/views/alchemy/ingredients/shared/_picture_tools.html.erb +1 -0
- data/app/views/layouts/alchemy/admin.html.erb +9 -15
- data/bin/importmap +4 -0
- data/bin/setup +28 -0
- data/bin/start +17 -0
- data/config/brakeman.ignore +0 -46
- data/config/importmap.rb +8 -0
- data/config/initializers/assets.rb +1 -0
- data/config/initializers/dragonfly.rb +1 -0
- data/config/initializers/mime_types.rb +1 -0
- data/config/initializers/mini_profiler.rb +1 -0
- data/config/initializers/simple_form.rb +3 -2
- data/config/locales/alchemy.en.yml +1 -1
- data/config/routes.rb +21 -20
- data/config/spring.rb +1 -0
- data/db/migrate/20230121212637_alchemy_six_point_one.rb +8 -8
- data/db/migrate/20230505132743_add_indexes_to_alchemy_pictures.rb +6 -0
- data/lib/alchemy/admin/locale.rb +3 -3
- data/lib/alchemy/admin/preview_url.rb +2 -2
- data/lib/alchemy/auth_accessors.rb +1 -1
- data/lib/alchemy/config.rb +1 -1
- data/lib/alchemy/controller_actions.rb +4 -4
- data/lib/alchemy/deprecation.rb +1 -0
- data/lib/alchemy/dragonfly/processors/thumbnail.rb +1 -1
- data/lib/alchemy/element_definition.rb +2 -2
- data/lib/alchemy/engine.rb +16 -1
- data/lib/alchemy/filetypes.rb +7 -7
- data/lib/alchemy/forms/builder.rb +4 -4
- data/lib/alchemy/i18n.rb +6 -4
- data/lib/alchemy/install/tasks.rb +2 -1
- data/lib/alchemy/name_conversions.rb +1 -1
- data/lib/alchemy/page_layout.rb +1 -1
- data/lib/alchemy/permissions.rb +5 -4
- data/lib/alchemy/resource.rb +10 -10
- data/lib/alchemy/resources_helper.rb +7 -7
- data/lib/alchemy/routing_constraints.rb +2 -2
- data/lib/alchemy/seeder.rb +12 -5
- data/lib/alchemy/shell.rb +2 -1
- data/lib/alchemy/taggable.rb +3 -2
- data/lib/alchemy/tasks/tidy.rb +1 -0
- data/lib/alchemy/test_support/capybara_helpers.rb +1 -1
- data/lib/alchemy/test_support/config_stubbing.rb +1 -0
- data/lib/alchemy/test_support/factories/element_factory.rb +4 -0
- data/lib/alchemy/test_support/factories/page_factory.rb +2 -2
- data/lib/alchemy/test_support/having_crop_action_examples.rb +9 -9
- data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +33 -33
- data/lib/alchemy/test_support/integration_helpers.rb +4 -3
- data/lib/alchemy/test_support/shared_contexts.rb +2 -1
- data/lib/alchemy/test_support/shared_dom_ids_examples.rb +9 -9
- data/lib/alchemy/test_support/shared_ingredient_examples.rb +12 -6
- data/lib/alchemy/test_support/shared_uploader_examples.rb +1 -0
- data/lib/alchemy/tinymce.rb +3 -26
- data/lib/alchemy/upgrader/seven_point_zero.rb +13 -23
- data/lib/alchemy/upgrader.rb +1 -11
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy.rb +5 -0
- data/lib/alchemy_cms.rb +3 -1
- data/lib/generators/alchemy/base.rb +3 -2
- data/lib/generators/alchemy/elements/elements_generator.rb +2 -1
- data/lib/generators/alchemy/ingredient/ingredient_generator.rb +1 -0
- data/lib/generators/alchemy/install/files/application.html.erb +2 -2
- data/lib/generators/alchemy/install/install_generator.rb +2 -25
- data/lib/generators/alchemy/module/module_generator.rb +1 -0
- data/lib/generators/alchemy/page_layouts/page_layouts_generator.rb +1 -0
- data/lib/generators/alchemy/site_layouts/site_layouts_generator.rb +1 -0
- data/lib/generators/alchemy/views/views_generator.rb +2 -1
- data/lib/tasks/alchemy/thumbnails.rake +5 -5
- data/lib/tasks/alchemy/tidy.rake +1 -0
- data/lib/tasks/alchemy/upgrade.rake +10 -15
- data/package.json +6 -26
- metadata +80 -31
- data/app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee +0 -93
- data/app/presenters/alchemy/picture_view.rb +0 -88
- data/app/views/alchemy/admin/pages/_tinymce_custom_config.html.erb +0 -10
- data/package/admin.js +0 -32
- data/package/dist/admin.js +0 -16
- data/package/dist/admin.js.map +0 -7
- data/package/src/__tests__/i18n.spec.js +0 -93
- data/package/src/utils/__tests__/ajax.spec.js +0 -168
- data/package/src/utils/__tests__/events.spec.js +0 -38
- /data/{package/src → app/javascript/alchemy_admin}/file_editors.js +0 -0
- /data/{package/src → app/javascript/alchemy_admin}/i18n.js +0 -0
- /data/{package/src → app/javascript/alchemy_admin}/image_cropper.js +0 -0
- /data/{package/src → app/javascript/alchemy_admin}/image_loader.js +0 -0
- /data/{package/src → app/javascript/alchemy_admin}/ingredient_anchor_link.js +0 -0
- /data/{package/src → app/javascript/alchemy_admin}/translations.js +0 -0
- /data/{package/src → app/javascript/alchemy_admin}/utils/ajax.js +0 -0
- /data/{package/src → app/javascript/alchemy_admin}/utils/events.js +0 -0
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.0.pre.
|
4
|
+
version: 7.0.0.pre.c
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2023-
|
16
|
+
date: 2023-06-30 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: actionmailer
|
@@ -325,6 +325,26 @@ dependencies:
|
|
325
325
|
- - "~>"
|
326
326
|
- !ruby/object:Gem::Version
|
327
327
|
version: '0.23'
|
328
|
+
- !ruby/object:Gem::Dependency
|
329
|
+
name: importmap-rails
|
330
|
+
requirement: !ruby/object:Gem::Requirement
|
331
|
+
requirements:
|
332
|
+
- - "~>"
|
333
|
+
- !ruby/object:Gem::Version
|
334
|
+
version: '1.2'
|
335
|
+
- - ">="
|
336
|
+
- !ruby/object:Gem::Version
|
337
|
+
version: 1.2.1
|
338
|
+
type: :runtime
|
339
|
+
prerelease: false
|
340
|
+
version_requirements: !ruby/object:Gem::Requirement
|
341
|
+
requirements:
|
342
|
+
- - "~>"
|
343
|
+
- !ruby/object:Gem::Version
|
344
|
+
version: '1.2'
|
345
|
+
- - ">="
|
346
|
+
- !ruby/object:Gem::Version
|
347
|
+
version: 1.2.1
|
328
348
|
- !ruby/object:Gem::Dependency
|
329
349
|
name: jquery-rails
|
330
350
|
requirement: !ruby/object:Gem::Requirement
|
@@ -496,19 +516,33 @@ dependencies:
|
|
496
516
|
- !ruby/object:Gem::Version
|
497
517
|
version: '5'
|
498
518
|
- !ruby/object:Gem::Dependency
|
499
|
-
name:
|
519
|
+
name: turbo-rails
|
500
520
|
requirement: !ruby/object:Gem::Requirement
|
501
521
|
requirements:
|
502
522
|
- - ">="
|
503
523
|
- !ruby/object:Gem::Version
|
504
|
-
version: '
|
524
|
+
version: '1.4'
|
505
525
|
type: :runtime
|
506
526
|
prerelease: false
|
507
527
|
version_requirements: !ruby/object:Gem::Requirement
|
508
528
|
requirements:
|
509
529
|
- - ">="
|
510
530
|
- !ruby/object:Gem::Version
|
511
|
-
version: '
|
531
|
+
version: '1.4'
|
532
|
+
- !ruby/object:Gem::Dependency
|
533
|
+
name: view_component
|
534
|
+
requirement: !ruby/object:Gem::Requirement
|
535
|
+
requirements:
|
536
|
+
- - "~>"
|
537
|
+
- !ruby/object:Gem::Version
|
538
|
+
version: '3.0'
|
539
|
+
type: :runtime
|
540
|
+
prerelease: false
|
541
|
+
version_requirements: !ruby/object:Gem::Requirement
|
542
|
+
requirements:
|
543
|
+
- - "~>"
|
544
|
+
- !ruby/object:Gem::Version
|
545
|
+
version: '3.0'
|
512
546
|
- !ruby/object:Gem::Dependency
|
513
547
|
name: capybara
|
514
548
|
requirement: !ruby/object:Gem::Requirement
|
@@ -691,14 +725,16 @@ files:
|
|
691
725
|
- ".github/ISSUE_TEMPLATE/Feature_request.md"
|
692
726
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
693
727
|
- ".github/workflows/brakeman-analysis.yml"
|
694
|
-
- ".github/workflows/
|
728
|
+
- ".github/workflows/lint.yml"
|
695
729
|
- ".github/workflows/stale.yml"
|
730
|
+
- ".github/workflows/test.yml"
|
696
731
|
- ".gitignore"
|
697
732
|
- ".hound.yml"
|
698
733
|
- ".localeapp/config.rb"
|
699
734
|
- ".prettierrc"
|
700
735
|
- ".rspec"
|
701
736
|
- ".rubocop.yml"
|
737
|
+
- ".standard.yml"
|
702
738
|
- ".yardopts"
|
703
739
|
- CHANGELOG.md
|
704
740
|
- CODE_OF_CONDUCT.md
|
@@ -743,7 +779,6 @@ files:
|
|
743
779
|
- app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee
|
744
780
|
- app/assets/javascripts/alchemy/alchemy.spinner.js
|
745
781
|
- app/assets/javascripts/alchemy/alchemy.string_extension.js.coffee
|
746
|
-
- app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee
|
747
782
|
- app/assets/javascripts/alchemy/alchemy.tooltips.coffee
|
748
783
|
- app/assets/javascripts/alchemy/alchemy.uploader.js.coffee
|
749
784
|
- app/assets/javascripts/alchemy/menubar.js.coffee
|
@@ -817,6 +852,21 @@ files:
|
|
817
852
|
- app/assets/stylesheets/tinymce/skins/alchemy/img/object.gif
|
818
853
|
- app/assets/stylesheets/tinymce/skins/alchemy/img/trans.gif
|
819
854
|
- app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss
|
855
|
+
- app/components/alchemy/ingredients/audio_view.rb
|
856
|
+
- app/components/alchemy/ingredients/base_view.rb
|
857
|
+
- app/components/alchemy/ingredients/boolean_view.rb
|
858
|
+
- app/components/alchemy/ingredients/datetime_view.rb
|
859
|
+
- app/components/alchemy/ingredients/file_view.rb
|
860
|
+
- app/components/alchemy/ingredients/headline_view.rb
|
861
|
+
- app/components/alchemy/ingredients/html_view.rb
|
862
|
+
- app/components/alchemy/ingredients/link_view.rb
|
863
|
+
- app/components/alchemy/ingredients/node_view.rb
|
864
|
+
- app/components/alchemy/ingredients/page_view.rb
|
865
|
+
- app/components/alchemy/ingredients/picture_view.rb
|
866
|
+
- app/components/alchemy/ingredients/richtext_view.rb
|
867
|
+
- app/components/alchemy/ingredients/select_view.rb
|
868
|
+
- app/components/alchemy/ingredients/text_view.rb
|
869
|
+
- app/components/alchemy/ingredients/video_view.rb
|
820
870
|
- app/controllers/alchemy/admin/attachments_controller.rb
|
821
871
|
- app/controllers/alchemy/admin/base_controller.rb
|
822
872
|
- app/controllers/alchemy/admin/clipboard_controller.rb
|
@@ -865,6 +915,22 @@ files:
|
|
865
915
|
- app/helpers/alchemy/elements_helper.rb
|
866
916
|
- app/helpers/alchemy/pages_helper.rb
|
867
917
|
- app/helpers/alchemy/url_helper.rb
|
918
|
+
- app/javascript/alchemy_admin.js
|
919
|
+
- app/javascript/alchemy_admin/datepicker.js
|
920
|
+
- app/javascript/alchemy_admin/file_editors.js
|
921
|
+
- app/javascript/alchemy_admin/i18n.js
|
922
|
+
- app/javascript/alchemy_admin/image_cropper.js
|
923
|
+
- app/javascript/alchemy_admin/image_loader.js
|
924
|
+
- app/javascript/alchemy_admin/ingredient_anchor_link.js
|
925
|
+
- app/javascript/alchemy_admin/node_tree.js
|
926
|
+
- app/javascript/alchemy_admin/page_publication_fields.js
|
927
|
+
- app/javascript/alchemy_admin/page_sorter.js
|
928
|
+
- app/javascript/alchemy_admin/picture_editors.js
|
929
|
+
- app/javascript/alchemy_admin/sitemap.js
|
930
|
+
- app/javascript/alchemy_admin/tinymce.js
|
931
|
+
- app/javascript/alchemy_admin/translations.js
|
932
|
+
- app/javascript/alchemy_admin/utils/ajax.js
|
933
|
+
- app/javascript/alchemy_admin/utils/events.js
|
868
934
|
- app/jobs/alchemy/base_job.rb
|
869
935
|
- app/jobs/alchemy/publish_page_job.rb
|
870
936
|
- app/mailers/alchemy/base_mailer.rb
|
@@ -931,7 +997,6 @@ files:
|
|
931
997
|
- app/models/concerns/alchemy/dom_ids.rb
|
932
998
|
- app/models/concerns/alchemy/picture_thumbnails.rb
|
933
999
|
- app/models/concerns/alchemy/touch_elements.rb
|
934
|
-
- app/presenters/alchemy/picture_view.rb
|
935
1000
|
- app/serializers/alchemy/attachment_serializer.rb
|
936
1001
|
- app/serializers/alchemy/base_serializer.rb
|
937
1002
|
- app/serializers/alchemy/element_serializer.rb
|
@@ -1034,7 +1099,6 @@ files:
|
|
1034
1099
|
- app/views/alchemy/admin/pages/_sitemap.html.erb
|
1035
1100
|
- app/views/alchemy/admin/pages/_table.html.erb
|
1036
1101
|
- app/views/alchemy/admin/pages/_table_row.html.erb
|
1037
|
-
- app/views/alchemy/admin/pages/_tinymce_custom_config.html.erb
|
1038
1102
|
- app/views/alchemy/admin/pages/_toolbar.html.erb
|
1039
1103
|
- app/views/alchemy/admin/pages/configure.html.erb
|
1040
1104
|
- app/views/alchemy/admin/pages/edit.html.erb
|
@@ -1163,11 +1227,15 @@ files:
|
|
1163
1227
|
- app/views/layouts/alchemy/admin.html.erb
|
1164
1228
|
- app/views/layouts/alchemy/sitemap.xml.erb
|
1165
1229
|
- babel.config.js
|
1230
|
+
- bin/importmap
|
1166
1231
|
- bin/rails
|
1167
1232
|
- bin/rspec
|
1233
|
+
- bin/setup
|
1234
|
+
- bin/start
|
1168
1235
|
- config/alchemy/config.yml
|
1169
1236
|
- config/alchemy/modules.yml
|
1170
1237
|
- config/brakeman.ignore
|
1238
|
+
- config/importmap.rb
|
1171
1239
|
- config/initializers/assets.rb
|
1172
1240
|
- config/initializers/dragonfly.rb
|
1173
1241
|
- config/initializers/mime_types.rb
|
@@ -1178,6 +1246,7 @@ files:
|
|
1178
1246
|
- config/spring.rb
|
1179
1247
|
- db/migrate/20230121212637_alchemy_six_point_one.rb
|
1180
1248
|
- db/migrate/20230123112425_add_searchable_to_alchemy_pages.rb
|
1249
|
+
- db/migrate/20230505132743_add_indexes_to_alchemy_pictures.rb
|
1181
1250
|
- lib/alchemy.rb
|
1182
1251
|
- lib/alchemy/ability_helper.rb
|
1183
1252
|
- lib/alchemy/admin/locale.rb
|
@@ -1297,26 +1366,6 @@ files:
|
|
1297
1366
|
- lib/tasks/alchemy/tidy.rake
|
1298
1367
|
- lib/tasks/alchemy/upgrade.rake
|
1299
1368
|
- package.json
|
1300
|
-
- package/admin.js
|
1301
|
-
- package/dist/admin.js
|
1302
|
-
- package/dist/admin.js.map
|
1303
|
-
- package/src/__tests__/i18n.spec.js
|
1304
|
-
- package/src/datepicker.js
|
1305
|
-
- package/src/file_editors.js
|
1306
|
-
- package/src/i18n.js
|
1307
|
-
- package/src/image_cropper.js
|
1308
|
-
- package/src/image_loader.js
|
1309
|
-
- package/src/ingredient_anchor_link.js
|
1310
|
-
- package/src/node_tree.js
|
1311
|
-
- package/src/page_publication_fields.js
|
1312
|
-
- package/src/page_sorter.js
|
1313
|
-
- package/src/picture_editors.js
|
1314
|
-
- package/src/sitemap.js
|
1315
|
-
- package/src/translations.js
|
1316
|
-
- package/src/utils/__tests__/ajax.spec.js
|
1317
|
-
- package/src/utils/__tests__/events.spec.js
|
1318
|
-
- package/src/utils/ajax.js
|
1319
|
-
- package/src/utils/events.js
|
1320
1369
|
- vendor/assets/fonts/fa-regular-400.eot
|
1321
1370
|
- vendor/assets/fonts/fa-regular-400.svg
|
1322
1371
|
- vendor/assets/fonts/fa-regular-400.ttf
|
@@ -1391,7 +1440,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1391
1440
|
requirements:
|
1392
1441
|
- - ">="
|
1393
1442
|
- !ruby/object:Gem::Version
|
1394
|
-
version:
|
1443
|
+
version: 3.0.0
|
1395
1444
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1396
1445
|
requirements:
|
1397
1446
|
- - ">"
|
@@ -1399,7 +1448,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1399
1448
|
version: 1.3.1
|
1400
1449
|
requirements:
|
1401
1450
|
- ImageMagick (libmagick), v6.6 or greater.
|
1402
|
-
rubygems_version: 3.4.
|
1451
|
+
rubygems_version: 3.4.12
|
1403
1452
|
signing_key:
|
1404
1453
|
specification_version: 4
|
1405
1454
|
summary: A powerful, userfriendly and flexible CMS for Rails
|
@@ -1,93 +0,0 @@
|
|
1
|
-
# Alchemy Tinymce wrapper
|
2
|
-
#
|
3
|
-
$.extend Alchemy.Tinymce,
|
4
|
-
|
5
|
-
customConfigs: {}
|
6
|
-
|
7
|
-
# Returns default config for a tinymce editor.
|
8
|
-
#
|
9
|
-
getDefaultConfig: (id) ->
|
10
|
-
config = @defaults
|
11
|
-
config.language = Alchemy.locale
|
12
|
-
config.selector = "#tinymce_#{id}"
|
13
|
-
config.init_instance_callback = @initInstanceCallback
|
14
|
-
return config
|
15
|
-
|
16
|
-
# Returns configuration for given custom tinymce editor selector.
|
17
|
-
#
|
18
|
-
# It uses the +.getDefaultConfig+ and merges the custom parts.
|
19
|
-
#
|
20
|
-
getConfig: (id, selector) ->
|
21
|
-
editor_config = @customConfigs[selector]
|
22
|
-
if editor_config
|
23
|
-
$.extend({}, @getDefaultConfig(id), editor_config)
|
24
|
-
else
|
25
|
-
@getDefaultConfig(id)
|
26
|
-
|
27
|
-
# Initializes all TinyMCE editors with given ids
|
28
|
-
#
|
29
|
-
# @param ids [Array]
|
30
|
-
# - Editor ids that should be initialized.
|
31
|
-
#
|
32
|
-
init: (ids) ->
|
33
|
-
for id in ids
|
34
|
-
@initEditor(id)
|
35
|
-
|
36
|
-
# Initializes TinyMCE editor with given options
|
37
|
-
#
|
38
|
-
initWith: (options) ->
|
39
|
-
tinymce.init $.extend({}, @defaults, options)
|
40
|
-
return
|
41
|
-
|
42
|
-
# Initializes one specific TinyMCE editor
|
43
|
-
#
|
44
|
-
# @param id [Number]
|
45
|
-
# - Editor id that should be initialized.
|
46
|
-
#
|
47
|
-
initEditor: (id) ->
|
48
|
-
editor_id = "tinymce_#{id}"
|
49
|
-
textarea = $("##{editor_id}")
|
50
|
-
editor = tinymce.get(editor_id)
|
51
|
-
# remove editor instance, if already initialized
|
52
|
-
editor.remove() if editor
|
53
|
-
if textarea.length == 0
|
54
|
-
console.warn "Could not initialize TinyMCE for textarea#tinymce_#{id}!"
|
55
|
-
return
|
56
|
-
config = @getConfig(id, textarea[0].classList[1])
|
57
|
-
if config
|
58
|
-
spinner = new Alchemy.Spinner('small')
|
59
|
-
textarea.closest('.tinymce_container').prepend spinner.spin().el
|
60
|
-
tinymce.init(config)
|
61
|
-
else
|
62
|
-
console.warn('No tinymce configuration found for', id)
|
63
|
-
|
64
|
-
# Gets called after an editor instance gets intialized
|
65
|
-
#
|
66
|
-
initInstanceCallback: (editor) ->
|
67
|
-
$this = $("##{editor.id}")
|
68
|
-
element = $this.closest('.element-editor')
|
69
|
-
element.find('.spinner').remove()
|
70
|
-
editor.on 'dirty', ->
|
71
|
-
Alchemy.setElementDirty(element)
|
72
|
-
return
|
73
|
-
editor.on 'click', (event) ->
|
74
|
-
event.target = element[0]
|
75
|
-
Alchemy.ElementEditors.onClickElement(event)
|
76
|
-
return
|
77
|
-
return
|
78
|
-
|
79
|
-
# Removes the TinyMCE editor from given dom ids.
|
80
|
-
#
|
81
|
-
remove: (ids) ->
|
82
|
-
for id in ids
|
83
|
-
editor = tinymce.get("tinymce_#{id}")
|
84
|
-
if editor
|
85
|
-
editor.remove()
|
86
|
-
|
87
|
-
# Remove all tinymce instances for given selector
|
88
|
-
removeFrom: (selector) ->
|
89
|
-
$(selector).each ->
|
90
|
-
elem = tinymce.get(this.id)
|
91
|
-
elem.remove() if elem
|
92
|
-
return
|
93
|
-
return
|
@@ -1,88 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Alchemy
|
4
|
-
# Renders a picture ingredient view
|
5
|
-
class PictureView
|
6
|
-
include ActionView::Helpers::AssetTagHelper
|
7
|
-
include ActionView::Helpers::UrlHelper
|
8
|
-
include Rails.application.routes.url_helpers
|
9
|
-
|
10
|
-
attr_reader :ingredient, :html_options, :options, :picture
|
11
|
-
|
12
|
-
DEFAULT_OPTIONS = {
|
13
|
-
show_caption: true,
|
14
|
-
disable_link: false,
|
15
|
-
srcset: [],
|
16
|
-
sizes: [],
|
17
|
-
}.with_indifferent_access
|
18
|
-
|
19
|
-
def initialize(ingredient, options = {}, html_options = {})
|
20
|
-
@ingredient = ingredient
|
21
|
-
@options = DEFAULT_OPTIONS.merge(ingredient.settings).merge(options || {})
|
22
|
-
@html_options = html_options || {}
|
23
|
-
@picture = ingredient.picture
|
24
|
-
end
|
25
|
-
|
26
|
-
def render
|
27
|
-
return if picture.blank?
|
28
|
-
|
29
|
-
output = caption ? img_tag + caption : img_tag
|
30
|
-
|
31
|
-
if is_linked?
|
32
|
-
output = link_to(output, url_for(ingredient.link), {
|
33
|
-
title: ingredient.link_title.presence,
|
34
|
-
target: ingredient.link_target == "blank" ? "_blank" : nil,
|
35
|
-
data: { link_target: ingredient.link_target.presence },
|
36
|
-
})
|
37
|
-
end
|
38
|
-
|
39
|
-
if caption
|
40
|
-
content_tag(:figure, output, { class: ingredient.css_class.presence }.merge(html_options))
|
41
|
-
else
|
42
|
-
output
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def caption
|
47
|
-
return unless show_caption?
|
48
|
-
|
49
|
-
@_caption ||= content_tag(:figcaption, ingredient.caption)
|
50
|
-
end
|
51
|
-
|
52
|
-
def src
|
53
|
-
ingredient.picture_url(options.except(*DEFAULT_OPTIONS.keys))
|
54
|
-
end
|
55
|
-
|
56
|
-
def img_tag
|
57
|
-
@_img_tag ||= image_tag(
|
58
|
-
src, {
|
59
|
-
alt: alt_text,
|
60
|
-
title: ingredient.title.presence,
|
61
|
-
class: caption ? nil : ingredient.css_class.presence,
|
62
|
-
srcset: srcset.join(", ").presence,
|
63
|
-
sizes: options[:sizes].join(", ").presence,
|
64
|
-
}.merge(caption ? {} : html_options)
|
65
|
-
)
|
66
|
-
end
|
67
|
-
|
68
|
-
def show_caption?
|
69
|
-
options[:show_caption] && ingredient.caption.present?
|
70
|
-
end
|
71
|
-
|
72
|
-
def is_linked?
|
73
|
-
!options[:disable_link] && ingredient.link.present?
|
74
|
-
end
|
75
|
-
|
76
|
-
def srcset
|
77
|
-
options[:srcset].map do |size|
|
78
|
-
url = ingredient.picture_url(size: size)
|
79
|
-
width, height = size.split("x")
|
80
|
-
width.present? ? "#{url} #{width}w" : "#{url} #{height}h"
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
def alt_text
|
85
|
-
ingredient.alt_tag.presence || html_options.delete(:alt) || ingredient.picture.name&.humanize
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<script>
|
2
|
-
// Populate custom tinymce configurations
|
3
|
-
<% Alchemy::Tinymce.custom_config_ingredients(@page).each do |ingredient| %>
|
4
|
-
Alchemy.Tinymce.customConfigs["<%= ingredient['element'] %>_<%= ingredient['role'] %>"] = {
|
5
|
-
<% ingredient.fetch('settings', {}).fetch('tinymce', {}).each do |k, v| %>
|
6
|
-
<%= k %>: <%== v.to_json %>,
|
7
|
-
<% end %>
|
8
|
-
};
|
9
|
-
<% end %>
|
10
|
-
</script>
|
data/package/admin.js
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
import translate from "./src/i18n"
|
2
|
-
import translationData from "./src/translations"
|
3
|
-
import NodeTree from "./src/node_tree"
|
4
|
-
import fileEditors from "./src/file_editors"
|
5
|
-
import IngredientAnchorLink from "./src/ingredient_anchor_link"
|
6
|
-
import pictureEditors from "./src/picture_editors"
|
7
|
-
import ImageLoader from "./src/image_loader"
|
8
|
-
import ImageCropper from "./src/image_cropper"
|
9
|
-
import Datepicker from "./src/datepicker"
|
10
|
-
import Sitemap from "./src/sitemap"
|
11
|
-
import PagePublicationFields from "./src/page_publication_fields.js"
|
12
|
-
|
13
|
-
// Global Alchemy object
|
14
|
-
if (typeof window.Alchemy === "undefined") {
|
15
|
-
window.Alchemy = {}
|
16
|
-
}
|
17
|
-
|
18
|
-
// Enhance the global Alchemy object with imported features
|
19
|
-
Object.assign(Alchemy, {
|
20
|
-
// Global utility method for translating a given string
|
21
|
-
t: translate,
|
22
|
-
translations: Object.assign(Alchemy.translations || {}, translationData),
|
23
|
-
NodeTree,
|
24
|
-
fileEditors,
|
25
|
-
pictureEditors,
|
26
|
-
ImageLoader: ImageLoader.init,
|
27
|
-
ImageCropper,
|
28
|
-
IngredientAnchorLink,
|
29
|
-
Datepicker,
|
30
|
-
Sitemap,
|
31
|
-
PagePublicationFields
|
32
|
-
})
|