alchemy_cms 7.0.8 → 7.1.0.pre.b2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (394) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +162 -0
  3. data/Gemfile +9 -11
  4. data/README.md +11 -9
  5. data/alchemy_cms.gemspec +4 -3
  6. data/app/assets/config/alchemy_manifest.js +3 -5
  7. data/app/assets/images/alchemy/missing-image.svg +1 -1
  8. data/app/assets/javascripts/alchemy/admin.js +1 -23
  9. data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +2 -3
  10. data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +19 -34
  11. data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +38 -13
  12. data/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +1 -1
  13. data/app/assets/javascripts/alchemy/alchemy.fixed_elements.js +32 -25
  14. data/app/assets/javascripts/alchemy/alchemy.growler.js.coffee +1 -1
  15. data/app/assets/javascripts/alchemy/alchemy.image_overlay.coffee +3 -5
  16. data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +0 -57
  17. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +24 -65
  18. data/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee +2 -2
  19. data/app/assets/javascripts/alchemy/alchemy.preview.js.coffee +5 -4
  20. data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +5 -5
  21. data/app/assets/javascripts/alchemy/templates/index.js +0 -2
  22. data/app/assets/javascripts/alchemy/templates/node_folder.hbs +1 -1
  23. data/app/assets/javascripts/alchemy/templates/page.hbs +1 -1
  24. data/app/assets/javascripts/alchemy/templates/page_folder.hbs +2 -2
  25. data/app/assets/javascripts/tinymce/icons/remixicons/icons.js +93 -0
  26. data/app/assets/javascripts/tinymce/plugins/alchemy_link/plugin.min.js +37 -18
  27. data/app/assets/stylesheets/alchemy/_custom-properties.scss +82 -0
  28. data/app/assets/stylesheets/alchemy/_mixins.scss +38 -30
  29. data/app/assets/stylesheets/alchemy/_variables.scss +23 -8
  30. data/app/assets/stylesheets/alchemy/admin.scss +3 -4
  31. data/app/assets/stylesheets/alchemy/archive.scss +110 -50
  32. data/app/assets/stylesheets/alchemy/attachments.scss +5 -4
  33. data/app/assets/stylesheets/alchemy/buttons.scss +41 -166
  34. data/app/assets/stylesheets/alchemy/dashboard.scss +31 -6
  35. data/app/assets/stylesheets/alchemy/dialogs.scss +12 -28
  36. data/app/assets/stylesheets/alchemy/elements.scss +272 -282
  37. data/app/assets/stylesheets/alchemy/flash.scss +20 -12
  38. data/app/assets/stylesheets/alchemy/forms.scss +21 -34
  39. data/app/assets/stylesheets/alchemy/frame.scss +11 -32
  40. data/app/assets/stylesheets/alchemy/hints.scss +4 -62
  41. data/app/assets/stylesheets/alchemy/image_library.scss +36 -33
  42. data/app/assets/stylesheets/alchemy/menubar.scss +7 -6
  43. data/app/assets/stylesheets/alchemy/navigation.scss +27 -15
  44. data/app/assets/stylesheets/alchemy/nodes.scss +11 -7
  45. data/app/assets/stylesheets/alchemy/notices.scss +16 -4
  46. data/app/assets/stylesheets/alchemy/page-select.scss +10 -2
  47. data/app/assets/stylesheets/alchemy/pagination.scss +22 -13
  48. data/app/assets/stylesheets/alchemy/resource_info.scss +7 -5
  49. data/app/assets/stylesheets/alchemy/selects.scss +49 -42
  50. data/app/assets/stylesheets/alchemy/shoelace.scss +345 -0
  51. data/app/assets/stylesheets/alchemy/sitemap.scss +24 -14
  52. data/app/assets/stylesheets/alchemy/spinner.scss +9 -19
  53. data/app/assets/stylesheets/alchemy/tables.scss +16 -24
  54. data/app/assets/stylesheets/alchemy/tags.scss +4 -0
  55. data/app/assets/stylesheets/alchemy/toolbar.scss +29 -25
  56. data/app/assets/stylesheets/alchemy/upload.scss +140 -89
  57. data/app/assets/stylesheets/tinymce/skins/content/alchemy/content.min.scss +69 -0
  58. data/app/assets/stylesheets/tinymce/skins/skintool.json +38 -0
  59. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.css +711 -0
  60. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.css +705 -0
  61. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.min.css +7 -0
  62. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.min.css +7 -0
  63. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.css +29 -0
  64. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.min.css +7 -0
  65. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/fonts/tinymce-mobile.woff +0 -0
  66. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.min.scss +3798 -0
  67. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.css +677 -0
  68. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.min.css +7 -0
  69. data/app/components/alchemy/admin/node_select.rb +39 -0
  70. data/app/components/alchemy/admin/page_select.rb +42 -0
  71. data/app/controllers/alchemy/admin/base_controller.rb +5 -6
  72. data/app/controllers/alchemy/admin/elements_controller.rb +63 -35
  73. data/app/controllers/alchemy/admin/pages_controller.rb +9 -4
  74. data/app/controllers/alchemy/base_controller.rb +4 -2
  75. data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +1 -1
  76. data/app/controllers/concerns/alchemy/site_redirects.rb +1 -1
  77. data/app/decorators/alchemy/element_editor.rb +0 -2
  78. data/app/helpers/alchemy/admin/attachments_helper.rb +6 -5
  79. data/app/helpers/alchemy/admin/base_helper.rb +17 -12
  80. data/app/helpers/alchemy/admin/ingredients_helper.rb +4 -1
  81. data/app/helpers/alchemy/admin/pages_helper.rb +5 -11
  82. data/app/helpers/alchemy/base_helper.rb +47 -13
  83. data/app/javascript/alchemy_admin/clipboard.js +16 -0
  84. data/app/javascript/alchemy_admin/components/alchemy_html_element.js +129 -0
  85. data/app/javascript/alchemy_admin/components/button.js +59 -0
  86. data/app/javascript/alchemy_admin/components/char_counter.js +40 -0
  87. data/app/javascript/alchemy_admin/components/datepicker.js +39 -0
  88. data/app/javascript/alchemy_admin/components/dialog_link.js +45 -0
  89. data/app/javascript/alchemy_admin/components/element_editor/publish_element_button.js +36 -0
  90. data/app/javascript/alchemy_admin/components/element_editor.js +553 -0
  91. data/app/javascript/alchemy_admin/components/ingredient_group.js +54 -0
  92. data/app/javascript/alchemy_admin/components/link_buttons/link_button.js +48 -0
  93. data/app/javascript/alchemy_admin/components/link_buttons/unlink_button.js +38 -0
  94. data/app/javascript/alchemy_admin/components/link_buttons.js +79 -0
  95. data/app/javascript/alchemy_admin/components/node_select.js +45 -0
  96. data/app/javascript/alchemy_admin/components/overlay.js +18 -0
  97. data/app/javascript/alchemy_admin/components/page_select.js +63 -0
  98. data/app/javascript/alchemy_admin/components/remote_select.js +134 -0
  99. data/app/javascript/alchemy_admin/components/select.js +12 -0
  100. data/app/javascript/alchemy_admin/components/spinner.js +31 -0
  101. data/app/javascript/alchemy_admin/components/tinymce.js +134 -0
  102. data/app/javascript/alchemy_admin/components/uploader/file_upload.js +266 -0
  103. data/app/javascript/alchemy_admin/components/uploader/progress.js +258 -0
  104. data/app/javascript/alchemy_admin/components/uploader.js +132 -0
  105. data/app/javascript/alchemy_admin/dirty.js +49 -0
  106. data/app/javascript/alchemy_admin/file_editors.js +1 -1
  107. data/app/javascript/alchemy_admin/gui.js +14 -0
  108. data/app/javascript/alchemy_admin/i18n.js +12 -8
  109. data/app/javascript/alchemy_admin/image_cropper.js +6 -3
  110. data/app/javascript/alchemy_admin/image_loader.js +7 -15
  111. data/app/javascript/alchemy_admin/ingredient_anchor_link.js +2 -5
  112. data/app/javascript/alchemy_admin/initializer.js +65 -0
  113. data/app/javascript/alchemy_admin/locales/en.js +31 -0
  114. data/app/javascript/alchemy_admin/picture_editors.js +6 -4
  115. data/app/javascript/alchemy_admin/picture_selector.js +38 -0
  116. data/app/javascript/alchemy_admin/please_wait_overlay.js +8 -0
  117. data/app/javascript/alchemy_admin/sortable_elements.js +78 -0
  118. data/app/javascript/alchemy_admin/spinner.js +36 -0
  119. data/app/javascript/alchemy_admin/tags_autocomplete.js +46 -0
  120. data/app/javascript/alchemy_admin/utils/ajax.js +6 -5
  121. data/app/javascript/alchemy_admin/utils/debounce.js +10 -0
  122. data/app/javascript/alchemy_admin/utils/dom_helpers.js +20 -0
  123. data/app/javascript/alchemy_admin/utils/format.js +11 -0
  124. data/app/javascript/alchemy_admin/utils/max.js +3 -0
  125. data/app/javascript/alchemy_admin/utils/string_conversions.js +10 -0
  126. data/app/javascript/alchemy_admin.js +64 -13
  127. data/app/javascript/menubar.js +10 -0
  128. data/app/models/alchemy/attachment.rb +9 -11
  129. data/app/models/alchemy/element.rb +11 -0
  130. data/app/models/alchemy/ingredients/richtext.rb +1 -10
  131. data/app/models/alchemy/node.rb +4 -0
  132. data/app/models/alchemy/page/page_naming.rb +7 -0
  133. data/app/models/alchemy/page/page_natures.rb +10 -2
  134. data/app/models/alchemy/page.rb +11 -51
  135. data/app/models/alchemy/picture/url.rb +1 -9
  136. data/app/models/alchemy/picture_variant.rb +11 -2
  137. data/app/models/concerns/alchemy/picture_thumbnails.rb +1 -1
  138. data/app/serializers/alchemy/page_tree_serializer.rb +2 -1
  139. data/app/services/alchemy/copy_page.rb +98 -0
  140. data/app/views/alchemy/_menubar.html.erb +17 -13
  141. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +14 -10
  142. data/app/views/alchemy/admin/attachments/_attachment.html.erb +44 -36
  143. data/app/views/alchemy/admin/attachments/_replace_button.html.erb +15 -21
  144. data/app/views/alchemy/admin/attachments/archive_overlay.js.erb +0 -1
  145. data/app/views/alchemy/admin/attachments/assign.js.erb +1 -1
  146. data/app/views/alchemy/admin/attachments/index.html.erb +6 -4
  147. data/app/views/alchemy/admin/attachments/show.html.erb +10 -23
  148. data/app/views/alchemy/admin/clipboard/clear.js.erb +1 -1
  149. data/app/views/alchemy/admin/clipboard/index.html.erb +3 -7
  150. data/app/views/alchemy/admin/clipboard/insert.js.erb +1 -1
  151. data/app/views/alchemy/admin/crop.html.erb +1 -1
  152. data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +1 -1
  153. data/app/views/alchemy/admin/dashboard/index.html.erb +13 -11
  154. data/app/views/alchemy/admin/dashboard/info.html.erb +7 -7
  155. data/app/views/alchemy/admin/elements/_add_nested_element_form.html.erb +21 -23
  156. data/app/views/alchemy/admin/elements/_element.html.erb +52 -44
  157. data/app/views/alchemy/admin/elements/_footer.html.erb +1 -1
  158. data/app/views/alchemy/admin/elements/_form.html.erb +1 -1
  159. data/app/views/alchemy/admin/elements/_header.html.erb +11 -12
  160. data/app/views/alchemy/admin/elements/_toolbar.html.erb +33 -45
  161. data/app/views/alchemy/admin/elements/create.js.erb +7 -15
  162. data/app/views/alchemy/admin/elements/destroy.js.erb +0 -2
  163. data/app/views/alchemy/admin/elements/index.html.erb +27 -24
  164. data/app/views/alchemy/admin/elements/new.html.erb +9 -11
  165. data/app/views/alchemy/admin/ingredients/_file_fields.html.erb +2 -2
  166. data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +3 -3
  167. data/app/views/alchemy/admin/ingredients/_video_fields.html.erb +1 -2
  168. data/app/views/alchemy/admin/languages/_form.html.erb +2 -3
  169. data/app/views/alchemy/admin/languages/_language.html.erb +15 -8
  170. data/app/views/alchemy/admin/languages/_table.html.erb +1 -0
  171. data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +28 -16
  172. data/app/views/alchemy/admin/layoutpages/index.html.erb +2 -2
  173. data/app/views/alchemy/admin/legacy_page_urls/_legacy_page_url.html.erb +12 -8
  174. data/app/views/alchemy/admin/legacy_page_urls/_new.html.erb +1 -1
  175. data/app/views/alchemy/admin/nodes/_form.html.erb +20 -21
  176. data/app/views/alchemy/admin/nodes/_node.html.erb +39 -34
  177. data/app/views/alchemy/admin/nodes/index.html.erb +1 -1
  178. data/app/views/alchemy/admin/pages/_anchor_link.html.erb +4 -4
  179. data/app/views/alchemy/admin/pages/_create_language_form.html.erb +2 -2
  180. data/app/views/alchemy/admin/pages/_current_page.html.erb +1 -1
  181. data/app/views/alchemy/admin/pages/_external_link.html.erb +4 -4
  182. data/app/views/alchemy/admin/pages/_file_link.html.erb +5 -5
  183. data/app/views/alchemy/admin/pages/_form.html.erb +10 -21
  184. data/app/views/alchemy/admin/pages/_internal_link.html.erb +4 -4
  185. data/app/views/alchemy/admin/pages/_locked_page.html.erb +2 -2
  186. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +4 -17
  187. data/app/views/alchemy/admin/pages/_page.html.erb +76 -72
  188. data/app/views/alchemy/admin/pages/_page_infos.html.erb +23 -7
  189. data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +2 -1
  190. data/app/views/alchemy/admin/pages/_page_status.html.erb +11 -21
  191. data/app/views/alchemy/admin/pages/_publication_fields.html.erb +2 -5
  192. data/app/views/alchemy/admin/pages/_table.html.erb +1 -1
  193. data/app/views/alchemy/admin/pages/_table_row.html.erb +43 -39
  194. data/app/views/alchemy/admin/pages/_toolbar.html.erb +43 -38
  195. data/app/views/alchemy/admin/pages/configure.html.erb +12 -14
  196. data/app/views/alchemy/admin/pages/edit.html.erb +80 -103
  197. data/app/views/alchemy/admin/pages/info.html.erb +20 -11
  198. data/app/views/alchemy/admin/pages/link.html.erb +22 -16
  199. data/app/views/alchemy/admin/pages/new.html.erb +9 -11
  200. data/app/views/alchemy/admin/pages/unlock.js.erb +10 -3
  201. data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +15 -13
  202. data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +3 -5
  203. data/app/views/alchemy/admin/partials/_routes.html.erb +10 -2
  204. data/app/views/alchemy/admin/partials/_site_select.html.erb +6 -5
  205. data/app/views/alchemy/admin/partials/_toolbar_button.html.erb +28 -23
  206. data/app/views/alchemy/admin/pictures/_archive.html.erb +5 -5
  207. data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -1
  208. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +21 -23
  209. data/app/views/alchemy/admin/pictures/_infos.html.erb +2 -6
  210. data/app/views/alchemy/admin/pictures/_picture.html.erb +17 -21
  211. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +17 -16
  212. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
  213. data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +1 -1
  214. data/app/views/alchemy/admin/pictures/assign.js.erb +1 -1
  215. data/app/views/alchemy/admin/pictures/index.html.erb +34 -30
  216. data/app/views/alchemy/admin/pictures/show.html.erb +3 -3
  217. data/app/views/alchemy/admin/resources/_filter.html.erb +2 -2
  218. data/app/views/alchemy/admin/resources/_form.html.erb +2 -2
  219. data/app/views/alchemy/admin/resources/_per_page_select.html.erb +1 -1
  220. data/app/views/alchemy/admin/resources/_resource.html.erb +16 -9
  221. data/app/views/alchemy/admin/resources/_table.html.erb +4 -1
  222. data/app/views/alchemy/admin/resources/index.html.erb +22 -19
  223. data/app/views/alchemy/admin/sites/index.html.erb +2 -1
  224. data/app/views/alchemy/admin/styleguide/index.html.erb +54 -28
  225. data/app/views/alchemy/admin/tags/_tag.html.erb +16 -14
  226. data/app/views/alchemy/admin/tags/index.html.erb +15 -12
  227. data/app/views/alchemy/admin/tinymce/_setup.html.erb +28 -0
  228. data/app/views/alchemy/admin/uploader/_button.html.erb +23 -29
  229. data/app/views/alchemy/admin/uploader/_setup.html.erb +3 -8
  230. data/app/views/alchemy/base/500.html.erb +1 -1
  231. data/app/views/alchemy/base/error_notice.js.erb +0 -1
  232. data/app/views/alchemy/ingredients/_boolean_editor.html.erb +1 -1
  233. data/app/views/alchemy/ingredients/_datetime_editor.html.erb +1 -1
  234. data/app/views/alchemy/ingredients/_file_editor.html.erb +5 -5
  235. data/app/views/alchemy/ingredients/_link_editor.html.erb +1 -1
  236. data/app/views/alchemy/ingredients/_node_editor.html.erb +6 -19
  237. data/app/views/alchemy/ingredients/_page_editor.html.erb +7 -19
  238. data/app/views/alchemy/ingredients/_picture_editor.html.erb +2 -2
  239. data/app/views/alchemy/ingredients/_richtext_editor.html.erb +6 -15
  240. data/app/views/alchemy/ingredients/_select_editor.html.erb +2 -1
  241. data/app/views/alchemy/ingredients/_text_editor.html.erb +1 -1
  242. data/app/views/alchemy/ingredients/shared/_anchor.html.erb +1 -1
  243. data/app/views/alchemy/ingredients/shared/_link_tools.html.erb +10 -20
  244. data/app/views/alchemy/ingredients/shared/_picture_tools.html.erb +42 -49
  245. data/app/views/kaminari/alchemy/_first_page.html.erb +4 -2
  246. data/app/views/kaminari/alchemy/_gap.html.erb +1 -1
  247. data/app/views/kaminari/alchemy/_last_page.html.erb +4 -2
  248. data/app/views/kaminari/alchemy/_next_page.html.erb +4 -2
  249. data/app/views/kaminari/alchemy/_prev_page.html.erb +4 -2
  250. data/app/views/layouts/alchemy/admin.html.erb +10 -29
  251. data/bundles/shoelace.js +10 -0
  252. data/bundles/tinymce.js +20 -0
  253. data/config/alchemy/config.yml +11 -10
  254. data/config/alchemy/modules.yml +30 -30
  255. data/config/brakeman.ignore +0 -34
  256. data/config/importmap.rb +9 -5
  257. data/config/initializers/dragonfly.rb +1 -0
  258. data/config/initializers/rails_live_reload.rb +13 -0
  259. data/config/locales/alchemy.en.yml +25 -9
  260. data/config/routes.rb +2 -1
  261. data/lib/alchemy/auth_accessors.rb +6 -1
  262. data/lib/alchemy/config.rb +24 -2
  263. data/lib/alchemy/dev_support/live_reload_watcher.rb +5 -0
  264. data/lib/alchemy/engine.rb +10 -3
  265. data/lib/alchemy/forms/builder.rb +18 -12
  266. data/lib/alchemy/resources_helper.rb +3 -3
  267. data/lib/alchemy/test_support/capybara_helpers.rb +8 -5
  268. data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +6 -6
  269. data/lib/alchemy/test_support/rspec_matchers.rb +14 -0
  270. data/lib/alchemy/test_support/shared_uploader_examples.rb +1 -1
  271. data/lib/alchemy/tinymce.rb +19 -3
  272. data/lib/alchemy/version.rb +1 -1
  273. data/package.json +30 -9
  274. data/rollup.config.mjs +65 -0
  275. data/vendor/assets/fonts/remixicon.eot +0 -0
  276. data/vendor/assets/fonts/remixicon.svg +7816 -0
  277. data/vendor/assets/fonts/remixicon.ttf +0 -0
  278. data/vendor/assets/fonts/remixicon.woff +0 -0
  279. data/vendor/assets/fonts/remixicon.woff2 +0 -0
  280. data/vendor/assets/stylesheets/remixicon.scss +10480 -0
  281. data/vendor/assets/stylesheets/tinymce/skins/content/default/content.min.css +1 -0
  282. data/vendor/javascript/clipboard.min.js +7 -0
  283. data/vendor/javascript/flatpickr.min.js +1 -0
  284. data/vendor/javascript/keymaster.min.js +1 -0
  285. data/vendor/javascript/rails-ujs.min.js +1 -0
  286. data/vendor/javascript/shoelace.min.js +995 -0
  287. data/vendor/javascript/sortable.min.js +7 -0
  288. data/vendor/javascript/tinymce.min.js +1 -0
  289. data/vendor/javascript/ungap-custom-elements.min.js +3 -0
  290. metadata +111 -124
  291. data/.codeclimate.yml +0 -35
  292. data/.editorconfig +0 -23
  293. data/.github/FUNDING.yml +0 -4
  294. data/.github/ISSUE_TEMPLATE/Bug_report.md +0 -22
  295. data/.github/ISSUE_TEMPLATE/Feature_request.md +0 -17
  296. data/.github/PULL_REQUEST_TEMPLATE.md +0 -18
  297. data/.github/workflows/brakeman-analysis.yml +0 -46
  298. data/.github/workflows/lint.yml +0 -37
  299. data/.github/workflows/stale.yml +0 -33
  300. data/.github/workflows/test.yml +0 -124
  301. data/.gitignore +0 -31
  302. data/.hound.yml +0 -9
  303. data/.localeapp/config.rb +0 -8
  304. data/.prettierrc +0 -6
  305. data/.rspec +0 -1
  306. data/.rubocop.yml +0 -7
  307. data/.standard.yml +0 -4
  308. data/.yardopts +0 -5
  309. data/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee +0 -30
  310. data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +0 -53
  311. data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +0 -45
  312. data/app/assets/javascripts/alchemy/alchemy.char_counter.js.coffee +0 -19
  313. data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +0 -59
  314. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +0 -79
  315. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +0 -267
  316. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +0 -27
  317. data/app/assets/javascripts/alchemy/alchemy.spinner.js +0 -32
  318. data/app/assets/javascripts/alchemy/alchemy.tooltips.coffee +0 -10
  319. data/app/assets/javascripts/alchemy/alchemy.uploader.js.coffee +0 -131
  320. data/app/assets/javascripts/alchemy/menubar.js.coffee +0 -8
  321. data/app/assets/javascripts/alchemy/node_select.js +0 -39
  322. data/app/assets/javascripts/alchemy/page_select.js +0 -46
  323. data/app/assets/javascripts/alchemy/templates/node.hbs +0 -16
  324. data/app/assets/javascripts/alchemy/templates/spinner.hbs +0 -7
  325. data/app/assets/stylesheets/alchemy/jquery-ui.scss +0 -435
  326. data/app/assets/stylesheets/tinymce/skins/alchemy/content.min.css.scss +0 -94
  327. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.svg +0 -63
  328. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.ttf +0 -0
  329. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.woff +0 -0
  330. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.svg +0 -129
  331. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.ttf +0 -0
  332. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.woff +0 -0
  333. data/app/assets/stylesheets/tinymce/skins/alchemy/img/anchor.gif +0 -0
  334. data/app/assets/stylesheets/tinymce/skins/alchemy/img/loader.gif +0 -0
  335. data/app/assets/stylesheets/tinymce/skins/alchemy/img/object.gif +0 -0
  336. data/app/assets/stylesheets/tinymce/skins/alchemy/img/trans.gif +0 -0
  337. data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +0 -2105
  338. data/app/javascript/alchemy_admin/datepicker.js +0 -33
  339. data/app/javascript/alchemy_admin/tinymce.js +0 -146
  340. data/app/javascript/alchemy_admin/translations.js +0 -32
  341. data/app/views/alchemy/admin/elements/fold.js.erb +0 -33
  342. data/app/views/alchemy/admin/elements/order.js.erb +0 -11
  343. data/app/views/alchemy/admin/elements/publish.js.erb +0 -21
  344. data/app/views/alchemy/admin/elements/update.js.erb +0 -27
  345. data/vendor/assets/fonts/fa-regular-400.eot +0 -0
  346. data/vendor/assets/fonts/fa-regular-400.svg +0 -803
  347. data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
  348. data/vendor/assets/fonts/fa-regular-400.woff +0 -0
  349. data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
  350. data/vendor/assets/fonts/fa-solid-900.eot +0 -0
  351. data/vendor/assets/fonts/fa-solid-900.svg +0 -4938
  352. data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
  353. data/vendor/assets/fonts/fa-solid-900.woff +0 -0
  354. data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
  355. data/vendor/assets/javascripts/clipboard.min.js +0 -7
  356. data/vendor/assets/javascripts/fileupload/jquery.fileupload-process.js +0 -178
  357. data/vendor/assets/javascripts/fileupload/jquery.fileupload-validate.js +0 -125
  358. data/vendor/assets/javascripts/fileupload/jquery.fileupload.js +0 -1502
  359. data/vendor/assets/javascripts/fileupload/jquery.iframe-transport.js +0 -224
  360. data/vendor/assets/javascripts/jquery-ui/data.js +0 -45
  361. data/vendor/assets/javascripts/jquery-ui/ie.js +0 -20
  362. data/vendor/assets/javascripts/jquery-ui/keycode.js +0 -51
  363. data/vendor/assets/javascripts/jquery-ui/plugin.js +0 -49
  364. data/vendor/assets/javascripts/jquery-ui/safe-active-element.js +0 -46
  365. data/vendor/assets/javascripts/jquery-ui/safe-blur.js +0 -27
  366. data/vendor/assets/javascripts/jquery-ui/scroll-parent.js +0 -50
  367. data/vendor/assets/javascripts/jquery-ui/unique-id.js +0 -54
  368. data/vendor/assets/javascripts/jquery-ui/version.js +0 -20
  369. data/vendor/assets/javascripts/jquery-ui/widget.js +0 -754
  370. data/vendor/assets/javascripts/jquery-ui/widgets/draggable.js +0 -1268
  371. data/vendor/assets/javascripts/jquery-ui/widgets/mouse.js +0 -241
  372. data/vendor/assets/javascripts/jquery-ui/widgets/sortable.js +0 -1623
  373. data/vendor/assets/javascripts/jquery-ui/widgets/tabs.js +0 -931
  374. data/vendor/assets/javascripts/jquery_plugins/jquery.scrollTo.min.js +0 -7
  375. data/vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js +0 -296
  376. data/vendor/assets/javascripts/keymaster.js +0 -296
  377. data/vendor/assets/javascripts/requestAnimationFrame.js +0 -31
  378. data/vendor/assets/javascripts/tinymce/license.txt +0 -504
  379. data/vendor/assets/javascripts/tinymce/tinymce.min.js +0 -2
  380. data/vendor/assets/stylesheets/fontawesome/_animated.scss +0 -20
  381. data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +0 -20
  382. data/vendor/assets/stylesheets/fontawesome/_core.scss +0 -21
  383. data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +0 -6
  384. data/vendor/assets/stylesheets/fontawesome/_icons.scss +0 -1441
  385. data/vendor/assets/stylesheets/fontawesome/_larger.scss +0 -23
  386. data/vendor/assets/stylesheets/fontawesome/_list.scss +0 -18
  387. data/vendor/assets/stylesheets/fontawesome/_mixins.scss +0 -56
  388. data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +0 -24
  389. data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +0 -5
  390. data/vendor/assets/stylesheets/fontawesome/_stacked.scss +0 -31
  391. data/vendor/assets/stylesheets/fontawesome/_variables.scss +0 -1458
  392. data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +0 -16
  393. data/vendor/assets/stylesheets/fontawesome/regular.scss +0 -23
  394. 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="{&quot;size&quot;:&quot;800x600&quot;,&quot;title&quot;:&quot;Styleguide in Dialog&quot;}"
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 alchemy_selectbox" id="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
- <input type="text" data-datepicker-type="datetime" id="datetime_picker">
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
- <input type="text" data-datepicker-type="date" id="date_picker">
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
- <input type="text" data-datepicker-type="time" id="time_picker">
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
- <div class="input">
109
- <label class="control-label" for="string_with_counter">String with char counter</label>
110
- <input data-alchemy-char-counter="60" type="text" id="string_with_counter">
111
- </div>
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
- <div class="input text">
128
- <label class="text control-label" for="textarea_with_counter">Textarea with char counter</label>
129
- <textarea data-alchemy-char-counter="160" class="text" id="textarea_with_counter"></textarea>
130
- </div>
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
- <textarea class="text" id="tinymce_1"></textarea>
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 data-alchemy-button>Primary Submit</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 fa-fw fas fa-user"></i>
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 fa-fw fas fa-minus"></i>
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 fa-fw fas fa-edit"></i>
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 fa-fw fas fa-user"></i>
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 fa-fw fas fa-minus"></i>
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 fa-fw fas fa-edit"></i>
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 :tag %></td>
2
+ <td class="icon"><%= render_icon(:tag, size: "xl") %></td>
3
3
  <td class="name"><%= tag.name %></td>
