mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°7264 - Fix regression from ff130516
This commit is contained in:
@@ -186,25 +186,27 @@
|
||||
{% endif %}
|
||||
|
||||
{% block iboPageCssFiles %}
|
||||
<script type="text/javascript">
|
||||
// If this constant isn't defined by the main page, define it (global) ourselves
|
||||
if (typeof aLoadedCssFilesRegister === "undefined") {
|
||||
Object.defineProperty(window, "aLoadedCssFilesRegister", {
|
||||
value: new Map(),
|
||||
writable: false,
|
||||
configurable: false,
|
||||
enumerable: true
|
||||
});
|
||||
}
|
||||
|
||||
{% for aCssFileData in aPage.aCssFiles %}
|
||||
// Only if file is NOT already present in the register (see it declaration in WebPage TWIG template), add it to the page and register
|
||||
if (aLoadedCssFilesRegister.has("{{ aCssFileData['link']|raw }}") === false) {
|
||||
$('<link href="{{ aCssFileData['link'] }}" rel="stylesheet">').appendTo('head');
|
||||
aLoadedCssFilesRegister.set("{{ aCssFileData['link']|raw }}", true);
|
||||
{% if aPage.aCssFiles is not empty %}
|
||||
<script type="text/javascript">
|
||||
// If this constant isn't defined by the main page, define it (global) ourselves
|
||||
if (typeof aLoadedCssFilesRegister === "undefined") {
|
||||
Object.defineProperty(window, "aLoadedCssFilesRegister", {
|
||||
value: new Map(),
|
||||
writable: false,
|
||||
configurable: false,
|
||||
enumerable: true
|
||||
});
|
||||
}
|
||||
{% endfor %}
|
||||
</script>
|
||||
|
||||
{% for aCssFileData in aPage.aCssFiles %}
|
||||
// Only if file is NOT already present in the register (see it declaration in WebPage TWIG template), add it to the page and register
|
||||
if (aLoadedCssFilesRegister.has("{{ aCssFileData['link']|raw }}") === false) {
|
||||
$('<link href="{{ aCssFileData['link'] }}" rel="stylesheet">').appendTo('head');
|
||||
aLoadedCssFilesRegister.set("{{ aCssFileData['link']|raw }}", true);
|
||||
}
|
||||
{% endfor %}
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{{ aPage.sCapturedOutput|raw }}
|
||||
|
||||
Reference in New Issue
Block a user