diff --git a/templates/pages/backoffice/webpage/layout.html.twig b/templates/pages/backoffice/webpage/layout.html.twig
index 63e7620d6d..818d55a4ac 100644
--- a/templates/pages/backoffice/webpage/layout.html.twig
+++ b/templates/pages/backoffice/webpage/layout.html.twig
@@ -40,12 +40,6 @@
{% block iboPageBodyHtml %}
{{ render_block(oLayout, {aPage: aPage}) }}
-
- {# TODO: Remove this when modal development is done #}
-
{{ aPage.sDeferredContent|raw }}
-
Please wait...
-
-
{% endblock %}
@@ -54,12 +48,14 @@
{{ render_block(oBlock, {aPage: aPage}) }}
{% endfor %}
{% endblock %}
-
+{% if aPage.aJsFiles is not empty %}
+
+{% endif %}
{% block iboPageJsFiles %}
{% for sJsFile in aPage.aJsFiles %}
@@ -67,33 +63,34 @@
{% endblock %}
{% block iboPageJsInlineScripts %}
-
+ {% endblock %}
-{% block iboPageJsInlineLive %}
- {% for sJsInline in aPage.aJsInlineLive %}
- {# We put each scripts in a dedicated script tag to prevent massive failure if 1 script is broken (eg. missing semi-colon or non closed multi-line comment) #}
-
- {% endfor %}
-{% endblock %}
+ {% block iboPageJsInlineOnDomReady %}
+ setTimeout(function () {
+ {% for sJsInline in aPage.aJsInlineOnDomReady %}
+ {{ sJsInline|raw }}
+ {% endfor %}
+ }, 50);
+ {% endblock %}
+ });
+
+ {% endif %}
+ {% block iboPageJsInlineLive %}
+ {% for sJsInline in aPage.aJsInlineLive %}
+ {# We put each scripts in a dedicated script tag to prevent massive failure if 1 script is broken (eg. missing semi-colon or non closed multi-line comment) #}
+
+ {% endfor %}
+ {% endblock %}
{% endblock %}
{{ aPage.sCapturedOutput|raw }}