diff --git a/.ruby-version b/.ruby-version index 50e47c8..94ff29c 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.1 \ No newline at end of file +3.1.1 diff --git a/Gemfile.lock b/Gemfile.lock index caad4f4..e7a065b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/decidim/decidim.git - revision: 9dea35e0b8f5ab9c52433d05f4a48b8ad299e664 + revision: dbd148e3733988d8d8bc1faef84846082e6ffdbd branch: release/0.28-stable specs: decidim (0.28.0) @@ -264,11 +264,11 @@ GEM parser (>= 2.4) smart_properties bindex (0.8.1) - bootsnap (1.17.0) + bootsnap (1.17.1) msgpack (~> 1.2) browser (2.7.1) builder (3.2.4) - bullet (7.1.5) + bullet (7.1.6) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) byebug (11.1.3) @@ -305,7 +305,7 @@ GEM json simplecov commonmarker (0.23.10) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) crack (0.4.5) rexml crass (1.0.6) @@ -359,7 +359,7 @@ GEM factory_bot_rails (6.4.3) factory_bot (~> 6.4) railties (>= 5.0.0) - faker (3.2.2) + faker (3.2.3) i18n (>= 1.8.11, < 2) faraday (2.9.0) faraday-net_http (>= 2.0, < 3.2) @@ -465,7 +465,7 @@ GEM mime-types-data (3.2023.1205) mini_magick (4.12.0) mini_mime (1.1.5) - minitest (5.20.0) + minitest (5.21.1) msgpack (1.7.2) multi_xml (0.6.0) mustache (1.1.1) @@ -527,7 +527,7 @@ GEM parallel (1.24.0) parallel_tests (4.4.0) parallel - parser (3.3.0.2) + parser (3.3.0.4) ast (~> 2.4.1) racc pg (1.4.6) diff --git a/app/cells/decidim/newsletter_templates/agenda_events_settings_form/scripts.erb b/app/cells/decidim/newsletter_templates/agenda_events_settings_form/scripts.erb new file mode 100644 index 0000000..20b4166 --- /dev/null +++ b/app/cells/decidim/newsletter_templates/agenda_events_settings_form/scripts.erb @@ -0,0 +1,16 @@ + diff --git a/app/cells/decidim/newsletter_templates/agenda_events_settings_form/show.erb b/app/cells/decidim/newsletter_templates/agenda_events_settings_form/show.erb index d26ad04..3e14976 100644 --- a/app/cells/decidim/newsletter_templates/agenda_events_settings_form/show.erb +++ b/app/cells/decidim/newsletter_templates/agenda_events_settings_form/show.erb @@ -1,3 +1,6 @@ + +<%= stylesheet_pack_tag "decidim_newsletter_agenda", media: :all %> + <% form.fields_for :settings, settings do |settings_fields| %> <%= settings_fields.text_field :link_color, label: t(".link_color"), type: "color" %> <%= settings_fields.text_field :background_color, label: t(".background_color"), type: "color" %> @@ -110,5 +113,4 @@ <%= t(".interpolations_hint") %> -<%= stylesheet_pack_tag "decidim_newsletter_agenda" %> -<%= append_javascript_pack_tag "decidim_newsletter_agenda" %> \ No newline at end of file +<%= render :scripts %> diff --git a/app/packs/entrypoints/decidim_newsletter_agenda.js b/app/packs/entrypoints/decidim_newsletter_agenda.js index 28cbd1d..2114c1b 100644 --- a/app/packs/entrypoints/decidim_newsletter_agenda.js +++ b/app/packs/entrypoints/decidim_newsletter_agenda.js @@ -3,23 +3,3 @@ import "./decidim_newsletter_agenda.scss"; // Images require.context("../images", true) require.context("../fonts", true) - - -document.addEventListener('DOMContentLoaded', function () { - - const accordionItems = document.querySelectorAll('.accordion-item'); - console.log("hola"); - accordionItems.forEach(function (item) { - - const title = item.querySelector('.accordion-title'); - let content = item.querySelector('.accordion-content'); - console.log(content.style.display); - content.style.display = 'none'; - - title.addEventListener('click', function () { - - content = item.querySelector('.accordion-content'); - content.style.display = content.style.display === 'none' ? 'block' : 'none'; - }); - }); -});