Feature: set parameters for add_address as global

The parameter `window.addaddress` is now global and can be reached to all page. This ensure backward compatibility.
This commit is contained in:
2022-12-22 11:22:24 +01:00
parent 1bc7221315
commit 3ca2811494
10 changed files with 5 additions and 16 deletions

View File

@@ -9,6 +9,11 @@
{% block head_custom %}{% endblock %}
<link rel="shortcut icon" href="{{ asset('build/images/favicon.ico') }}" type="image/x-icon">
<script type="application/javascript">
{# this is global data, in use for all js app #}
window.addaddress = {{ add_address|json_encode|raw }};
</script>
{{ encore_entry_link_tags('mod_bootstrap') }}
{{ encore_entry_link_tags('mod_forkawesome') }}
{{ encore_entry_link_tags('mod_ckeditor5') }}
@@ -109,7 +114,6 @@
});
chill.categoryLinkParentChildSelect();
});
window.addaddress = {{ add_address|json_encode|raw }};
</script>
{% block js %}<!-- nothing added to js -->{% endblock %}