4
- <td class="count">
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
- <%= delete_button admin_tag_path(tag), {
11
- message: Alchemy.t(:do_you_really_want_to_delete_this_tag?),
12
- icon: :minus,
13
- title: Alchemy.t(:delete_tag)
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
- <%= link_to_dialog render_icon(:edit),
18
- edit_admin_tag_path(tag),
19
- {
20
- title: Alchemy.t(:edit_tag),
21
- size: '360x410'
22
- },
23
- title: Alchemy.t(:edit_tag) %>
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
- <%= toolbar_button(
3
- icon: :plus,
4
- label: Alchemy.t('New Tag'),
5
- url: alchemy.new_admin_tag_path,
6
- title: Alchemy.t('New Tag'),
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
- size: '310x180'
11
- },
12
- if_permitted_to: [:create, Alchemy::Tag]
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 class="count"><%= Gutentag::Tag.human_attribute_name(:taggings_types) %></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,28 @@
1
+ <% asset_host = ActionController::Base.config.asset_host %>
2
+
3
+ <link rel="preload" href="<%= asset_host %><%= assets_prefix %>/tinymce/skins/ui/alchemy/skin.min.css" as="style" />
4
+ <% if Alchemy::Tinymce.init[:content_css] %>
5
+ <link rel="preload" href="<%= asset_host %><%= Alchemy::Tinymce.init[:content_css] %>" as="style" />
6
+ <% end %>
7
+ <% Alchemy::Tinymce.preloadable_plugins.each do |plugin| %>
8
+ <link rel="preload" href="<%= asset_host %><%= assets_prefix %>/tinymce/plugins/<%= plugin %>/plugin.min.js" as="script">
9
+ <% end %>
10
+
11
+ <script>
12
+ // Setting TinyMCE path.
13
+ var tinyMCEPreInit = {
14
+ <% if ActionController::Base.config.asset_host_set? %>
15
+ base: '<%= asset_url(assets_prefix + '/tinymce') %>',
16
+ <% else %>
17
+ base: '<%= asset_path(assets_prefix + '/tinymce') %>',
18
+ <% end %>
19
+ suffix: '.min'
20
+ };
21
+ // Holds the default Alchemy TinyMCE configuration
22
+ Alchemy.TinymceDefaults = {
23
+ plugins: '<%= Alchemy::Tinymce.plugins.join(',') %>',
24
+ <% Alchemy::Tinymce.init.each do |k, v| %>
25
+ <%= k %>: <%== v.to_json %>,
26
+ <% end %>
27
+ };
28
+ </script>
@@ -1,36 +1,30 @@
1
- <%= form_for [:admin, object], html: {multipart: true, class: 'upload-button'} do |f| %>
2
- <%= f.file_field file_attribute,
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
- <% file_types = local_assigns[:file_types].presence ||
18
- configuration(:uploader)['allowed_filetypes'][object.class.model_name.collection] || ['*'] %>
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
- $(function() {
22
- var options = {
23
- file_types: '<%= file_types.join("|") %>',
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
- $.get(url, null, null, 'script');
24
+ $.get(url, null, null, 'script');
29
25
  <% else %>
30
- Turbo.visit(url);
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
- file_upload_limit: <%= configuration(:uploader)['upload_limit'] || 50 -%>
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>
@@ -30,7 +30,7 @@
30
30
 
31
31
  <script>
32
32
  $(function(){
33
- $('.error_details--toggle').click(function(){
33
+ $('.error_details--toggle').on("click", function(){
34
34
  $('.error.message p').toggleClass('hidden');
35
35
  return false;
36
36
  });
@@ -1,2 +1 @@
1
1
  Alchemy.growl('<%= j @notice %>', 'error');
2
- Alchemy.Buttons.enable();
@@ -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 %>
@@ -12,6 +12,6 @@
12
12
  ) %>
13
13
  <% end %>
14
14
  <label for="<%= datetime_editor.form_field_id %>" class="ingredient-date--label">
15
- <i class="icon far fa-calendar-alt fa-fw fa-lg"></i>
15
+ <i class="icon ri-calendar-line ri-fw"></i>
16
16
  </label>
17
17
  <% end %>
@@ -1,4 +1,4 @@
1
- <% dialog_link = link_to_dialog render_icon(:file, style: "regular"),
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
- <% if file_editor.attachment %>
22
- <div class="file_icon">
21
+ <div class="file_icon">
22
+ <% if file_editor.attachment %>
23
23
  <%= render_icon(file_editor.attachment.icon_css_class) %>
24
- </div>
25
- <% end %>
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
- <%= f.text_field :node_id,
7
- value: node_editor.node&.id,
8
- id: node_editor.form_field_id(:node_id),
9
- class: 'alchemy_selectbox full_width' %>
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
- <%= f.text_field :page_id,
7
- value: page_editor.page&.id,
8
- id: page_editor.form_field_id(:page_id),
9
- class: 'alchemy_selectbox full_width' %>
10
- <% end %>
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(:times) %>
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, style: "regular") %>
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
- <div class="tinymce_container">
7
- <%= f.text_area :value,
8
- class: "has_tinymce",
9
- id: richtext_editor.element_id %>
10
- </div>
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 %>
@@ -23,7 +23,8 @@
23
23
  end %>
24
24
  <%= f.select :value, options_tags, {}, {
25
25
  id: select_editor.form_field_id,
26
- class: ["alchemy_selectbox", "ingredient-editor-select"]
26
+ class: ["ingredient-editor-select"],
27
+ is: "alchemy-select"
27
28
  } %>
28
29
  <% end %>
29
30
  <% 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? ? "solid" : "regular" }),
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
- <span class="ingredient_link_buttons">
2
- <%= link_to(
3
- render_icon(:link),
4
- '#',
5
- onclick: 'new Alchemy.LinkDialog(this).open(); return false;',
6
- class: "icon_button#{ingredient_editor.linked? ? ' linked' : ''} link-ingredient",
7
- "data-parent-selector": "[data-ingredient-id='#{ingredient_editor.id}']",
8
- title: Alchemy.t(:place_link),
9
- id: "edit_link_#{ingredient_editor.id}"
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 %>