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
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ */
7
+ .tinymce-mobile-outer-container{all:initial;display:block}.tinymce-mobile-outer-container *{border:0;box-sizing:initial;cursor:inherit;float:none;line-height:1;margin:0;outline:0;padding:0;-webkit-tap-highlight-color:transparent;text-shadow:none;white-space:nowrap}.tinymce-mobile-icon-arrow-back::before{content:"\e5cd"}.tinymce-mobile-icon-image::before{content:"\e412"}.tinymce-mobile-icon-cancel-circle::before{content:"\e5c9"}.tinymce-mobile-icon-full-dot::before{content:"\e061"}.tinymce-mobile-icon-align-center::before{content:"\e234"}.tinymce-mobile-icon-align-left::before{content:"\e236"}.tinymce-mobile-icon-align-right::before{content:"\e237"}.tinymce-mobile-icon-bold::before{content:"\e238"}.tinymce-mobile-icon-italic::before{content:"\e23f"}.tinymce-mobile-icon-unordered-list::before{content:"\e241"}.tinymce-mobile-icon-ordered-list::before{content:"\e242"}.tinymce-mobile-icon-font-size::before{content:"\e245"}.tinymce-mobile-icon-underline::before{content:"\e249"}.tinymce-mobile-icon-link::before{content:"\e157"}.tinymce-mobile-icon-unlink::before{content:"\eca2"}.tinymce-mobile-icon-color::before{content:"\e891"}.tinymce-mobile-icon-previous::before{content:"\e314"}.tinymce-mobile-icon-next::before{content:"\e315"}.tinymce-mobile-icon-large-font::before,.tinymce-mobile-icon-style-formats::before{content:"\e264"}.tinymce-mobile-icon-undo::before{content:"\e166"}.tinymce-mobile-icon-redo::before{content:"\e15a"}.tinymce-mobile-icon-removeformat::before{content:"\e239"}.tinymce-mobile-icon-small-font::before{content:"\e906"}.tinymce-mobile-format-matches::after,.tinymce-mobile-icon-readonly-back::before{content:"\e5ca"}.tinymce-mobile-icon-small-heading::before{content:"small"}.tinymce-mobile-icon-large-heading::before{content:"large"}.tinymce-mobile-icon-large-heading::before,.tinymce-mobile-icon-small-heading::before{font-family:sans-serif;font-size:80%}.tinymce-mobile-mask-edit-icon::before{content:"\e254"}.tinymce-mobile-icon-back::before{content:"\e5c4"}.tinymce-mobile-icon-heading::before{content:"Headings";font-family:sans-serif;font-size:80%;font-weight:700}.tinymce-mobile-icon-h1::before{content:"H1";font-weight:700}.tinymce-mobile-icon-h2::before{content:"H2";font-weight:700}.tinymce-mobile-icon-h3::before{content:"H3";font-weight:700}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask{align-items:center;display:flex;justify-content:center;background:rgba(51,51,51,.5);height:100%;position:absolute;top:0;width:100%}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container{align-items:center;border-radius:50%;display:flex;flex-direction:column;font-family:sans-serif;font-size:1em;justify-content:space-between}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .mixin-menu-item{align-items:center;display:flex;justify-content:center;border-radius:50%;height:2.1em;width:2.1em}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{align-items:center;display:flex;justify-content:center;flex-direction:column;font-size:1em}@media only screen and (min-device-width:700px){.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{font-size:1.2em}}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon{align-items:center;display:flex;justify-content:center;border-radius:50%;height:2.1em;width:2.1em;background-color:#fff;color:#207ab7}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon::before{content:"\e900";font-family:tinymce-mobile,sans-serif}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section:not(.tinymce-mobile-mask-tap-icon-selected) .tinymce-mobile-mask-tap-icon{z-index:2}.tinymce-mobile-android-container.tinymce-mobile-android-maximized{background:#fff;border:none;bottom:0;display:flex;flex-direction:column;left:0;position:fixed;right:0;top:0}.tinymce-mobile-android-container:not(.tinymce-mobile-android-maximized){position:relative}.tinymce-mobile-android-container .tinymce-mobile-editor-socket{display:flex;flex-grow:1}.tinymce-mobile-android-container .tinymce-mobile-editor-socket iframe{display:flex!important;flex-grow:1;height:auto!important}.tinymce-mobile-android-scroll-reload{overflow:hidden}:not(.tinymce-mobile-readonly-mode)>.tinymce-mobile-android-selection-context-toolbar{margin-top:23px}.tinymce-mobile-toolstrip{background:#fff;display:flex;flex:0 0 auto;z-index:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar{align-items:center;background-color:#fff;border-bottom:1px solid #ccc;display:flex;flex:1;height:2.5em;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group{align-items:center;display:flex;height:100%;flex-shrink:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group>div{align-items:center;display:flex;height:100%;flex:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-exit-container{background:#f44336}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-toolbar-scrollable-group{flex-grow:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{padding-left:.5em;padding-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button{align-items:center;display:flex;height:80%;margin-left:2px;margin-right:2px}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button.tinymce-mobile-toolbar-button-selected{background:#bfbfbf;color:#ccc}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:first-of-type,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:last-of-type{background:#207ab7;color:#eceff1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group{align-items:center;display:flex;height:100%;flex:1;padding-bottom:.4em;padding-top:.4em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog{display:flex;min-height:1.5em;overflow:hidden;padding-left:0;padding-right:0;position:relative;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain{display:flex;height:100%;transition:left cubic-bezier(.4,0,1,1) .15s;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen{display:flex;flex:0 0 auto;justify-content:space-between;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen input{font-family:Sans-serif}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container{display:flex;flex-grow:1;position:relative}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container .tinymce-mobile-input-container-x{-ms-grid-row-align:center;align-self:center;background:inherit;border:none;border-radius:50%;color:#888;font-size:.6em;font-weight:700;height:100%;padding-right:2px;position:absolute;right:0}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container.tinymce-mobile-input-container-empty .tinymce-mobile-input-container-x{display:none}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous{align-items:center;display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous::before{align-items:center;display:flex;font-weight:700;height:100%;padding-left:.5em;padding-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next.tinymce-mobile-toolbar-navigation-disabled::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous.tinymce-mobile-toolbar-navigation-disabled::before{visibility:hidden}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item{color:#ccc;font-size:10px;line-height:10px;margin:0 2px;padding-top:3px}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item.tinymce-mobile-dot-active{color:#bfbfbf}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-heading::before{margin-left:.5em;margin-right:.9em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-heading::before{margin-left:.9em;margin-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider{display:flex;flex:1;margin-left:0;margin-right:0;padding:.28em 0;position:relative}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container{align-items:center;display:flex;flex-grow:1;height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container .tinymce-mobile-slider-size-line{background:#ccc;display:flex;flex:1;height:.2em;margin-bottom:.3em;margin-top:.3em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container{padding-left:2em;padding-right:2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container{align-items:center;display:flex;flex-grow:1;height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container .tinymce-mobile-slider-gradient{background:linear-gradient(to right,red 0,#feff00 17%,#0f0 33%,#00feff 50%,#00f 67%,#ff00fe 83%,red 100%);display:flex;flex:1;height:.2em;margin-bottom:.3em;margin-top:.3em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-black{background:#000;height:.2em;margin-bottom:.3em;margin-top:.3em;width:1.2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-white{background:#fff;height:.2em;margin-bottom:.3em;margin-top:.3em;width:1.2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb{align-items:center;background-clip:padding-box;background-color:#455a64;border:.5em solid rgba(136,136,136,0);border-radius:3em;bottom:0;color:#fff;display:flex;height:.5em;justify-content:center;left:-10px;margin:auto;position:absolute;top:0;transition:border 120ms cubic-bezier(.39,.58,.57,1);width:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb.tinymce-mobile-thumb-active{border:.5em solid rgba(136,136,136,.39)}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group>div{align-items:center;display:flex;height:100%;flex:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper{flex-direction:column;justify-content:center}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{align-items:center;display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item:not(.tinymce-mobile-serialised-dialog){height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-container{display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input{background:#fff;border:none;border-radius:0;color:#455a64;flex-grow:1;font-size:.85em;padding-bottom:.1em;padding-left:5px;padding-top:.1em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::-webkit-input-placeholder{color:#888}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input:-ms-input-placeholder{color:#888}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::placeholder{color:#888}.tinymce-mobile-dropup{background:#fff;display:flex;overflow:hidden;width:100%}.tinymce-mobile-dropup.tinymce-mobile-dropup-shrinking{transition:height .3s ease-out}.tinymce-mobile-dropup.tinymce-mobile-dropup-growing{transition:height .3s ease-in}.tinymce-mobile-dropup.tinymce-mobile-dropup-closed{flex-grow:0}.tinymce-mobile-dropup.tinymce-mobile-dropup-open:not(.tinymce-mobile-dropup-growing){flex-grow:1}.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:200px}@media only screen and (orientation:landscape){.tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:200px}}@media only screen and (min-device-width :320px) and (max-device-width :568px) and (orientation :landscape){.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:150px}}.tinymce-mobile-styles-menu{font-family:sans-serif;outline:4px solid #000;overflow:hidden;position:relative;width:100%}.tinymce-mobile-styles-menu [role=menu]{display:flex;flex-direction:column;height:100%;position:absolute;width:100%}.tinymce-mobile-styles-menu [role=menu].transitioning{transition:transform .5s ease-in-out}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item{border-bottom:1px solid #ddd;color:#455a64;cursor:pointer;display:flex;padding:1em 1em;position:relative}.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser .tinymce-mobile-styles-collapse-icon::before{color:#455a64;content:"\e314";font-family:tinymce-mobile,sans-serif}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-styles-item-is-menu::after{color:#455a64;content:"\e315";font-family:tinymce-mobile,sans-serif;padding-left:1em;padding-right:1em;position:absolute;right:0}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-format-matches::after{font-family:tinymce-mobile,sans-serif;padding-left:1em;padding-right:1em;position:absolute;right:0}.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser,.tinymce-mobile-styles-menu .tinymce-mobile-styles-separator{align-items:center;background:#fff;border-top:#455a64;color:#455a64;display:flex;min-height:2.5em;padding-left:1em;padding-right:1em}.tinymce-mobile-styles-menu [data-transitioning-destination=before][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=before]{transform:translate(-100%)}.tinymce-mobile-styles-menu [data-transitioning-destination=current][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=current]{transform:translate(0)}.tinymce-mobile-styles-menu [data-transitioning-destination=after][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=after]{transform:translate(100%)}@font-face{font-family:tinymce-mobile;font-style:normal;font-weight:400;src:url(fonts/tinymce-mobile.woff?8x92w3) format('woff')}@media (min-device-width:700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size:25px}}@media (max-device-width:700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size:18px}}.tinymce-mobile-icon{font-family:tinymce-mobile,sans-serif}.mixin-flex-and-centre{align-items:center;display:flex;justify-content:center}.mixin-flex-bar{align-items:center;display:flex;height:100%}.tinymce-mobile-outer-container .tinymce-mobile-editor-socket iframe{background-color:#fff;width:100%}.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{background-color:#207ab7;border-radius:50%;bottom:1em;color:#fff;font-size:1em;height:2.1em;position:fixed;right:2em;width:2.1em;align-items:center;display:flex;justify-content:center}@media only screen and (min-device-width:700px){.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{font-size:1.2em}}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket{height:300px;overflow:hidden}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket iframe{height:100%}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-toolstrip{display:none}input[type=file]::-webkit-file-upload-button{display:none}@media only screen and (min-device-width :320px) and (max-device-width :568px) and (orientation :landscape){.tinymce-mobile-ios-container .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{bottom:50%}}
@@ -0,0 +1,39 @@
1
+ module Alchemy
2
+ module Admin
3
+ class NodeSelect < ViewComponent::Base
4
+ delegate :alchemy, to: :helpers
5
+
6
+ def initialize(node = nil, url: nil, placeholder: Alchemy.t(:search_node), query_params: nil)
7
+ @node = node
8
+ @url = url
9
+ @placeholder = placeholder
10
+ @query_params = query_params
11
+ end
12
+
13
+ def call
14
+ content_tag("alchemy-node-select", content, attributes)
15
+ end
16
+
17
+ private
18
+
19
+ def attributes
20
+ options = {
21
+ "allow-clear": true,
22
+ placeholder: @placeholder,
23
+ url: @url || alchemy.api_nodes_path
24
+ }
25
+
26
+ if @query_params
27
+ options[:"query-params"] = @query_params.to_json
28
+ end
29
+
30
+ if @node
31
+ selection = ActiveModelSerializers::SerializableResource.new(@node, include: :ancestors)
32
+ options[:selection] = selection.to_json
33
+ end
34
+
35
+ options
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,42 @@
1
+ module Alchemy
2
+ module Admin
3
+ class PageSelect < ViewComponent::Base
4
+ delegate :alchemy, to: :helpers
5
+
6
+ def initialize(page = nil, url: nil, allow_clear: false, placeholder: Alchemy.t(:search_page), query_params: nil)
7
+ @page = page
8
+ @url = url
9
+ @allow_clear = allow_clear
10
+ @placeholder = placeholder
11
+ @query_params = query_params
12
+ end
13
+
14
+ def call
15
+ content_tag("alchemy-page-select", content, attributes)
16
+ end
17
+
18
+ private
19
+
20
+ def attributes
21
+ options = {
22
+ placeholder: @placeholder,
23
+ url: @url || alchemy.api_pages_path
24
+ }
25
+
26
+ options = options.merge({"allow-clear": @allow_clear}) if @allow_clear
27
+ options = options.merge({"query-params": @query_params.to_json}) if @query_params
28
+
29
+ if @page
30
+ selection = {
31
+ id: @page.id,
32
+ name: @page.name,
33
+ url_path: @page.url_path
34
+ }
35
+ options = options.merge({selection: selection.to_json})
36
+ end
37
+
38
+ options
39
+ end
40
+ end
41
+ end
42
+ end
@@ -48,14 +48,13 @@ module Alchemy
48
48
  @error = error
49
49
  # truncate the message, because very long error messages (i.e from mysql2) causes cookie overflow errors
50
50
  @notice = error.message[0..255]
51
- @trace = error.backtrace[0..50]
52
- if request.xhr?
51
+ if request.format.json?
52
+ render json: {message: @notice}, status: 500
53
+ elsif request.xhr?
53
54
  render action: "error_notice"
54
55
  else
55
- respond_to do |format|
56
- format.html { render "500", status: 500 }
57
- format.json { render json: {message: @notice}, status: 500 }
58
- end
56
+ @trace = error.backtrace[0..50]
57
+ render "500", status: 500
59
58
  end
60
59
  end
61
60
 
@@ -3,7 +3,7 @@
3
3
  module Alchemy
4
4
  module Admin
5
5
  class ElementsController < Alchemy::Admin::BaseController
6
- before_action :load_element, only: [:update, :destroy, :fold, :publish]
6
+ before_action :load_element, only: [:update, :destroy, :collapse, :expand, :publish]
7
7
  authorize_resource class: Alchemy::Element
8
8
 
9
9
  def index
@@ -53,13 +53,25 @@ module Alchemy
53
53
  # Updates the element and all ingredients in the element.
54
54
  #
55
55
  def update
56
- @page = @element.page
57
-
58
56
  if @element.update(element_params)
59
- @element_validated = true
57
+ render json: {
58
+ notice: Alchemy.t(:element_saved),
59
+ previewText: Rails::Html::SafeListSanitizer.new.sanitize(@element.preview_text),
60
+ ingredientAnchors: @element.ingredients.select { |i| i.settings[:anchor] }.map do |ingredient|
61
+ {
62
+ ingredientId: ingredient.id,
63
+ active: ingredient.dom_id.present?
64
+ }
65
+ end
66
+ }
60
67
  else
61
- element_update_error
62
- @error_messages = @element.ingredient_error_messages
68
+ @warning = Alchemy.t("Validation failed")
69
+ render json: {
70
+ warning: @warning,
71
+ errorMessage: Alchemy.t(:ingredient_validations_headline),
72
+ ingredientsWithErrors: @element.ingredients_with_errors.map(&:id),
73
+ errors: @element.ingredient_error_messages
74
+ }
63
75
  end
64
76
  end
65
77
 
@@ -70,37 +82,59 @@ module Alchemy
70
82
  end
71
83
 
72
84
  def publish
73
- @element.update(public: !@element.public?)
85
+ @element.public = !@element.public?
86
+ @element.save(validate: false)
87
+ render json: {
88
+ public: @element.public?,
89
+ label: @element.public? ? Alchemy.t(:hide_element) : Alchemy.t(:show_element)
90
+ }
74
91
  end
75
92
 
76
93
  def order
77
- @parent_element = Element.find_by(id: params[:parent_element_id])
78
- Element.transaction do
79
- params.fetch(:element_ids, []).each.with_index(1) do |element_id, position|
80
- # We need to set the parent_element_id, because we might have dragged the
81
- # element over from another nestable element
82
- Element.find_by(id: element_id).update_columns(
83
- parent_element_id: params[:parent_element_id],
84
- position: position
85
- )
86
- end
87
- # Need to manually touch the parent because Rails does not do it
88
- # with the update_columns above
89
- @parent_element&.touch
94
+ @element = Element.find(params[:element_id])
95
+ @element.update(
96
+ parent_element_id: params[:parent_element_id],
97
+ position: params[:position]
98
+ )
99
+ if params[:parent_element_id].present?
100
+ @parent_element = Element.find_by(id: params[:parent_element_id])
90
101
  end
102
+
103
+ render json: {
104
+ message: Alchemy.t(:successfully_saved_element_position),
105
+ preview_text: @element.preview_text
106
+ }
91
107
  end
92
108
 
93
- # Toggle folds the element and persists the state in the db
109
+ # Collapses the element, all nested elements and persists the state in the db
94
110
  #
95
- def fold
96
- @page = @element.page
111
+ def collapse
97
112
  # We do not want to trigger the touch callback or any validations
98
- @element.update_columns(folded: !@element.folded)
99
- # Fold all nested elements if folded
100
- if @element.folded?
101
- ids = collapse_nested_elements_ids(@element)
102
- Alchemy::Element.where(id: ids).update_all(folded: true)
103
- end
113
+ @element.update_columns(folded: true)
114
+ # Collapse all nested elements
115
+ nested_elements_ids = collapse_nested_elements_ids(@element)
116
+ Alchemy::Element.where(id: nested_elements_ids).update_all(folded: true)
117
+
118
+ render json: {
119
+ nestedElementIds: nested_elements_ids,
120
+ title: Alchemy.t(@element.folded? ? :show_element_content : :hide_element_content)
121
+ }
122
+ end
123
+
124
+ # Expands the element, all parents and persists the state in the db
125
+ #
126
+ def expand
127
+ # We do not want to trigger the touch callback or any validations
128
+ @element.update_columns(folded: false)
129
+ # We want to expand the upper most parent first in order to prevent
130
+ # re-painting issues in the browser
131
+ parent_element_ids = @element.parent_element_ids.reverse
132
+ Alchemy::Element.where(id: parent_element_ids).update_all(folded: false)
133
+
134
+ render json: {
135
+ parentElementIds: parent_element_ids,
136
+ title: Alchemy.t(@element.folded? ? :show_element_content : :hide_element_content)
137
+ }
104
138
  end
105
139
 
106
140
  private
@@ -171,12 +205,6 @@ module Alchemy
171
205
  def create_element_params
172
206
  params.require(:element).permit(:name, :page_version_id, :parent_element_id)
173
207
  end
174
-
175
- def element_update_error
176
- @element_validated = false
177
- @notice = Alchemy.t("Validation failed")
178
- @error_message = "<h2>#{@notice}</h2><p>#{Alchemy.t(:ingredient_validations_headline)}</p>".html_safe
179
- end
180
208
  end
181
209
  end
182
210
  end
@@ -183,14 +183,19 @@ module Alchemy
183
183
  respond_to do |format|
184
184
  format.js
185
185
  format.html do
186
- redirect_to(
187
- params[:redirect_to].presence || admin_pages_path,
188
- allow_other_host: true
189
- )
186
+ redirect_to(unlock_redirect_path, allow_other_host: true)
190
187
  end
191
188
  end
192
189
  end
193
190
 
191
+ def unlock_redirect_path
192
+ if params[:redirect_to].to_s.match?(/\A\/admin\/(layout_)?pages/)
193
+ params[:redirect_to]
194
+ else
195
+ admin_pages_path
196
+ end
197
+ end
198
+
194
199
  # Sets the page public and updates the published_at attribute that is used as cache_key
195
200
  #
196
201
  def publish
@@ -53,7 +53,9 @@ module Alchemy
53
53
  #{current_alchemy_user.inspect}
54
54
  WARN
55
55
  end
56
- if current_alchemy_user
56
+ if request.format.json?
57
+ render json: {message: Alchemy.t("You are not authorized")}, status: :unauthorized
58
+ elsif current_alchemy_user
57
59
  handle_redirect_for_user
58
60
  else
59
61
  handle_redirect_for_guest
@@ -65,7 +67,7 @@ module Alchemy
65
67
  if can?(:index, :alchemy_admin_dashboard)
66
68
  redirect_or_render_notice
67
69
  else
68
- redirect_to("/")
70
+ redirect_to Alchemy.unauthorized_path
69
71
  end
70
72
  end
71
73
 
@@ -33,7 +33,7 @@ module Alchemy
33
33
  def uploader_response(file:, message:)
34
34
  {
35
35
  files: [file.to_jq_upload],
36
- growl_message: message
36
+ message: message
37
37
  }
38
38
  end
39
39
  end
@@ -12,7 +12,7 @@ module Alchemy
12
12
  private
13
13
 
14
14
  def enforce_primary_host_for_site
15
- redirect_to url_for(host: current_alchemy_site.host), status: :moved_permanently
15
+ redirect_to url_for(host: current_alchemy_site.host), status: :moved_permanently, allow_other_host: true
16
16
  end
17
17
 
18
18
  def needs_redirect_to_primary_host?
@@ -65,8 +65,6 @@ module Alchemy
65
65
 
66
66
  # Tells us, if we should show the element footer and form inputs.
67
67
  def editable?
68
- return false if folded?
69
-
70
68
  ingredient_definitions.any? || taggable?
71
69
  end
72
70
 
@@ -4,17 +4,18 @@ module Alchemy
4
4
  module Admin
5
5
  module AttachmentsHelper
6
6
  include Alchemy::Admin::BaseHelper
7
+ include Alchemy::Filetypes
7
8
 
8
9
  def mime_to_human(mime)
9
10
  Alchemy.t(mime, scope: "mime_types", default: Alchemy.t(:document))
10
11
  end
11
12
 
12
13
  def attachment_preview_size(attachment)
13
- case attachment.icon_css_class
14
- when "image" then "600x475"
15
- when "audio" then "600x190"
16
- when "video" then "600x485"
17
- when "pdf" then "600x500"
14
+ case attachment.file_mime_type
15
+ when *IMAGE_FILE_TYPES then "600x475"
16
+ when *AUDIO_FILE_TYPES then "600x190"
17
+ when *VIDEO_FILE_TYPES then "600x485"
18
+ when "application/pdf" then "600x600"
18
19
  else
19
20
  "600x145"
20
21
  end
@@ -55,7 +55,10 @@ module Alchemy
55
55
  default_options = {modal: true}
56
56
  options = default_options.merge(options)
57
57
  link_to content, url,
58
- html_options.merge("data-alchemy-dialog" => options.to_json)
58
+ html_options.merge(
59
+ "data-dialog-options" => options.to_json,
60
+ :is => "alchemy-dialog-link"
61
+ )
59
62
  end
60
63
 
61
64
  # Used for translations selector in Alchemy cockpit user settings.
@@ -189,7 +192,7 @@ module Alchemy
189
192
  options = {
190
193
  title: Alchemy.t("Delete"),
191
194
  message: Alchemy.t("Are you sure?"),
192
- icon: :minus
195
+ icon: "delete-bin-2"
193
196
  }.merge(options)
194
197
  button_with_confirm(
195
198
  render_icon(options[:icon]),
@@ -322,18 +325,20 @@ module Alchemy
322
325
  date = Time.zone.parse(date) if date.is_a?(String)
323
326
  value = date&.iso8601
324
327
 
325
- text_field object.class.name.demodulize.underscore.to_sym,
326
- method.to_sym, {:type => "text", :class => type, "data-datepicker-type" => type, :value => value}.merge(html_options)
328
+ input_field = text_field object.class.name.demodulize.underscore.to_sym,
329
+ method.to_sym, {type: "text", class: type, value: value}.merge(html_options)
330
+
331
+ content_tag("alchemy-datepicker", input_field, "input-type" => type)
327
332
  end
328
333
 
329
334
  # Render a hint icon with tooltip for given object.
330
335
  # The model class needs to include the hints module
331
- def render_hint_for(element)
336
+ def render_hint_for(element, icon_options = {})
332
337
  return unless element.has_hint?
333
338
 
334
- content_tag :span, class: "hint-with-icon" do
335
- render_icon("question-circle") +
336
- content_tag(:span, element.hint.html_safe, class: "hint-bubble")
339
+ content_tag "sl-tooltip", class: "like-hint-tooltip", placement: "bottom-start" do
340
+ render_icon("question", icon_options) +
341
+ content_tag(:span, element.hint.html_safe, slot: "content")
337
342
  end
338
343
  end
339
344
 
@@ -372,12 +377,12 @@ module Alchemy
372
377
  # <%= hint_with_tooltip('Page layout is missing', icon: 'info') %>
373
378
  #
374
379
  # @param text [String] - The text displayed in the tooltip
375
- # @param icon: 'exclamation-triangle' [String] - Icon name
380
+ # @param icon: 'alert' [String] - Icon name
376
381
  #
377
382
  # @return [String]
378
- def hint_with_tooltip(text, icon: "exclamation-triangle")
379
- content_tag :span, class: "hint-with-icon" do
380
- render_icon(icon) + content_tag(:span, text, class: "hint-bubble")
383
+ def hint_with_tooltip(text, icon: "alert")
384
+ content_tag :"sl-tooltip", class: "like-hint-tooltip", content: text, placement: "bottom" do
385
+ render_icon(icon)
381
386
  end
382
387
  end
383
388
 
@@ -34,7 +34,10 @@ module Alchemy
34
34
  # Renders the label and hint for a ingredient.
35
35
  def ingredient_label(ingredient, column = :value, html_options = {})
36
36
  label_tag ingredient.form_field_id(column), html_options do
37
- [render_ingredient_role(ingredient), render_hint_for(ingredient)].compact.join("&nbsp;").html_safe
37
+ [
38
+ render_ingredient_role(ingredient),
39
+ render_hint_for(ingredient, size: "lg", fixed_width: false)
40
+ ].compact.join("&nbsp;").html_safe
38
41
  end
39
42
  end
40
43
  end
@@ -36,21 +36,15 @@ module Alchemy
36
36
 
37
37
  def page_status_checkbox(page, attribute)
38
38
  label = page.class.human_attribute_name(attribute)
39
-
40
- if page.attribute_fixed?(attribute)
41
- checkbox = check_box(:page, attribute, disabled: true)
42
- hint = content_tag(:span, class: "hint-bubble") do
43
- Alchemy.t(:attribute_fixed, attribute: attribute)
44
- end
45
- content = content_tag(:span, class: "with-hint") do
46
- "#{checkbox}\n#{label}\n#{hint}".html_safe
39
+ checkbox = if page.attribute_fixed?(attribute)
40
+ content_tag("sl-tooltip", class: "like-hint-tooltip", content: Alchemy.t(:attribute_fixed, attribute: attribute), placement: "bottom-start") do
41
+ check_box_tag("page[#{attribute}]", "1", page.send(attribute), disabled: true)
47
42
  end
48
43
  else
49
- checkbox = check_box(:page, attribute)
50
- content = "#{checkbox}\n#{label}".html_safe
44
+ check_box(:page, attribute)
51
45
  end
52
46
 
53
- content_tag(:label, class: "checkbox") { content }
47
+ content_tag(:label, class: "checkbox") { "#{checkbox}\n#{label}".html_safe }
54
48
  end
55
49
  end
56
50
  end
@@ -19,21 +19,21 @@ module Alchemy
19
19
  end
20
20
  end
21
21
 
22
- # Render a Fontawesome icon
22
+ # Render a Remix icon
23
23
  #
24
- # @param icon_class [String] Fontawesome icon name
25
- # @param size: nil [String] Fontawesome icon size
26
- # @param transform: nil [String] Fontawesome transform style
24
+ # @param icon_name [String] icon name
25
+ # @option options - style: nil [String] icon style. line or fill
26
+ # @option options - size: nil [String] icon size
27
27
  #
28
28
  # @return [String]
29
- def render_icon(icon_class, options = {})
30
- options = {style: "solid"}.merge(options)
29
+ def render_icon(icon_name, options = {})
30
+ options = {style: "line", fixed_width: true}.merge(options)
31
+ style = options[:style] && "-#{options[:style]}"
31
32
  classes = [
32
- "icon fa-fw",
33
- "fa-#{icon_class}",
34
- "fa#{options[:style].first}",
35
- options[:size] ? "fa-#{options[:size]}" : nil,
36
- options[:transform] ? "fa-#{options[:transform]}" : nil,
33
+ "icon",
34
+ "ri-#{ri_icon(icon_name)}#{style}",
35
+ options[:size] ? "ri-#{options[:size]}" : nil,
36
+ options[:fixed_width] ? "ri-fw" : nil,
37
37
  options[:class]
38
38
  ].compact
39
39
  content_tag("i", nil, class: classes)
@@ -87,18 +87,52 @@ module Alchemy
87
87
  end
88
88
  end
89
89
 
90
- # Returns the FontAwesome icon name for given message type
90
+ # Returns the icon name for given message type
91
91
  #
92
92
  # @param message_type [String] The message type. One of +warning+, +info+, +notice+, +error+
93
- # @return [String] The FontAwesome icon name
93
+ # @return [String] The icon name
94
94
  def message_icon_class(message_type)
95
95
  case message_type.to_s
96
96
  when "warning", "warn", "alert" then "exclamation"
97
97
  when "notice" then "check"
98
98
  when "error" then "bug"
99
+ when "hint" then "info"
99
100
  else
100
101
  message_type
101
102
  end
102
103
  end
104
+
105
+ private
106
+
107
+ # Returns the Remix icon name for given icon name
108
+ #
109
+ # @param icon_name [String] The icon name.
110
+ # @return [String] The Remix icon class
111
+ def ri_icon(icon_name)
112
+ case icon_name.to_s
113
+ when "minus", "remove", "delete"
114
+ "delete-bin-2"
115
+ when "plus"
116
+ "add"
117
+ when "copy"
118
+ "file-copy"
119
+ when "download"
120
+ "download-2"
121
+ when "upload"
122
+ "upload-2"
123
+ when "exclamation"
124
+ "alert"
125
+ when "info-circle", "info"
126
+ "information"
127
+ when "times"
128
+ "close"
129
+ when "tag"
130
+ "price-tag-3"
131
+ when "cog"
132
+ "settings-3"
133
+ else
134
+ icon_name
135
+ end
136
+ end
103
137
  end
104
138
  end
@@ -0,0 +1,16 @@
1
+ import "clipboard"
2
+
3
+ const clipboard = new ClipboardJS("[data-clipboard-text]")
4
+
5
+ clipboard.on("success", (e) => {
6
+ Alchemy.growl(e.trigger.dataset.clipboardSuccessText)
7
+ e.clearSelection()
8
+ })
9
+
10
+ const currentDialog = Alchemy.currentDialog()
11
+
12
+ if (currentDialog) {
13
+ currentDialog.dialog.on("DialogClose.Alchemy", () => {
14
+ clipboard.destroy()
15
+ })
16
+ }