alchemy_cms 7.0.11 → 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 +144 -15
- data/Gemfile +8 -10
- data/README.md +10 -8
- data/alchemy_cms.gemspec +4 -3
- 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/labels.scss +4 -1
- 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/admin/languages_controller.rb +1 -2
- data/app/controllers/alchemy/base_controller.rb +4 -2
- data/app/controllers/concerns/alchemy/admin/current_language.rb +1 -5
- 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_elements.rb +2 -11
- 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 +2 -2
- data/app/views/alchemy/admin/resources/_form.html.erb +2 -2
- data/app/views/alchemy/admin/resources/_per_page_select.html.erb +1 -1
- 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 -18
- 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/controller_actions.rb +17 -4
- 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 +85 -96
- 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 -40
- 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
@@ -2,19 +2,20 @@ window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'
|
|
2
2
|
|
3
3
|
# Adds buttons into a toolbar inside of overlay windows
|
4
4
|
Alchemy.ToolbarButton = (options) ->
|
5
|
-
$btn = $(
|
5
|
+
$btn = $("<sl-tooltip content='#{options.label}' placement='top-#{options.align}'></sl-tooltip>")
|
6
|
+
if options.align
|
7
|
+
$btn.addClass(options.class)
|
6
8
|
if options.buttonId
|
7
9
|
$btn.attr(id: options.buttonId)
|
8
|
-
$lnk = $("<a
|
10
|
+
$lnk = $("<a class='icon_button' href='#' />")
|
9
11
|
if options.hotkey
|
10
12
|
$lnk.attr('data-alchemy-hotkey', options.hotkey)
|
11
|
-
$lnk.click (e) ->
|
13
|
+
$lnk.on "click", (e) ->
|
12
14
|
e.preventDefault()
|
13
15
|
options.onClick(e)
|
14
16
|
return
|
15
|
-
$lnk.append "<i class='icon
|
17
|
+
$lnk.append "<i class='icon ri-#{options.iconClass} ri-fw' />"
|
16
18
|
$btn.append $lnk
|
17
|
-
$btn.append "<br><label>#{options.label}</label>"
|
18
19
|
$btn
|
19
20
|
|
20
21
|
Alchemy.ElementsWindow =
|
@@ -30,28 +31,50 @@ Alchemy.ElementsWindow =
|
|
30
31
|
@element_window.append @createToolbar(options.toolbarButtons)
|
31
32
|
@element_window.append @element_area
|
32
33
|
@button = $('#element_window_button')
|
33
|
-
@button.click =>
|
34
|
+
@button.on "click", =>
|
34
35
|
@hide()
|
35
36
|
false
|
37
|
+
|
36
38
|
window.requestAnimationFrame =>
|
37
39
|
spinner = new Alchemy.Spinner('medium')
|
38
40
|
spinner.spin @element_area[0]
|
41
|
+
|
42
|
+
window.addEventListener 'message', (event) =>
|
43
|
+
data = event.data
|
44
|
+
if data?.message == 'Alchemy.focusElementEditor'
|
45
|
+
element = document.getElementById("element_#{data.element_id}")
|
46
|
+
Alchemy.ElementsWindow.show()
|
47
|
+
element?.focusElement()
|
48
|
+
true
|
49
|
+
|
50
|
+
@$body.on "click", (evt) =>
|
51
|
+
unless evt.target.closest(".element-editor")
|
52
|
+
@element_area.find('.element-editor').removeClass('selected')
|
53
|
+
Alchemy.PreviewWindow.postMessage(message: 'Alchemy.blurElements')
|
54
|
+
return
|
55
|
+
|
39
56
|
$('#main_content').append(@element_window)
|
40
57
|
@show()
|
41
58
|
@reload()
|
42
59
|
|
43
60
|
createToolbar: (buttons) ->
|
44
|
-
@toolbar = $('<div
|
61
|
+
@toolbar = $('<div class="elements-window-toolbar" />')
|
62
|
+
buttons.push
|
63
|
+
label: "Collapse all elements"
|
64
|
+
iconClass: "contract-up-down-line"
|
65
|
+
align: "end"
|
66
|
+
class: "right"
|
67
|
+
onClick: =>
|
68
|
+
$("alchemy-element-editor:not([compact]):not([fixed])").each () ->
|
69
|
+
@collapse()
|
45
70
|
for btn in buttons
|
46
71
|
@toolbar.append Alchemy.ToolbarButton(btn)
|
47
|
-
@toolbar
|
72
|
+
@toolbar.append @collapseAllBtn
|
48
73
|
|
49
74
|
reload: ->
|
50
75
|
$.get @url, (data) =>
|
51
76
|
@element_area.html data
|
52
|
-
Alchemy.
|
53
|
-
Alchemy.fileEditors(@element_area.find(".ingredient-editor.file, .ingredient-editor.audio, .ingredient-editor.video").selector)
|
54
|
-
Alchemy.pictureEditors(@element_area.find(".ingredient-editor.picture").selector)
|
77
|
+
Alchemy.SortableElements()
|
55
78
|
if @callback
|
56
79
|
@callback.call()
|
57
80
|
.fail (xhr, status, error) =>
|
@@ -70,13 +93,15 @@ Alchemy.ElementsWindow =
|
|
70
93
|
toggleButton: ->
|
71
94
|
if @hidden
|
72
95
|
@button.find('label').text(@options.texts.showElements)
|
96
|
+
@button.find('.icon').removeClass("ri-menu-unfold-line").addClass("ri-menu-fold-line")
|
73
97
|
@button.off('click')
|
74
|
-
@button.click =>
|
98
|
+
@button.on "click", =>
|
75
99
|
@show()
|
76
100
|
false
|
77
101
|
else
|
78
102
|
@button.find('label').text(@options.texts.hideElements)
|
103
|
+
@button.find('.icon').removeClass("ri-menu-fold-line").addClass("ri-menu-unfold-line")
|
79
104
|
@button.off('click')
|
80
|
-
@button.click =>
|
105
|
+
@button.on "click", =>
|
81
106
|
@hide()
|
82
107
|
false
|
@@ -9,7 +9,7 @@ Alchemy.FileProgress = (file) ->
|
|
9
9
|
@$fileProgressElement = $('<div class="progress-container"/>')
|
10
10
|
|
11
11
|
# Append Cancel Button
|
12
|
-
@$fileProgressCancel = $('<a href="javascript:void(0);" class="progress-cancel"><i class="
|
12
|
+
@$fileProgressCancel = $('<a href="javascript:void(0);" class="progress-cancel"><i class="icon ri-close-line ri-fw" /></a>')
|
13
13
|
@$fileProgressElement.append @$fileProgressCancel
|
14
14
|
|
15
15
|
# Append Filename
|
@@ -1,38 +1,45 @@
|
|
1
|
-
window.Alchemy = Alchemy || {}
|
1
|
+
window.Alchemy = Alchemy || {}
|
2
2
|
|
3
3
|
Alchemy.FixedElements = {
|
4
|
-
WRAPPER: '<
|
5
|
-
TABS: '<
|
4
|
+
WRAPPER: '<sl-tab-group id="fixed-elements" />',
|
5
|
+
TABS: '<sl-tab slot="nav" panel="main-content-elements">{{label}}</sl-tab>',
|
6
6
|
|
7
7
|
// Builds fixed elements tabs
|
8
|
-
buildTabs: function(label) {
|
8
|
+
buildTabs: function (label) {
|
9
9
|
var $wrapper = $(this.WRAPPER),
|
10
|
-
|
10
|
+
$tabs = $(this.TABS.replace(/{{label}}/, label))
|
11
11
|
|
12
|
-
$(
|
13
|
-
$(
|
14
|
-
follow: true,
|
15
|
-
followOnSelect: true
|
16
|
-
});
|
12
|
+
$("#main-content-elements").wrap($wrapper)
|
13
|
+
$("#fixed-elements").prepend($tabs)
|
17
14
|
},
|
18
15
|
|
19
16
|
// Creates a fixed element tab.
|
20
|
-
createTab: function(element_id, label) {
|
21
|
-
var $fixed_elements = $(
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
$fixed_elements.append($tab)
|
27
|
-
|
28
|
-
$
|
17
|
+
createTab: function (element_id, label) {
|
18
|
+
var $fixed_elements = $("#fixed-elements")
|
19
|
+
var panel_name = "fixed-element-" + element_id
|
20
|
+
|
21
|
+
var $tab =
|
22
|
+
'<sl-tab slot="nav" panel="' + panel_name + '">' + label + "</sl-tab>"
|
23
|
+
$fixed_elements.append($tab)
|
24
|
+
|
25
|
+
var $panel = $(
|
26
|
+
'<sl-tab-panel name="' + panel_name + '" style="--padding: 0" />'
|
27
|
+
)
|
28
|
+
$fixed_elements.append($panel)
|
29
|
+
window.requestAnimationFrame(function () {
|
30
|
+
$fixed_elements.get(0).show(panel_name)
|
31
|
+
})
|
29
32
|
},
|
30
33
|
|
31
|
-
removeTab: function(element_id) {
|
32
|
-
var $fixed_elements = $(
|
34
|
+
removeTab: function (element_id) {
|
35
|
+
var $fixed_elements = $("#fixed-elements")
|
33
36
|
|
34
|
-
$fixed_elements
|
35
|
-
|
36
|
-
|
37
|
+
$fixed_elements
|
38
|
+
.find('sl-tab[panel="fixed-element-' + element_id + '"]')
|
39
|
+
.remove()
|
40
|
+
$fixed_elements
|
41
|
+
.find('sl-tab-panel[name="fixed-element-' + element_id + '"]')
|
42
|
+
.remove()
|
43
|
+
$fixed_elements.get(0).show("main-content-elements")
|
37
44
|
}
|
38
|
-
}
|
45
|
+
}
|
@@ -12,7 +12,7 @@ Alchemy.Growler =
|
|
12
12
|
|
13
13
|
fade: ->
|
14
14
|
$(".flash:not(.error)", "#flash_notices").delay(5000).queue(-> Alchemy.Growler.dismiss(this))
|
15
|
-
$(".flash", "#flash_notices").click(
|
15
|
+
$(".flash", "#flash_notices").on("click", (e) => @dismiss(e.currentTarget))
|
16
16
|
return
|
17
17
|
|
18
18
|
dismiss: (element) ->
|
@@ -1,19 +1,17 @@
|
|
1
1
|
class window.Alchemy.ImageOverlay extends Alchemy.Dialog
|
2
2
|
|
3
3
|
constructor: (url) ->
|
4
|
-
@options =
|
5
|
-
draggable: false
|
6
4
|
super(url, @options)
|
7
5
|
return
|
8
6
|
|
9
7
|
init: ->
|
10
8
|
Alchemy.ImageLoader(@dialog_body[0])
|
11
|
-
$('.zoomed-picture-background').click (e) =>
|
9
|
+
$('.zoomed-picture-background').on "click", (e) =>
|
12
10
|
e.stopPropagation()
|
13
11
|
return if e.target.nodeName == 'IMG'
|
14
12
|
@close()
|
15
13
|
false
|
16
|
-
$('.picture-overlay-handle').click (e) =>
|
14
|
+
$('.picture-overlay-handle').on "click", (e) =>
|
17
15
|
@dialog.toggleClass('hide-form')
|
18
16
|
false
|
19
17
|
@$previous = $('.previous-picture')
|
@@ -44,7 +42,7 @@ class window.Alchemy.ImageOverlay extends Alchemy.Dialog
|
|
44
42
|
@dialog = $('<div class="alchemy-image-overlay-dialog" />')
|
45
43
|
@dialog_body = $('<div class="alchemy-image-overlay-body" />')
|
46
44
|
@close_button = $('<a class="alchemy-image-overlay-close">
|
47
|
-
<i class="icon
|
45
|
+
<i class="icon ri-close-line ri-fw"></i>
|
48
46
|
</a>')
|
49
47
|
@dialog.append(@close_button)
|
50
48
|
@dialog.append(@dialog_body)
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# Initialize all onload scripts at once.
|
2
|
-
#
|
3
|
-
# Called at jQuery ready event and Turbo page change event.
|
4
|
-
#
|
5
|
-
Alchemy.Initializer = ->
|
6
|
-
|
7
|
-
# We obviously have javascript enabled.
|
8
|
-
$('html').removeClass('no-js')
|
9
|
-
|
10
|
-
# Initialize the GUI.
|
11
|
-
Alchemy.GUI.init()
|
12
|
-
|
13
|
-
# Fade all growl notifications.
|
14
|
-
if $('#flash_notices').length > 0
|
15
|
-
Alchemy.Growler.fade()
|
16
|
-
|
17
|
-
# Add observer for please wait overlay.
|
18
|
-
$('.please_wait, .button_with_label form :submit')
|
19
|
-
.not('*[data-alchemy-confirm]')
|
20
|
-
.click Alchemy.pleaseWaitOverlay
|
21
|
-
|
22
|
-
# Hack for enabling tab focus for <a>'s styled as button.
|
23
|
-
$('a.button').attr({tabindex: 0})
|
24
|
-
|
25
|
-
# Locale select handler
|
26
|
-
$('select#change_locale').on 'change', (e) ->
|
27
|
-
url = window.location.pathname
|
28
|
-
delimiter = if url.match(/\?/) then '&' else '?'
|
29
|
-
Turbo.visit "#{url}#{delimiter}admin_locale=#{$(this).val()}"
|
30
|
-
|
31
|
-
# Site select handler
|
32
|
-
$('select#change_site').on 'change', (e) ->
|
33
|
-
url = window.location.pathname
|
34
|
-
delimiter = if url.match(/\?/) then '&' else '?'
|
35
|
-
Turbo.visit "#{url}#{delimiter}site_id=#{$(this).val()}"
|
36
|
-
|
37
|
-
# Submit forms of selects with `data-autosubmit="true"`
|
38
|
-
$('select[data-auto-submit="true"]').on 'change', (e) ->
|
39
|
-
$(this.form).submit()
|
40
|
-
|
41
|
-
# Attaches the image loader on all images
|
42
|
-
Alchemy.ImageLoader('#main_content')
|
43
|
-
|
44
|
-
# Override the filter of keymaster.js so we can blur the fields on esc key.
|
45
|
-
key.filter = (event) ->
|
46
|
-
tagName = (event.target || event.srcElement).tagName
|
47
|
-
key.isPressed('esc') || !(tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA')
|
48
|
-
|
49
|
-
$(document).on 'turbo:load', ->
|
50
|
-
Alchemy.Initializer()
|
51
|
-
return
|
52
|
-
|
53
|
-
$(document).on 'turbo:before-fetch-request', ->
|
54
|
-
# Ensure that all tinymce editors get removed before parsing a new page
|
55
|
-
Alchemy.Tinymce.removeIntersectionObserver()
|
56
|
-
Alchemy.Tinymce.removeFrom $('.has_tinymce')
|
57
|
-
return
|
@@ -4,13 +4,6 @@
|
|
4
4
|
class window.Alchemy.LinkDialog extends Alchemy.Dialog
|
5
5
|
|
6
6
|
constructor: (@link_object) ->
|
7
|
-
if @link_object.dataset
|
8
|
-
parent_selector = @link_object.dataset.parentSelector
|
9
|
-
parent = document.querySelector(parent_selector)
|
10
|
-
@link_value_field = parent.querySelector("[data-link-value]")
|
11
|
-
@link_title_field = parent.querySelector("[data-link-title]")
|
12
|
-
@link_target_field = parent.querySelector("[data-link-target]")
|
13
|
-
@link_class_field = parent.querySelector("[data-link-class]")
|
14
7
|
@url = Alchemy.routes.link_admin_pages_path
|
15
8
|
@$link_object = $(@link_object)
|
16
9
|
@options =
|
@@ -40,11 +33,11 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
|
|
40
33
|
@initPageSelect()
|
41
34
|
return
|
42
35
|
|
43
|
-
# Attaches click events to
|
36
|
+
# Attaches click events to forms in the link dialog.
|
44
37
|
attachEvents: ->
|
45
|
-
|
46
|
-
|
47
|
-
@link_type =
|
38
|
+
$('[data-link-form-type]', @dialog_body).on "submit", (e) =>
|
39
|
+
e.preventDefault()
|
40
|
+
@link_type = e.target.dataset.linkFormType
|
48
41
|
url = $("##{@link_type}_link").val()
|
49
42
|
if @link_type == 'internal' && @$element_anchor.val() != ''
|
50
43
|
url += "##{@$element_anchor.val()}"
|
@@ -136,11 +129,11 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
|
|
136
129
|
|
137
130
|
# Sets the link either in TinyMCE or on an Ingredient.
|
138
131
|
setLink: (url, title, target) ->
|
139
|
-
Alchemy.setElementDirty(@$link_object.closest('.element-editor'))
|
140
132
|
if @link_object.editor
|
141
133
|
@setTinyMCELink(url, title, target)
|
142
134
|
else
|
143
|
-
@
|
135
|
+
@link_object.setLink(url, title, target, @link_type)
|
136
|
+
return
|
144
137
|
|
145
138
|
# Sets a link in TinyMCE editor.
|
146
139
|
setTinyMCELink: (url, title, target) ->
|
@@ -154,23 +147,11 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
|
|
154
147
|
editor.selection.collapse()
|
155
148
|
true
|
156
149
|
|
157
|
-
# Sets a link on an Ingredient (e.g. Picture).
|
158
|
-
setLinkFields: (url, title, target) ->
|
159
|
-
@link_value_field.value = url
|
160
|
-
@link_value_field.dispatchEvent(new Event("change"))
|
161
|
-
@link_title_field.value = title
|
162
|
-
@link_class_field.value = @link_type
|
163
|
-
@link_target_field.value = target
|
164
|
-
@link_object.classList.add("linked")
|
165
|
-
@link_object.nextElementSibling.classList.replace("disabled", "linked")
|
166
|
-
@link_object.nextElementSibling.removeAttribute("tabindex")
|
167
|
-
return
|
168
|
-
|
169
150
|
# Selects the correct tab for link type and fills all fields.
|
170
151
|
selectTab: ->
|
171
152
|
# Creating an temporary anchor node if we are linking an Picture Ingredient.
|
172
|
-
if (@link_object.
|
173
|
-
@$link = @createTempLink()
|
153
|
+
if (@link_object.getAttribute("is") == "alchemy-link-button")
|
154
|
+
@$link = $(@createTempLink())
|
174
155
|
# Restoring the bookmarked selection inside the TinyMCE of an Richtext.
|
175
156
|
else if (@link_object.node.nodeName == 'A')
|
176
157
|
@$link = $(@link_object.node)
|
@@ -183,27 +164,27 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
|
|
183
164
|
# Checking of what kind the link is (internal, external or file).
|
184
165
|
if @$link.hasClass('external')
|
185
166
|
# Handles an external link.
|
186
|
-
tab =
|
167
|
+
tab = 'overlay_tab_external_link'
|
187
168
|
@$external_link.val(@$link.attr('href'))
|
188
169
|
else if @$link.hasClass('file')
|
189
170
|
# Handles a file link.
|
190
|
-
tab =
|
171
|
+
tab = 'overlay_tab_file_link'
|
191
172
|
@$file_link.select2('val', @$link[0].pathname + @$link[0].search)
|
192
173
|
else if @$link.attr('href').match(/^#/)
|
193
174
|
# Handles an anchor link.
|
194
|
-
tab =
|
175
|
+
tab = 'overlay_tab_anchor_link'
|
195
176
|
@$anchor_link.select2('val', @$link.attr('href'))
|
196
177
|
else if @$link.hasClass('internal')
|
197
178
|
# Handles an internal link.
|
198
|
-
tab =
|
179
|
+
tab = 'overlay_tab_internal_link'
|
199
180
|
@initInternalLinkTab()
|
200
181
|
else
|
201
182
|
# Emit an event to allow extensions hook into the link overlay.
|
202
183
|
@$overlay_tabs.trigger 'SelectLinkTab.Alchemy',
|
203
184
|
link: @$link
|
204
185
|
if tab
|
205
|
-
|
206
|
-
|
186
|
+
window.requestAnimationFrame =>
|
187
|
+
@$overlay_tabs.get(0).show(tab)
|
207
188
|
return
|
208
189
|
|
209
190
|
# Handles actions for internal link tab.
|
@@ -214,15 +195,15 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
|
|
214
195
|
# store the anchor
|
215
196
|
@$element_anchor.val(url[1])
|
216
197
|
|
217
|
-
# Creates a temporay
|
198
|
+
# Creates a temporay 'a' element that holds all values on it.
|
218
199
|
createTempLink: ->
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
200
|
+
tmp_link = document.createElement("a")
|
201
|
+
tmp_link.setAttribute('href', @link_object.linkUrl)
|
202
|
+
tmp_link.setAttribute('title', @link_object.linkTitle)
|
203
|
+
tmp_link.setAttribute('data-link-target', @link_object.linkTarget)
|
204
|
+
tmp_link.setAttribute('target', if @link_object.target == 'blank' then '_blank' else "")
|
205
|
+
tmp_link.classList.add(@link_object.linkClass) if @link_object.linkClass != ''
|
206
|
+
tmp_link
|
226
207
|
|
227
208
|
# Validates url for beginning with an protocol.
|
228
209
|
validateURLFormat: (url) ->
|
@@ -246,25 +227,3 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
|
|
246
227
|
else
|
247
228
|
@$anchor_link.html("<option>#{Alchemy.t('No anchors found')}</option>")
|
248
229
|
return
|
249
|
-
|
250
|
-
# Public class methods
|
251
|
-
|
252
|
-
# Removes link from Ingredient.
|
253
|
-
@removeLink = (link, parent_selector) ->
|
254
|
-
parent = document.querySelector(parent_selector)
|
255
|
-
link_value_field = parent.querySelector("[data-link-value]")
|
256
|
-
link_title_field = parent.querySelector("[data-link-title]")
|
257
|
-
link_target_field = parent.querySelector("[data-link-target]")
|
258
|
-
link_class_field = parent.querySelector("[data-link-class]")
|
259
|
-
link_value_field.value = ""
|
260
|
-
link_value_field.dispatchEvent(new Event("change"))
|
261
|
-
link_title_field.value = ""
|
262
|
-
link_class_field.value = ""
|
263
|
-
link_target_field.value = ""
|
264
|
-
if link.classList.contains('linked')
|
265
|
-
Alchemy.setElementDirty link.closest('.element-editor')
|
266
|
-
link.classList.replace('linked', 'disabled')
|
267
|
-
link.setAttribute('tabindex', '-1')
|
268
|
-
link.blur()
|
269
|
-
link.previousElementSibling.classList.remove("linked")
|
270
|
-
false
|
@@ -19,10 +19,10 @@ class Alchemy.ListFilterHandler
|
|
19
19
|
@filter_field.on 'keyup', (e) =>
|
20
20
|
@clear.show()
|
21
21
|
@_filter @filter_field.val()
|
22
|
-
@clear.click (e) =>
|
22
|
+
@clear.on "click", (e) =>
|
23
23
|
e.preventDefault()
|
24
24
|
@_clear()
|
25
|
-
@filter_field.focus ->
|
25
|
+
@filter_field.on "focus", ->
|
26
26
|
key.setScope('list_filter')
|
27
27
|
key 'esc', 'list_filter', =>
|
28
28
|
@_clear()
|
@@ -48,7 +48,7 @@ Alchemy.initAlchemyPreviewMode = ->
|
|
48
48
|
|
49
49
|
# Mark element in preview frame as selected and scrolls to it.
|
50
50
|
selectElement: (element) ->
|
51
|
-
@blurElements()
|
51
|
+
@blurElements(element)
|
52
52
|
element.classList.add('selected')
|
53
53
|
Object.assign element.style, @getStyle('selected')
|
54
54
|
element.scrollIntoView
|
@@ -57,10 +57,11 @@ Alchemy.initAlchemyPreviewMode = ->
|
|
57
57
|
return
|
58
58
|
|
59
59
|
# Blur all elements in preview frame.
|
60
|
-
blurElements: ->
|
60
|
+
blurElements: (selectedElement) ->
|
61
61
|
@elements.forEach (element) =>
|
62
|
-
element
|
63
|
-
|
62
|
+
if element != selectedElement
|
63
|
+
element.classList.remove('selected')
|
64
|
+
Object.assign element.style, @getStyle('reset')
|
64
65
|
return
|
65
66
|
return
|
66
67
|
|
@@ -10,7 +10,7 @@ Alchemy.PreviewWindow =
|
|
10
10
|
$iframe = $("<iframe name=\"alchemy_preview_window\" src=\"#{@previewUrl}\" id=\"alchemy_preview_window\" frameborder=\"0\"/>")
|
11
11
|
$reload = $('#reload_preview_button')
|
12
12
|
@_showSpinner()
|
13
|
-
$iframe.load =>
|
13
|
+
$iframe.on "load", =>
|
14
14
|
@_hideSpinner()
|
15
15
|
$('body').append($iframe)
|
16
16
|
@currentWindow = $iframe
|
@@ -31,7 +31,7 @@ Alchemy.PreviewWindow =
|
|
31
31
|
@_showSpinner()
|
32
32
|
# We need to be sure that no load event is binded on the preview frame.
|
33
33
|
$iframe.off('load')
|
34
|
-
$iframe.load (e) =>
|
34
|
+
$iframe.on "load", (e) =>
|
35
35
|
@_hideSpinner()
|
36
36
|
if callback
|
37
37
|
callback.call(e, $iframe)
|
@@ -49,13 +49,13 @@ Alchemy.PreviewWindow =
|
|
49
49
|
|
50
50
|
_hideSpinner: ->
|
51
51
|
@spinner.stop()
|
52
|
-
@reload.html('<i class="icon
|
52
|
+
@reload.html('<i class="icon ri-refresh-line ri-fw"></i>')
|
53
53
|
|
54
54
|
_bindReloadButton: ->
|
55
55
|
$reload = $('#reload_preview_button')
|
56
56
|
key 'alt+r', =>
|
57
57
|
@refresh()
|
58
|
-
$reload.click (e) =>
|
58
|
+
$reload.on "click", (e) =>
|
59
59
|
e.preventDefault()
|
60
60
|
@refresh()
|
61
61
|
|
@@ -71,7 +71,7 @@ Alchemy.PreviewWindow =
|
|
71
71
|
null
|
72
72
|
|
73
73
|
_bindSelect: ->
|
74
|
-
$(@select).change (e) =>
|
74
|
+
$(@select).on "change", (e) =>
|
75
75
|
@previewUrl = e.target.value
|
76
76
|
option = e.target.querySelector("option[value='#{@previewUrl}']")
|
77
77
|
window.localStorage.setItem("alchemyPreview", option.text)
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<a class="page_folder" data-page-id="{{ page.id }}">
|
2
|
-
<i class="
|
1
|
+
<a class="page_folder icon_button" data-page-id="{{ page.id }}">
|
2
|
+
<i class="icon ri-arrow-{{#if page.folded }}right{{else}}down{{/if}}-s-line ri-fw"></i>
|
3
3
|
</a>
|
@@ -0,0 +1,82 @@
|
|
1
|
+
:root {
|
2
|
+
// Sizes
|
3
|
+
--spacing-1: 4px;
|
4
|
+
--spacing-2: 8px;
|
5
|
+
--spacing-3: 12px;
|
6
|
+
--spacing-4: 16px;
|
7
|
+
|
8
|
+
// Font Families
|
9
|
+
--font-mono: Menlo, Monaco, "Bitstream Vera Sans Mono", "Lucida Console",
|
10
|
+
Terminal, monospace;
|
11
|
+
--font-sans: "Open Sans", "Lucida Grande", "Lucida Sans Unicode",
|
12
|
+
"Lucida Sans", Verdana, Tahoma, sans-serif;
|
13
|
+
|
14
|
+
// Font Size - at the moment only in Pixel, because the base font size is 12px
|
15
|
+
--font-size_small: 12px; // 0.875rem
|
16
|
+
--font-size_medium: 14px; // 1rem
|
17
|
+
--font-size_large: 16px; // 1.25 rem
|
18
|
+
|
19
|
+
--font-weigth_normal: 500;
|
20
|
+
--font-weigth_bold: 700;
|
21
|
+
|
22
|
+
// border-radius
|
23
|
+
--border-radius_medium: 3px;
|
24
|
+
|
25
|
+
// Colors
|
26
|
+
--color-blue_very_light: hsl(203deg, 32%, 85%);
|
27
|
+
--color-blue_light: hsl(212deg, 51%, 50%);
|
28
|
+
--color-blue_medium: hsl(212deg, 52%, 36%);
|
29
|
+
--color-blue_dark: hsl(212deg, 51%, 26%);
|
30
|
+
|
31
|
+
--color-green_very_light: hsl(88deg, 47%, 88%);
|
32
|
+
--color-green_light: hsl(127deg, 25%, 69%);
|
33
|
+
--color-green_medium: hsl(127deg, 25%, 48%);
|
34
|
+
--color-green_dark: hsl(128deg, 32%, 26%);
|
35
|
+
|
36
|
+
--color-yellow_light: hsl(60, 81%, 92%);
|
37
|
+
--color-yellow_medium: hsl(56, 68%, 85%);
|
38
|
+
--color-yellow_dark: hsl(56, 53%, 29%);
|
39
|
+
|
40
|
+
--color-orange_medium: hsl(42deg, 100%, 74%);
|
41
|
+
--color-orange_dark: hsl(28deg, 77%, 68%);
|
42
|
+
--color-orange_very_dark: hsl(28deg, 77%, 48%);
|
43
|
+
|
44
|
+
--color-red_very_light: hsl(360deg, 47%, 88%);
|
45
|
+
--color-red_light: hsl(360deg, 25%, 69%);
|
46
|
+
--color-red_medium: hsl(360deg, 51%, 42%);
|
47
|
+
--color-red_dark: hsl(360deg, 51%, 25%);
|
48
|
+
|
49
|
+
--color-grey-blue_light: hsl(224deg, 23%, 60%);
|
50
|
+
--color-grey-blue_medium: hsl(224deg, 23%, 40%);
|
51
|
+
--color-grey-blue_dark: hsl(224deg, 23%, 26%);
|
52
|
+
|
53
|
+
--color-grey_light: hsl(0deg, 0%, 94%);
|
54
|
+
--color-grey_medium: hsl(0deg, 0%, 78%);
|
55
|
+
--color-grey_dark: hsl(0deg, 0%, 40%);
|
56
|
+
--color-grey_very_dark: hsl(0deg, 0%, 20%);
|
57
|
+
--color-text: hsla(224, 22.7%, 25.9%, 0.8);
|
58
|
+
}
|
59
|
+
|
60
|
+
.alchemy-light {
|
61
|
+
--outline-color: var(--color-orange_dark);
|
62
|
+
|
63
|
+
--font-color_failed: var(--color-red_medium);
|
64
|
+
--font-color_default: var(--color-text);
|
65
|
+
|
66
|
+
--tabs_indicator-color: var(--color-orange_dark);
|
67
|
+
--tabs_track-color: var(--color-grey_light);
|
68
|
+
--sl-input-label-color: var(--color-text);
|
69
|
+
|
70
|
+
--file-upload_background-color: hsla(0deg, 0%, 80%, 0.8);
|
71
|
+
--file-upload_single-upload-background-color: var(--color-grey_light);
|
72
|
+
--file-upload_progress-track-color: var(--color-blue_very_light);
|
73
|
+
--file-upload_progress-indicator-color: var(--color-blue_dark);
|
74
|
+
|
75
|
+
--file-upload_progress-indicator-color-canceled: hsla(0deg, 0%, 60%, 0.8);
|
76
|
+
--file-upload_progress-indicator-color-failed: var(--color-red_medium);
|
77
|
+
--file-upload_progress-indicator-color-invalid: var(--color-red_medium);
|
78
|
+
--file-upload_progress-indicator-color-successful: var(--color-green_medium);
|
79
|
+
--file-upload_progress-indicator-color-upload-finished: var(
|
80
|
+
--color-blue_dark
|
81
|
+
);
|
82
|
+
}
|