From 69518f2bae44fb8fc6d79e43c2734bba732b4323 Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Fri, 27 Jan 2023 12:27:42 +0100 Subject: [PATCH] comment out yield javascript for debugging should be readded later again and might require this fix to load inline javascript only after the modules are already loaded: https://stackoverflow.com/questions/71876873/rails-7-7-0-2-3-importmap-jquery-is-not-defined-in-view --- app/views/layouts/_header.html.haml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 207850d0..a842d713 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -8,10 +8,10 @@ = csrf_meta_tags = stylesheet_link_tag "application", :media => "all" //%link(href="images/favicon.ico" rel="shortcut icon") - = javascript_importmap_tags = yield(:head) = foodcoop_css_tag + %body = yield @@ -19,10 +19,13 @@ Javascripts \================================================== / Placed at the end of the document so the pages load faster - = javascript_include_tag "application" - :javascript - I18n.defaultLocale = "#{I18n.default_locale}"; - I18n.locale = "#{I18n.locale}"; - I18n.fallbacks = true; - = yield(:javascript) + = javascript_importmap_tags + + -# = javascript_include_tag "application" + + -# :javascript + -# I18n.defaultLocale = "#{I18n.default_locale}"; + -# I18n.locale = "#{I18n.locale}"; + -# I18n.fallbacks = true; + -# = yield(:javascript) = raw FoodsoftConfig[:webstats_tracking_code]