alchemy_cms 7.0.8 → 7.1.0.pre.b1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/backport.yml +36 -0
- data/.github/workflows/test.yml +3 -2
- data/.gitignore +1 -0
- data/.standard.yml +1 -1
- data/CHANGELOG.md +145 -0
- data/Gemfile +8 -10
- data/README.md +10 -8
- data/alchemy_cms.gemspec +3 -2
- data/app/assets/config/alchemy_manifest.js +0 -1
- data/app/assets/javascripts/alchemy/admin.js +1 -19
- data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +2 -3
- data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +19 -34
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +38 -13
- data/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.fixed_elements.js +32 -25
- data/app/assets/javascripts/alchemy/alchemy.growler.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.image_overlay.coffee +3 -5
- data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +0 -57
- data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +22 -63
- data/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee +2 -2
- data/app/assets/javascripts/alchemy/alchemy.preview.js.coffee +5 -4
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +5 -5
- data/app/assets/javascripts/alchemy/templates/index.js +0 -2
- data/app/assets/javascripts/alchemy/templates/node_folder.hbs +1 -1
- data/app/assets/javascripts/alchemy/templates/page.hbs +1 -1
- data/app/assets/javascripts/alchemy/templates/page_folder.hbs +2 -2
- data/app/assets/stylesheets/alchemy/_custom-properties.scss +82 -0
- data/app/assets/stylesheets/alchemy/_mixins.scss +38 -30
- data/app/assets/stylesheets/alchemy/_variables.scss +12 -5
- data/app/assets/stylesheets/alchemy/admin.scss +3 -4
- data/app/assets/stylesheets/alchemy/archive.scss +107 -50
- data/app/assets/stylesheets/alchemy/attachments.scss +5 -4
- data/app/assets/stylesheets/alchemy/buttons.scss +38 -164
- data/app/assets/stylesheets/alchemy/dashboard.scss +31 -6
- data/app/assets/stylesheets/alchemy/dialogs.scss +12 -28
- data/app/assets/stylesheets/alchemy/elements.scss +273 -282
- data/app/assets/stylesheets/alchemy/flash.scss +20 -12
- data/app/assets/stylesheets/alchemy/forms.scss +21 -34
- data/app/assets/stylesheets/alchemy/frame.scss +11 -32
- data/app/assets/stylesheets/alchemy/hints.scss +4 -62
- data/app/assets/stylesheets/alchemy/image_library.scss +36 -33
- data/app/assets/stylesheets/alchemy/menubar.scss +7 -6
- data/app/assets/stylesheets/alchemy/navigation.scss +27 -15
- data/app/assets/stylesheets/alchemy/nodes.scss +11 -7
- data/app/assets/stylesheets/alchemy/notices.scss +16 -4
- data/app/assets/stylesheets/alchemy/page-select.scss +10 -2
- data/app/assets/stylesheets/alchemy/pagination.scss +22 -13
- data/app/assets/stylesheets/alchemy/resource_info.scss +7 -5
- data/app/assets/stylesheets/alchemy/selects.scss +49 -42
- data/app/assets/stylesheets/alchemy/shoelace.scss +345 -0
- data/app/assets/stylesheets/alchemy/sitemap.scss +24 -14
- data/app/assets/stylesheets/alchemy/spinner.scss +9 -19
- data/app/assets/stylesheets/alchemy/tables.scss +16 -24
- data/app/assets/stylesheets/alchemy/tags.scss +4 -0
- data/app/assets/stylesheets/alchemy/toolbar.scss +29 -25
- data/app/assets/stylesheets/alchemy/upload.scss +140 -89
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +80 -108
- data/app/components/alchemy/admin/node_select.rb +39 -0
- data/app/components/alchemy/admin/page_select.rb +42 -0
- data/app/controllers/alchemy/admin/base_controller.rb +5 -6
- data/app/controllers/alchemy/admin/elements_controller.rb +63 -35
- data/app/controllers/alchemy/base_controller.rb +4 -2
- data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +1 -1
- data/app/controllers/concerns/alchemy/site_redirects.rb +1 -1
- data/app/decorators/alchemy/element_editor.rb +0 -2
- data/app/helpers/alchemy/admin/attachments_helper.rb +6 -5
- data/app/helpers/alchemy/admin/base_helper.rb +17 -12
- data/app/helpers/alchemy/admin/ingredients_helper.rb +4 -1
- data/app/helpers/alchemy/admin/pages_helper.rb +5 -11
- data/app/helpers/alchemy/base_helper.rb +47 -13
- data/app/javascript/alchemy_admin/components/alchemy_html_element.js +129 -0
- data/app/javascript/alchemy_admin/components/button.js +59 -0
- data/app/javascript/alchemy_admin/components/char_counter.js +40 -0
- data/app/javascript/alchemy_admin/components/datepicker.js +39 -0
- data/app/javascript/alchemy_admin/components/dialog_link.js +45 -0
- data/app/javascript/alchemy_admin/components/element_editor/publish_element_button.js +36 -0
- data/app/javascript/alchemy_admin/components/element_editor.js +553 -0
- data/app/javascript/alchemy_admin/components/ingredient_group.js +54 -0
- data/app/javascript/alchemy_admin/components/link_buttons/link_button.js +48 -0
- data/app/javascript/alchemy_admin/components/link_buttons/unlink_button.js +38 -0
- data/app/javascript/alchemy_admin/components/link_buttons.js +79 -0
- data/app/javascript/alchemy_admin/components/node_select.js +45 -0
- data/app/javascript/alchemy_admin/components/overlay.js +18 -0
- data/app/javascript/alchemy_admin/components/page_select.js +63 -0
- data/app/javascript/alchemy_admin/components/remote_select.js +134 -0
- data/app/javascript/alchemy_admin/components/select.js +12 -0
- data/app/javascript/alchemy_admin/components/spinner.js +31 -0
- data/app/javascript/alchemy_admin/components/tinymce.js +146 -0
- data/app/javascript/alchemy_admin/components/uploader/file_upload.js +266 -0
- data/app/javascript/alchemy_admin/components/uploader/progress.js +258 -0
- data/app/javascript/alchemy_admin/components/uploader.js +132 -0
- data/app/javascript/alchemy_admin/dirty.js +49 -0
- data/app/javascript/alchemy_admin/file_editors.js +1 -1
- data/app/javascript/alchemy_admin/gui.js +14 -0
- data/app/javascript/alchemy_admin/i18n.js +12 -8
- data/app/javascript/alchemy_admin/image_cropper.js +6 -3
- data/app/javascript/alchemy_admin/image_loader.js +7 -15
- data/app/javascript/alchemy_admin/ingredient_anchor_link.js +2 -5
- data/app/javascript/alchemy_admin/initializer.js +65 -0
- data/app/javascript/alchemy_admin/locales/en.js +31 -0
- data/app/javascript/alchemy_admin/picture_editors.js +2 -2
- data/app/javascript/alchemy_admin/picture_selector.js +38 -0
- data/app/javascript/alchemy_admin/please_wait_overlay.js +8 -0
- data/app/javascript/alchemy_admin/sortable_elements.js +78 -0
- data/app/javascript/alchemy_admin/spinner.js +36 -0
- data/app/javascript/alchemy_admin/tags_autocomplete.js +46 -0
- data/app/javascript/alchemy_admin/utils/ajax.js +6 -5
- data/app/javascript/alchemy_admin/utils/dom_helpers.js +20 -0
- data/app/javascript/alchemy_admin/utils/format.js +11 -0
- data/app/javascript/alchemy_admin/utils/string_conversions.js +10 -0
- data/app/javascript/alchemy_admin.js +70 -13
- data/app/javascript/menubar.js +10 -0
- data/app/models/alchemy/attachment.rb +9 -11
- data/app/models/alchemy/element.rb +11 -0
- data/app/models/alchemy/ingredients/richtext.rb +1 -10
- data/app/models/alchemy/node.rb +4 -0
- data/app/models/alchemy/page/page_natures.rb +10 -2
- data/app/models/alchemy/page.rb +9 -49
- data/app/models/alchemy/picture/url.rb +1 -9
- data/app/serializers/alchemy/page_tree_serializer.rb +2 -1
- data/app/services/alchemy/copy_page.rb +98 -0
- data/app/views/alchemy/_menubar.html.erb +17 -13
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +14 -10
- data/app/views/alchemy/admin/attachments/_attachment.html.erb +44 -36
- data/app/views/alchemy/admin/attachments/_replace_button.html.erb +15 -21
- data/app/views/alchemy/admin/attachments/archive_overlay.js.erb +0 -1
- data/app/views/alchemy/admin/attachments/assign.js.erb +1 -1
- data/app/views/alchemy/admin/attachments/index.html.erb +6 -4
- data/app/views/alchemy/admin/attachments/show.html.erb +8 -8
- data/app/views/alchemy/admin/clipboard/clear.js.erb +1 -1
- data/app/views/alchemy/admin/clipboard/index.html.erb +3 -7
- data/app/views/alchemy/admin/clipboard/insert.js.erb +1 -1
- data/app/views/alchemy/admin/crop.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/index.html.erb +13 -11
- data/app/views/alchemy/admin/dashboard/info.html.erb +7 -7
- data/app/views/alchemy/admin/elements/_add_nested_element_form.html.erb +21 -23
- data/app/views/alchemy/admin/elements/_element.html.erb +52 -44
- data/app/views/alchemy/admin/elements/_footer.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_form.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_header.html.erb +11 -12
- data/app/views/alchemy/admin/elements/_toolbar.html.erb +33 -45
- data/app/views/alchemy/admin/elements/create.js.erb +7 -15
- data/app/views/alchemy/admin/elements/destroy.js.erb +0 -2
- data/app/views/alchemy/admin/elements/index.html.erb +27 -24
- data/app/views/alchemy/admin/elements/new.html.erb +9 -11
- data/app/views/alchemy/admin/ingredients/_file_fields.html.erb +2 -2
- data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +3 -3
- data/app/views/alchemy/admin/ingredients/_video_fields.html.erb +1 -2
- data/app/views/alchemy/admin/languages/_form.html.erb +2 -3
- data/app/views/alchemy/admin/languages/_language.html.erb +15 -8
- data/app/views/alchemy/admin/languages/_table.html.erb +1 -0
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +28 -16
- data/app/views/alchemy/admin/layoutpages/index.html.erb +2 -2
- data/app/views/alchemy/admin/legacy_page_urls/_legacy_page_url.html.erb +12 -8
- data/app/views/alchemy/admin/legacy_page_urls/_new.html.erb +1 -1
- data/app/views/alchemy/admin/nodes/_form.html.erb +20 -21
- data/app/views/alchemy/admin/nodes/_node.html.erb +39 -34
- data/app/views/alchemy/admin/nodes/index.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_anchor_link.html.erb +4 -4
- data/app/views/alchemy/admin/pages/_create_language_form.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_current_page.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_external_link.html.erb +4 -4
- data/app/views/alchemy/admin/pages/_file_link.html.erb +5 -5
- data/app/views/alchemy/admin/pages/_form.html.erb +10 -21
- data/app/views/alchemy/admin/pages/_internal_link.html.erb +4 -4
- data/app/views/alchemy/admin/pages/_locked_page.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +4 -17
- data/app/views/alchemy/admin/pages/_page.html.erb +76 -72
- data/app/views/alchemy/admin/pages/_page_infos.html.erb +23 -7
- data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +2 -1
- data/app/views/alchemy/admin/pages/_page_status.html.erb +11 -21
- data/app/views/alchemy/admin/pages/_publication_fields.html.erb +2 -5
- data/app/views/alchemy/admin/pages/_table.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_table_row.html.erb +43 -39
- data/app/views/alchemy/admin/pages/_toolbar.html.erb +43 -38
- data/app/views/alchemy/admin/pages/configure.html.erb +12 -14
- data/app/views/alchemy/admin/pages/edit.html.erb +80 -103
- data/app/views/alchemy/admin/pages/info.html.erb +20 -11
- data/app/views/alchemy/admin/pages/link.html.erb +22 -16
- data/app/views/alchemy/admin/pages/new.html.erb +9 -11
- data/app/views/alchemy/admin/pages/unlock.js.erb +10 -3
- data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +15 -13
- data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +3 -5
- data/app/views/alchemy/admin/partials/_routes.html.erb +10 -2
- data/app/views/alchemy/admin/partials/_site_select.html.erb +6 -5
- data/app/views/alchemy/admin/partials/_toolbar_button.html.erb +28 -23
- data/app/views/alchemy/admin/pictures/_archive.html.erb +5 -5
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +21 -23
- data/app/views/alchemy/admin/pictures/_infos.html.erb +2 -6
- data/app/views/alchemy/admin/pictures/_picture.html.erb +15 -17
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +17 -16
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +1 -1
- data/app/views/alchemy/admin/pictures/assign.js.erb +1 -1
- data/app/views/alchemy/admin/pictures/index.html.erb +34 -30
- data/app/views/alchemy/admin/pictures/show.html.erb +3 -3
- data/app/views/alchemy/admin/resources/_filter.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_form.html.erb +2 -2
- data/app/views/alchemy/admin/resources/_resource.html.erb +16 -9
- data/app/views/alchemy/admin/resources/_table.html.erb +4 -1
- data/app/views/alchemy/admin/resources/index.html.erb +22 -19
- data/app/views/alchemy/admin/sites/index.html.erb +2 -1
- data/app/views/alchemy/admin/styleguide/index.html.erb +54 -28
- data/app/views/alchemy/admin/tags/_tag.html.erb +16 -14
- data/app/views/alchemy/admin/tags/index.html.erb +15 -12
- data/app/views/alchemy/admin/tinymce/_setup.html.erb +29 -0
- data/app/views/alchemy/admin/uploader/_button.html.erb +23 -29
- data/app/views/alchemy/admin/uploader/_setup.html.erb +3 -8
- data/app/views/alchemy/base/500.html.erb +1 -1
- data/app/views/alchemy/base/error_notice.js.erb +0 -1
- data/app/views/alchemy/ingredients/_boolean_editor.html.erb +1 -1
- data/app/views/alchemy/ingredients/_datetime_editor.html.erb +1 -1
- data/app/views/alchemy/ingredients/_file_editor.html.erb +5 -5
- data/app/views/alchemy/ingredients/_link_editor.html.erb +1 -1
- data/app/views/alchemy/ingredients/_node_editor.html.erb +6 -19
- data/app/views/alchemy/ingredients/_page_editor.html.erb +7 -19
- data/app/views/alchemy/ingredients/_picture_editor.html.erb +2 -2
- data/app/views/alchemy/ingredients/_richtext_editor.html.erb +6 -15
- data/app/views/alchemy/ingredients/_select_editor.html.erb +2 -1
- data/app/views/alchemy/ingredients/_text_editor.html.erb +1 -1
- data/app/views/alchemy/ingredients/shared/_anchor.html.erb +1 -1
- data/app/views/alchemy/ingredients/shared/_link_tools.html.erb +10 -20
- data/app/views/alchemy/ingredients/shared/_picture_tools.html.erb +42 -49
- data/app/views/kaminari/alchemy/_first_page.html.erb +4 -2
- data/app/views/kaminari/alchemy/_gap.html.erb +1 -1
- data/app/views/kaminari/alchemy/_last_page.html.erb +4 -2
- data/app/views/kaminari/alchemy/_next_page.html.erb +4 -2
- data/app/views/kaminari/alchemy/_prev_page.html.erb +4 -2
- data/app/views/layouts/alchemy/admin.html.erb +10 -29
- data/config/alchemy/modules.yml +30 -30
- data/config/importmap.rb +10 -1
- data/config/initializers/rails_live_reload.rb +13 -0
- data/config/locales/alchemy.en.yml +23 -9
- data/config/routes.rb +2 -1
- data/lib/alchemy/auth_accessors.rb +6 -1
- data/lib/alchemy/dev_support/live_reload_watcher.rb +5 -0
- data/lib/alchemy/engine.rb +8 -2
- data/lib/alchemy/forms/builder.rb +18 -12
- data/lib/alchemy/resources_helper.rb +3 -3
- data/lib/alchemy/test_support/capybara_helpers.rb +8 -5
- data/lib/alchemy/test_support/rspec_matchers.rb +14 -0
- data/lib/alchemy/test_support/shared_uploader_examples.rb +1 -1
- data/lib/alchemy/tinymce.rb +8 -3
- data/lib/alchemy/version.rb +1 -1
- data/package.json +14 -5
- data/vendor/assets/fonts/remixicon.eot +0 -0
- data/vendor/assets/fonts/remixicon.svg +7816 -0
- data/vendor/assets/fonts/remixicon.ttf +0 -0
- data/vendor/assets/fonts/remixicon.woff +0 -0
- data/vendor/assets/fonts/remixicon.woff2 +0 -0
- data/vendor/assets/stylesheets/remixicon.scss +10480 -0
- metadata +83 -88
- data/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee +0 -30
- data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +0 -53
- data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +0 -45
- data/app/assets/javascripts/alchemy/alchemy.char_counter.js.coffee +0 -19
- data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +0 -59
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +0 -79
- data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +0 -267
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +0 -27
- data/app/assets/javascripts/alchemy/alchemy.spinner.js +0 -32
- data/app/assets/javascripts/alchemy/alchemy.tooltips.coffee +0 -10
- data/app/assets/javascripts/alchemy/alchemy.uploader.js.coffee +0 -131
- data/app/assets/javascripts/alchemy/menubar.js.coffee +0 -8
- data/app/assets/javascripts/alchemy/node_select.js +0 -39
- data/app/assets/javascripts/alchemy/page_select.js +0 -46
- data/app/assets/javascripts/alchemy/templates/node.hbs +0 -16
- data/app/assets/javascripts/alchemy/templates/spinner.hbs +0 -7
- data/app/assets/stylesheets/alchemy/jquery-ui.scss +0 -435
- data/app/javascript/alchemy_admin/datepicker.js +0 -33
- data/app/javascript/alchemy_admin/tinymce.js +0 -146
- data/app/javascript/alchemy_admin/translations.js +0 -32
- data/app/views/alchemy/admin/elements/fold.js.erb +0 -33
- data/app/views/alchemy/admin/elements/order.js.erb +0 -11
- data/app/views/alchemy/admin/elements/publish.js.erb +0 -21
- data/app/views/alchemy/admin/elements/update.js.erb +0 -27
- data/vendor/assets/fonts/fa-regular-400.eot +0 -0
- data/vendor/assets/fonts/fa-regular-400.svg +0 -803
- data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
- data/vendor/assets/fonts/fa-regular-400.woff +0 -0
- data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
- data/vendor/assets/fonts/fa-solid-900.eot +0 -0
- data/vendor/assets/fonts/fa-solid-900.svg +0 -4938
- data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
- data/vendor/assets/fonts/fa-solid-900.woff +0 -0
- data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
- data/vendor/assets/javascripts/fileupload/jquery.fileupload-process.js +0 -178
- data/vendor/assets/javascripts/fileupload/jquery.fileupload-validate.js +0 -125
- data/vendor/assets/javascripts/fileupload/jquery.fileupload.js +0 -1502
- data/vendor/assets/javascripts/fileupload/jquery.iframe-transport.js +0 -224
- data/vendor/assets/javascripts/jquery-ui/data.js +0 -45
- data/vendor/assets/javascripts/jquery-ui/ie.js +0 -20
- data/vendor/assets/javascripts/jquery-ui/keycode.js +0 -51
- data/vendor/assets/javascripts/jquery-ui/plugin.js +0 -49
- data/vendor/assets/javascripts/jquery-ui/safe-active-element.js +0 -46
- data/vendor/assets/javascripts/jquery-ui/safe-blur.js +0 -27
- data/vendor/assets/javascripts/jquery-ui/scroll-parent.js +0 -50
- data/vendor/assets/javascripts/jquery-ui/unique-id.js +0 -54
- data/vendor/assets/javascripts/jquery-ui/version.js +0 -20
- data/vendor/assets/javascripts/jquery-ui/widget.js +0 -754
- data/vendor/assets/javascripts/jquery-ui/widgets/draggable.js +0 -1268
- data/vendor/assets/javascripts/jquery-ui/widgets/mouse.js +0 -241
- data/vendor/assets/javascripts/jquery-ui/widgets/sortable.js +0 -1623
- data/vendor/assets/javascripts/jquery-ui/widgets/tabs.js +0 -931
- data/vendor/assets/javascripts/jquery_plugins/jquery.scrollTo.min.js +0 -7
- data/vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js +0 -296
- data/vendor/assets/stylesheets/fontawesome/_animated.scss +0 -20
- data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +0 -20
- data/vendor/assets/stylesheets/fontawesome/_core.scss +0 -21
- data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +0 -6
- data/vendor/assets/stylesheets/fontawesome/_icons.scss +0 -1441
- data/vendor/assets/stylesheets/fontawesome/_larger.scss +0 -23
- data/vendor/assets/stylesheets/fontawesome/_list.scss +0 -18
- data/vendor/assets/stylesheets/fontawesome/_mixins.scss +0 -56
- data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +0 -24
- data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +0 -5
- data/vendor/assets/stylesheets/fontawesome/_stacked.scss +0 -31
- data/vendor/assets/stylesheets/fontawesome/_variables.scss +0 -1458
- data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +0 -16
- data/vendor/assets/stylesheets/fontawesome/regular.scss +0 -23
- data/vendor/assets/stylesheets/fontawesome/solid.scss +0 -24
@@ -53,6 +53,28 @@
|
|
53
53
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
54
54
|
<% end %>
|
55
55
|
|
56
|
+
<h2>Dialog Links</h2>
|
57
|
+
|
58
|
+
<div class="panel">
|
59
|
+
<sl-tooltip content="Open in Dialog">
|
60
|
+
<a
|
61
|
+
href="/admin/styleguide"
|
62
|
+
is="alchemy-dialog-link"
|
63
|
+
class="icon_button"
|
64
|
+
data-dialog-options="{"size":"800x600","title":"Styleguide in Dialog"}"
|
65
|
+
>
|
66
|
+
<i class="icon ri-window-line"></i>
|
67
|
+
</a>
|
68
|
+
</sl-tooltip>
|
69
|
+
<a
|
70
|
+
href="#"
|
71
|
+
is="alchemy-dialog-link"
|
72
|
+
class="icon_button disabled"
|
73
|
+
>
|
74
|
+
<i class="icon ri-window-line"></i>
|
75
|
+
</a>
|
76
|
+
</div>
|
77
|
+
|
56
78
|
<h2>Forms</h2>
|
57
79
|
|
58
80
|
<div class="panel">
|
@@ -63,7 +85,7 @@
|
|
63
85
|
<form class="simple_form alchemy" action="#" accept-charset="UTF-8" method="post">
|
64
86
|
<div class="input select">
|
65
87
|
<label class="select control-label" for="select">Select</label>
|
66
|
-
<select class="select
|
88
|
+
<select class="select" id="select" is="alchemy-select">
|
67
89
|
<option value="">Please choose</option>
|
68
90
|
<option value="1">Option 1</option>
|
69
91
|
<option selected="selected" value="2">Option 2</option>
|
@@ -73,7 +95,9 @@
|
|
73
95
|
|
74
96
|
<div class="input">
|
75
97
|
<label class="control-label" for="datetime_picker">Date Time Picker</label>
|
76
|
-
<
|
98
|
+
<alchemy-datepicker input-type="datetime">
|
99
|
+
<input type="text" id="datetime_picker">
|
100
|
+
</alchemy-datepicker>
|
77
101
|
</div>
|
78
102
|
|
79
103
|
<div class="input">
|
@@ -81,10 +105,14 @@
|
|
81
105
|
<div class="control_group">
|
82
106
|
<div class="input-row">
|
83
107
|
<div class="input-column">
|
84
|
-
<
|
108
|
+
<alchemy-datepicker input-type="date">
|
109
|
+
<input type="text" id="date_picker">
|
110
|
+
</alchemy-datepicker>
|
85
111
|
</div>
|
86
112
|
<div class="input-column">
|
87
|
-
<
|
113
|
+
<alchemy-datepicker input-type="time">
|
114
|
+
<input type="text" id="time_picker">
|
115
|
+
</alchemy-datepicker>
|
88
116
|
</div>
|
89
117
|
</div>
|
90
118
|
</div>
|
@@ -105,10 +133,12 @@
|
|
105
133
|
<input type="text" id="string_with_error">
|
106
134
|
<small class="error">Error message</small>
|
107
135
|
</div>
|
108
|
-
<
|
109
|
-
<
|
110
|
-
|
111
|
-
|
136
|
+
<alchemy-char-counter max-chars="60">
|
137
|
+
<div class="input">
|
138
|
+
<label class="control-label" for="string_with_counter">String with char counter</label>
|
139
|
+
<input type="text" id="string_with_counter">
|
140
|
+
</div>
|
141
|
+
</alchemy-char-counter>
|
112
142
|
|
113
143
|
<div class="input check_boxes">
|
114
144
|
<label class="control-label">Check Boxes</label>
|
@@ -123,12 +153,12 @@
|
|
123
153
|
</label>
|
124
154
|
</div>
|
125
155
|
</div>
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
156
|
+
<alchemy-char-counter max-chars="160">
|
157
|
+
<div class="input text">
|
158
|
+
<label class="text control-label" for="textarea_with_counter">Textarea with char counter</label>
|
159
|
+
<textarea class="text" id="textarea_with_counter"></textarea>
|
160
|
+
</div>
|
161
|
+
</alchemy-char-counter>
|
132
162
|
<div class="input text">
|
133
163
|
<label class="text control-label" for="textarea">Textarea</label>
|
134
164
|
<textarea class="text" id="textarea"></textarea>
|
@@ -137,12 +167,14 @@
|
|
137
167
|
|
138
168
|
<div class="input text tinymce_container">
|
139
169
|
<label class="text control-label" for="tinymce_1">Richtext editor</label>
|
140
|
-
<
|
170
|
+
<alchemy-tinymce>
|
171
|
+
<textarea class="text" id="tinymce_1"></textarea>
|
172
|
+
</alchemy-tinymce>
|
141
173
|
</div>
|
142
174
|
|
143
175
|
<div class="submit">
|
144
176
|
<button class="secondary">Secondary</button>
|
145
|
-
<button
|
177
|
+
<button type="submit" is="alchemy-button">Primary Submit</button>
|
146
178
|
</div>
|
147
179
|
</form>
|
148
180
|
</div>
|
@@ -181,33 +213,33 @@
|
|
181
213
|
</tr>
|
182
214
|
<tr class="even">
|
183
215
|
<td class="icon">
|
184
|
-
<i class="icon
|
216
|
+
<i class="icon ri-fw ri-user-line"></i>
|
185
217
|
</td>
|
186
218
|
<td>Even table cell 1</td>
|
187
219
|
<td>Even table cell 2</td>
|
188
220
|
<td>Even table cell 3</td>
|
189
221
|
<td class="tools">
|
190
222
|
<a href="#" class="icon_button">
|
191
|
-
<i class="icon
|
223
|
+
<i class="icon ri-fw ri-delete-bin-2-line"></i>
|
192
224
|
</a>
|
193
225
|
<a href="#" class="icon_button">
|
194
|
-
<i class="icon
|
226
|
+
<i class="icon ri-fw ri-edit-line"></i>
|
195
227
|
</a>
|
196
228
|
</td>
|
197
229
|
</tr>
|
198
230
|
<tr class="odd">
|
199
231
|
<td class="icon">
|
200
|
-
<i class="icon
|
232
|
+
<i class="icon ri-fw ri-user-line"></i>
|
201
233
|
</td>
|
202
234
|
<td>Odd table cell 1</td>
|
203
235
|
<td>Odd table cell 2</td>
|
204
236
|
<td>Odd table cell 3</td>
|
205
237
|
<td class="tools">
|
206
238
|
<a href="#" class="icon_button">
|
207
|
-
<i class="icon
|
239
|
+
<i class="icon ri-fw ri-delete-bin-2-line"></i>
|
208
240
|
</a>
|
209
241
|
<a href="#" class="icon_button">
|
210
|
-
<i class="icon
|
242
|
+
<i class="icon ri-fw ri-edit-line"></i>
|
211
243
|
</a>
|
212
244
|
</td>
|
213
245
|
</tr>
|
@@ -230,9 +262,3 @@
|
|
230
262
|
<li>List item</li>
|
231
263
|
<li>List item</li>
|
232
264
|
</ol>
|
233
|
-
|
234
|
-
<%= content_for :javascripts do %>
|
235
|
-
<script>
|
236
|
-
Alchemy.Tinymce.init([1])
|
237
|
-
</script>
|
238
|
-
<% end %>
|
@@ -1,26 +1,28 @@
|
|
1
1
|
<tr class="<%= cycle('even', 'odd') %>">
|
2
|
-
<td class="icon"><%= render_icon
|
2
|
+
<td class="icon"><%= render_icon(:tag, size: "xl") %></td>
|
3
3
|
<td class="name"><%= tag.name %></td>
|
4
|
-
<td
|
4
|
+
<td>
|
5
5
|
<%= tag.taggings.collect(&:taggable).collect { |t| t.class.model_name.human }.uniq.join(', ') %>
|
6
6
|
</td>
|
7
7
|
<td class="count"><%= tag.taggings.count %></td>
|
8
8
|
<td class="tools">
|
9
9
|
<% if can?(:destroy, Alchemy::Tag) %>
|
10
|
-
<%=
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
<sl-tooltip content="<%= Alchemy.t(:delete_tag) %>">
|
11
|
+
<%= delete_button admin_tag_path(tag), {
|
12
|
+
message: Alchemy.t(:do_you_really_want_to_delete_this_tag?),
|
13
|
+
icon: :minus
|
14
|
+
} %>
|
15
|
+
</sl-tooltip>
|
15
16
|
<% end %>
|
16
17
|
<% if can?(:edit, Alchemy::Tag) %>
|
17
|
-
<%=
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
<sl-tooltip content="<%= Alchemy.t(:edit_tag) %>" placement="top-end">
|
19
|
+
<%= link_to_dialog render_icon(:edit),
|
20
|
+
edit_admin_tag_path(tag),
|
21
|
+
{
|
22
|
+
title: Alchemy.t(:edit_tag),
|
23
|
+
size: '360x410'
|
24
|
+
} %>
|
25
|
+
</sl-tooltip>
|
24
26
|
<% end %>
|
25
27
|
</td>
|
26
28
|
</tr>
|
@@ -1,16 +1,19 @@
|
|
1
1
|
<% content_for :toolbar do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
hotkey: 'alt+n',
|
8
|
-
dialog_options: {
|
2
|
+
<div class="toolbar_buttons">
|
3
|
+
<%= toolbar_button(
|
4
|
+
icon: :plus,
|
5
|
+
label: Alchemy.t('New Tag'),
|
6
|
+
url: alchemy.new_admin_tag_path,
|
9
7
|
title: Alchemy.t('New Tag'),
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
hotkey: 'alt+n',
|
9
|
+
tooltip_placement: "top-start",
|
10
|
+
dialog_options: {
|
11
|
+
title: Alchemy.t('New Tag'),
|
12
|
+
size: '310x180'
|
13
|
+
},
|
14
|
+
if_permitted_to: [:create, Alchemy::Tag]
|
15
|
+
) %>
|
16
|
+
</div>
|
14
17
|
<%= render 'alchemy/admin/partials/search_form' %>
|
15
18
|
<% end %>
|
16
19
|
|
@@ -23,7 +26,7 @@
|
|
23
26
|
<tr>
|
24
27
|
<th class="icon"></th>
|
25
28
|
<th class="name"><%= sort_link(@query, :name) %></th>
|
26
|
-
<th
|
29
|
+
<th style="width: 15%"><%= Gutentag::Tag.human_attribute_name(:taggings_types) %></th>
|
27
30
|
<th class="count"><%= sort_link(@query, :taggings_count) %></th>
|
28
31
|
<th class="tools"></th>
|
29
32
|
</tr>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<% asset_host = ActionController::Base.config.asset_host %>
|
2
|
+
|
3
|
+
<link rel="preload" href="<%= asset_host %><%= assets_prefix %>/tinymce/skins/alchemy/skin.min.css" as="style" />
|
4
|
+
<link rel="preload" href="<%= asset_host %><%= assets_prefix %>/tinymce/skins/alchemy/content.min.css" as="style" />
|
5
|
+
<% if Alchemy::Tinymce.init[:content_css] %>
|
6
|
+
<link rel="preload" href="<%= asset_host %><%= Alchemy::Tinymce.init[:content_css] %>" as="style" />
|
7
|
+
<% end %>
|
8
|
+
<% Alchemy::Tinymce.preloadable_plugins.each do |plugin| %>
|
9
|
+
<link rel="preload" href="<%= asset_host %><%= assets_prefix %>/tinymce/plugins/<%= plugin %>/plugin.min.js" as="script">
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<script>
|
13
|
+
// Setting TinyMCE path.
|
14
|
+
var tinyMCEPreInit = {
|
15
|
+
<% if ActionController::Base.config.asset_host_set? %>
|
16
|
+
base: '<%= asset_url(assets_prefix + '/tinymce') %>',
|
17
|
+
<% else %>
|
18
|
+
base: '<%= asset_path(assets_prefix + '/tinymce') %>',
|
19
|
+
<% end %>
|
20
|
+
suffix: '.min'
|
21
|
+
};
|
22
|
+
// Holds the default Alchemy TinyMCE configuration
|
23
|
+
Alchemy.TinymceDefaults = {
|
24
|
+
plugins: '<%= Alchemy::Tinymce.plugins.join(',') %>',
|
25
|
+
<% Alchemy::Tinymce.init.each do |k, v| %>
|
26
|
+
<%= k %>: <%== v.to_json %>,
|
27
|
+
<% end %>
|
28
|
+
};
|
29
|
+
</script>
|
@@ -1,36 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
class: 'fileupload fileupload--field', multiple: true,
|
4
|
-
name: "#{f.object_name}[#{file_attribute}]", tabindex: '-1' %>
|
5
|
-
<%= hidden_field_tag("#{f.object_name}[upload_hash]", Time.current.hash) if object.respond_to?(:upload_hash) %>
|
6
|
-
<%= f.label file_attribute, data: {alchemy_hotkey: 'alt+n'} do %>
|
7
|
-
<div class="button_with_label">
|
8
|
-
<span class="icon_button" tabindex="0"><%= render_icon :upload %></span>
|
9
|
-
<label>
|
10
|
-
<%= local_assigns[:label] ||
|
11
|
-
Alchemy.t(:button_label, scope: [:uploader, object.class.model_name.i18n_key]) %>
|
12
|
-
</label>
|
13
|
-
</div>
|
14
|
-
<% end %>
|
15
|
-
<% end %>
|
1
|
+
<% file_types = configuration(:uploader)['allowed_filetypes'][object.class.model_name.collection] || ['*'] %>
|
2
|
+
<% accept = file_types == ["*"] ? false : file_types.map {|type| ".#{type}"}.join(", ") %>
|
16
3
|
|
17
|
-
|
18
|
-
|
4
|
+
<alchemy-uploader dropzone="<%= local_assigns[:dropzone] || "#main_content" %>">
|
5
|
+
<%= form_for [:admin, object], html: { multipart: true, class: 'upload-button' } do |f| %>
|
6
|
+
<%= f.file_field file_attribute,
|
7
|
+
class: 'fileupload fileupload--field', multiple: true, accept: accept,
|
8
|
+
name: "#{f.object_name}[#{file_attribute}]", tabindex: '-1' %>
|
9
|
+
<%= hidden_field_tag("#{f.object_name}[upload_hash]", Time.current.hash) if object.respond_to?(:upload_hash) %>
|
10
|
+
<%= f.label file_attribute, data: { alchemy_hotkey: 'alt+n' } do %>
|
11
|
+
<%= content_tag "sl-tooltip", content: local_assigns[:label] ||
|
12
|
+
Alchemy.t(:button_label, scope: [:uploader, object.class.model_name.i18n_key]), placement: "top-start" do %>
|
13
|
+
<span class="icon_button" tabindex="0"><%= render_icon "upload-2" %></span>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
16
|
+
<% end %>
|
17
|
+
</alchemy-uploader>
|
19
18
|
|
20
19
|
<script type='text/javascript'>
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
dropzone: '<%= local_assigns[:dropzone] || '#main_content' %>',
|
25
|
-
complete: function() {
|
26
|
-
var url = '<%= redirect_url.html_safe %>';
|
20
|
+
document.querySelector("alchemy-uploader").addEventListener("Alchemy.upload.successful", () => {
|
21
|
+
setTimeout(() => {
|
22
|
+
var url = '<%= redirect_url.html_safe %>';
|
27
23
|
<% if local_assigns[:in_dialog] %>
|
28
|
-
|
24
|
+
$.get(url, null, null, 'script');
|
29
25
|
<% else %>
|
30
|
-
|
26
|
+
Turbo.visit(url);
|
31
27
|
<% end %>
|
32
|
-
|
33
|
-
|
34
|
-
Alchemy.Uploader(options);
|
35
|
-
});
|
28
|
+
}, 1000)
|
29
|
+
})
|
36
30
|
</script>
|
@@ -1,13 +1,8 @@
|
|
1
|
-
<div class="overall-upload">
|
2
|
-
<div class="progress">
|
3
|
-
<span class="progress-status">0%</span>
|
4
|
-
(<span class="uploaded-files-count">0</span>/<span class="total-files-count">0</span>)
|
5
|
-
</div>
|
6
|
-
<div class="upload-progress-container"></div>
|
7
|
-
</div>
|
8
1
|
<script>
|
9
2
|
Alchemy.uploader_defaults = {
|
10
3
|
file_size_limit: <%= configuration(:uploader)['file_size_limit'] || 100 -%>,
|
11
|
-
|
4
|
+
upload_limit: <%= configuration(:uploader)['upload_limit'] || 50 -%>,
|
5
|
+
allowed_filetype_pictures: "<%= configuration(:uploader)['allowed_filetypes']['alchemy/pictures']&.join(", ") || '*' -%>",
|
6
|
+
allowed_filetype_attachments: "<%= configuration(:uploader)['allowed_filetypes']['alchemy/attachments']&.join(", ") || '*' -%>",
|
12
7
|
}
|
13
8
|
</script>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= f.label :value, style: "display: inline-block", for: nil do %>
|
6
6
|
<%= f.check_box :value, id: nil %>
|
7
7
|
<%= render_ingredient_role(boolean_editor) %>
|
8
|
+
<%= render_hint_for(boolean_editor, size: "lg", fixed_width: false) %>
|
8
9
|
<% end %>
|
9
|
-
<%= render_hint_for(boolean_editor) %>
|
10
10
|
<% end %>
|
11
11
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% dialog_link = link_to_dialog render_icon(
|
1
|
+
<% dialog_link = link_to_dialog render_icon("file-add"),
|
2
2
|
alchemy.admin_attachments_path(
|
3
3
|
form_field_id: file_editor.form_field_id(:attachment_id),
|
4
4
|
only: file_editor.settings[:only],
|
@@ -18,11 +18,11 @@
|
|
18
18
|
<%= element_form.fields_for(:ingredients, file_editor.ingredient) do |f| %>
|
19
19
|
<%= ingredient_label(file_editor) %>
|
20
20
|
<div class="file">
|
21
|
-
|
22
|
-
|
21
|
+
<div class="file_icon">
|
22
|
+
<% if file_editor.attachment %>
|
23
23
|
<%= render_icon(file_editor.attachment.icon_css_class) %>
|
24
|
-
|
25
|
-
|
24
|
+
<% end %>
|
25
|
+
</div>
|
26
26
|
<div class="file_name">
|
27
27
|
<%= file_editor.attachment&.name %>
|
28
28
|
</div>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<%= f.hidden_field :link_class_name, "data-link-class": true, id: nil %>
|
15
15
|
<%= f.hidden_field :link_target, "data-link-target": true, id: nil %>
|
16
16
|
<% end %>
|
17
|
-
<%= render "alchemy/ingredients/shared/link_tools", ingredient_editor: link_editor %>
|
17
|
+
<%= render "alchemy/ingredients/shared/link_tools", ingredient_editor: link_editor, wrapper_class: "ingredient_link_buttons" %>
|
18
18
|
<% end %>
|
19
19
|
|
20
20
|
<script>
|
@@ -3,24 +3,11 @@
|
|
3
3
|
data: node_editor.data_attributes do %>
|
4
4
|
<%= element_form.fields_for(:ingredients, node_editor.ingredient) do |f| %>
|
5
5
|
<%= ingredient_label(node_editor, :node_id) %>
|
6
|
-
<%=
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
<%= render Alchemy::Admin::NodeSelect.new(node_editor.node, url: alchemy.api_nodes_path(language_id: node_editor.page&.language_id, include: :ancestors), query_params: node_editor.settings.fetch(:query_params, {})) do %>
|
7
|
+
<%= f.text_field :node_id,
|
8
|
+
value: node_editor.node&.id,
|
9
|
+
id: node_editor.form_field_id(:node_id),
|
10
|
+
class: 'alchemy_selectbox full_width' %>
|
11
|
+
<% end %>
|
10
12
|
<% end %>
|
11
13
|
<% end %>
|
12
|
-
|
13
|
-
<script>
|
14
|
-
<% query_params = node_editor.settings.fetch(:query_params, {}).merge({
|
15
|
-
include: :ancestors
|
16
|
-
}) %>
|
17
|
-
$('#<%= node_editor.form_field_id(:node_id) %>').alchemyNodeSelect({
|
18
|
-
placeholder: "<%= Alchemy.t(:search_node) %>",
|
19
|
-
url: "<%= alchemy.api_nodes_path(language_id: node_editor.page&.language_id) %>",
|
20
|
-
query_params: <%== query_params.to_json %>,
|
21
|
-
<% if node_editor.node %>
|
22
|
-
<% serialized_node = ActiveModelSerializers::SerializableResource.new(node_editor.node, include: :ancestors) %>
|
23
|
-
initialSelection: <%== serialized_node.to_json %>
|
24
|
-
<% end %>
|
25
|
-
})
|
26
|
-
</script>
|
@@ -3,23 +3,11 @@
|
|
3
3
|
data: page_editor.data_attributes do %>
|
4
4
|
<%= element_form.fields_for(:ingredients, page_editor.ingredient) do |f| %>
|
5
5
|
<%= ingredient_label(page_editor, :page_id) %>
|
6
|
-
<%=
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<% end %>
|
12
|
-
|
13
|
-
<script>
|
14
|
-
$('#<%= page_editor.form_field_id(:page_id) %>').alchemyPageSelect({
|
15
|
-
placeholder: "<%= Alchemy.t(:search_page) %>",
|
16
|
-
url: "<%= alchemy.api_pages_path %>",
|
17
|
-
query_params: <%== page_editor.settings[:query_params].to_json %>,
|
18
|
-
<% if page_editor.page %>
|
19
|
-
initialSelection: {
|
20
|
-
id: <%= page_editor.page.id %>,
|
21
|
-
text: "<%= page_editor.page.name %>"
|
22
|
-
}
|
6
|
+
<%= render Alchemy::Admin::PageSelect.new(page_editor.page, allow_clear: true, query_params: page_editor.settings[:query_params]) do %>
|
7
|
+
<%= f.text_field :page_id,
|
8
|
+
value: page_editor.page&.id,
|
9
|
+
id: page_editor.form_field_id(:page_id),
|
10
|
+
class: 'full_width' %>
|
11
|
+
<% end %>
|
23
12
|
<% end %>
|
24
|
-
|
25
|
-
</script>
|
13
|
+
<% end %>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
},
|
16
16
|
class: "picture_thumbnail" do %>
|
17
17
|
<a class="picture_tool delete">
|
18
|
-
<%= render_icon(
|
18
|
+
<%= render_icon("close") %>
|
19
19
|
</a>
|
20
20
|
<div class="picture_image">
|
21
21
|
<div class="thumbnail_background">
|
@@ -27,7 +27,7 @@
|
|
27
27
|
title: Alchemy.t(:image_name, name: picture_editor.picture.name),
|
28
28
|
) %>
|
29
29
|
<% else %>
|
30
|
-
<%= render_icon(:image
|
30
|
+
<%= render_icon(:image) %>
|
31
31
|
<% end %>
|
32
32
|
</div>
|
33
33
|
</div>
|
@@ -2,20 +2,11 @@
|
|
2
2
|
class: richtext_editor.css_classes,
|
3
3
|
data: richtext_editor.data_attributes do %>
|
4
4
|
<%= element_form.fields_for(:ingredients, richtext_editor.ingredient) do |f| %>
|
5
|
-
<%= ingredient_label(richtext_editor) %>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<% end %>
|
12
|
-
<% if richtext_editor.has_custom_tinymce_config? %>
|
13
|
-
<script type="text/javascript" charset="utf-8">
|
14
|
-
Alchemy.Tinymce.setCustomConfig("<%= richtext_editor.element_id %>", {
|
15
|
-
<% richtext_editor.custom_tinymce_config.each do |k, v| %>
|
16
|
-
<%= k %>: <%== v.to_json %>,
|
17
|
-
<% end %>
|
18
|
-
});
|
19
|
-
</script>
|
5
|
+
<%= ingredient_label(richtext_editor, :value) %>
|
6
|
+
|
7
|
+
<%- custom_tinymce_config = richtext_editor.custom_tinymce_config.inject({}) { |obj, (k, v)| obj[k.to_s.dasherize] = v.to_json; obj} %>
|
8
|
+
<%= content_tag("alchemy-tinymce", custom_tinymce_config) do %>
|
9
|
+
<%= f.text_area :value, id: richtext_editor.form_field_id(:value) %>
|
10
|
+
<% end %>
|
20
11
|
<% end %>
|
21
12
|
<% end %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<%= f.hidden_field :link_title, "data-link-title": true, id: nil %>
|
18
18
|
<%= f.hidden_field :link_class_name, "data-link-class": true, id: nil %>
|
19
19
|
<%= f.hidden_field :link_target, "data-link-target": true, id: nil %>
|
20
|
-
<%= render "alchemy/ingredients/shared/link_tools", ingredient_editor: text_editor %>
|
20
|
+
<%= render "alchemy/ingredients/shared/link_tools", ingredient_editor: text_editor, wrapper_class: "ingredient_link_buttons" %>
|
21
21
|
<% end %>
|
22
22
|
<% end %>
|
23
23
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<span class="edit-ingredient-anchor-link">
|
2
|
-
<%= link_to_dialog render_icon(:bookmark, { style: ingredient_editor.dom_id.present? ? "
|
2
|
+
<%= link_to_dialog render_icon(:bookmark, { style: ingredient_editor.dom_id.present? ? "fill" : "line" }),
|
3
3
|
alchemy.edit_admin_ingredient_path(id: ingredient_editor.id),
|
4
4
|
{
|
5
5
|
title: Alchemy.t(:edit_anchor),
|
@@ -1,20 +1,10 @@
|
|
1
|
-
|
2
|
-
<%=
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
"
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<%= link_to(
|
12
|
-
render_icon(:unlink),
|
13
|
-
'#',
|
14
|
-
onclick: "return Alchemy.LinkDialog.removeLink(this, '[data-ingredient-id=\"#{ingredient_editor.id}\"]')",
|
15
|
-
class: "icon_button unlink-ingredient #{ingredient_editor.linked? ? 'linked' : 'disabled'}",
|
16
|
-
tabindex: ingredient_editor.linked? ? nil : '-1',
|
17
|
-
'data-ingredient-id' => ingredient_editor.id,
|
18
|
-
title: Alchemy.t(:unlink)
|
19
|
-
) %>
|
20
|
-
</span>
|
1
|
+
<%= content_tag "alchemy-link-buttons", class: local_assigns[:wrapper_class], data: {ingredient_id: ingredient_editor.id} do %>
|
2
|
+
<%= content_tag "sl-tooltip", content: Alchemy.t(:place_link) do %>
|
3
|
+
<%= content_tag "button", "", is: "alchemy-link-button",
|
4
|
+
class: [ingredient_editor.linked? ? "linked" : nil] %>
|
5
|
+
<% end %>
|
6
|
+
<%= content_tag "sl-tooltip", content: Alchemy.t(:unlink) do %>
|
7
|
+
<%= content_tag "button", "", is: "alchemy-unlink-button",
|
8
|
+
class: [ingredient_editor.linked? ? "linked" : "disabled"] %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|