alchemy_cms 7.4.1 → 7.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,3 +24,19 @@ import "alchemy_admin/components/select"
24
24
  import "alchemy_admin/components/spinner"
25
25
  import "alchemy_admin/components/tags_autocomplete"
26
26
  import "alchemy_admin/components/tinymce"
27
+
28
+ await Promise.race([
29
+ // Load all global custom elements
30
+ Promise.allSettled([
31
+ customElements.whenDefined("alchemy-button"),
32
+ customElements.whenDefined("alchemy-icon"),
33
+ customElements.whenDefined("alchemy-growl"),
34
+ customElements.whenDefined("alchemy-message"),
35
+ customElements.whenDefined("alchemy-spinner")
36
+ ]),
37
+ // Resolve after two seconds
38
+ new Promise((resolve) => setTimeout(resolve, 1250))
39
+ ])
40
+
41
+ // Remove the class, showing the page content
42
+ document.documentElement.classList.remove("loading-custom-elements")
@@ -6,6 +6,9 @@
6
6
  $form_field.parent().find("> .file_icon").html("<%= j render_icon(@attachment.icon_css_class) %>")
7
7
  $form_field.parent().find("> .remove_file_link").removeClass("hidden")
8
8
  Alchemy.closeCurrentDialog(function() {
9
- $form_field[0].closest("alchemy-element-editor").setDirty()
9
+ var elementEditor = $form_field[0].closest("alchemy-element-editor")
10
+ if (elementEditor) {
11
+ elementEditor.setDirty()
12
+ }
10
13
  })
11
14
  })()
@@ -5,6 +5,9 @@
5
5
  $form_field.attr("data-image-file-width", <%= @picture.image_file_width %>)
6
6
  $form_field.attr("data-image-file-height", <%= @picture.image_file_height %>)
7
7
  Alchemy.closeCurrentDialog(function() {
8
- $form_field[0].closest("alchemy-element-editor").setDirty()
8
+ var elementEditor = $form_field[0].closest("alchemy-element-editor")
9
+ if (elementEditor) {
10
+ elementEditor.setDirty()
11
+ }
9
12
  })
10
13
  })()
@@ -17,7 +17,7 @@
17
17
  ) %>
18
18
  <%= render Alchemy::Admin::ToolbarButton.new(
19
19
  icon: :download,
20
- url: resource_url_proxy.url_for(action: 'index', format: 'csv', q: search_filter_params[:q], sort: params[:sort]),
20
+ url: resource_url_proxy.url_for(action: 'index', format: 'csv', **search_filter_params),
21
21
  label: Alchemy.t(:download_csv),
22
22
  title: Alchemy.t(:download_csv),
23
23
  dialog: false,
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="<%= ::I18n.locale %>" class="no-js">
2
+ <html lang="<%= ::I18n.locale %>" class="no-js loading-custom-elements">
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "7.4.1"
4
+ VERSION = "7.4.3"
5
5
 
6
6
  def self.version
7
7
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.4.1
4
+ version: 7.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -12,7 +12,7 @@ authors:
12
12
  - Martin Meyerhoff
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2025-03-05 00:00:00.000000000 Z
15
+ date: 2025-04-23 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: actionmailer