mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
Proposition that allows to include modules from ar array. Works both on usual page + ajax page
This commit is contained in:
@@ -1,13 +1,7 @@
|
||||
{# @copyright Copyright (C) 2010-2025 Combodo SAS #}
|
||||
{# @license http://opensource.org/licenses/AGPL-3.0 #}
|
||||
|
||||
<script type="module">
|
||||
import {session} from "{{ aPage.sAbsoluteUrlAppRoot }}/node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js";
|
||||
|
||||
session.drive = false;
|
||||
</script>
|
||||
|
||||
<turbo-frame id="{{ oUIBlock.GetId() }}">
|
||||
<turbo-frame id="{{ oUIBlock.GetId() }}">
|
||||
{% if oUIBlock.GetAction() %}
|
||||
{{ form_start(oUIBlock.GetFormView(), {action: oUIBlock.GetAction()}) }}
|
||||
{% else %}
|
||||
|
||||
@@ -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