mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
Proposition that allows to include modules from ar array. Works both on usual page + ajax page
This commit is contained in:
@@ -185,6 +185,20 @@
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% block iboPageJsModuleScripts %}
|
||||
{% if aPage.aJsFilesModules is not empty %}
|
||||
<script>
|
||||
console.log("aPage:", {{ aPage|raw }});
|
||||
</script>
|
||||
{% for aJsModule in aPage.aJsFilesModules %}
|
||||
<script type="module">
|
||||
import { {{ aJsModule.sModuleName }} } from "{{ aJsModule.sJsModuleSrc }}";
|
||||
{{ aJsModule.sModuleConfigJs|raw }}
|
||||
</script>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block iboPageCssFiles %}
|
||||
{% if aPage.aCssFiles is not empty %}
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -144,6 +144,21 @@ const aLoadedJsFilesResolveCallbacks = new Map();
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block iboPageJsModuleScripts %}
|
||||
|
||||
{% if aPage.aJsFilesModules is not empty %}
|
||||
<script>
|
||||
console.log("aPage:", {{ aPage|raw }});
|
||||
</script>
|
||||
{% for aJsModule in aPage.aJsFilesModules %}
|
||||
<script type="module">
|
||||
import { {{ aJsModule.sModuleName }} } from "{{ aJsModule.sJsModuleSrc }}";
|
||||
{{ aJsModule.sModuleConfigJs|raw }}
|
||||
</script>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block iboCapturedOutput %}
|
||||
{{ aPage.sCapturedOutput|raw }}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user