Skip to content

Commit f0c41b8

Browse files
authored
Render all legacy resources at the end of the page (#2354)
* Render all legacy resources at the end of the page * Changelog updated
1 parent 52d1e51 commit f0c41b8

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

CHANGES.rst

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Changelog
44
2.5.0 (unreleased)
55
------------------
66

7+
- #2354 Render all legacy resources at the end of the page
78
- #2350 Display batch labels in listing
89
- #2347 Remove unused inline validation view
910
- #2346 Fix unauthorized error when accessing dispatch/partition sample view with shared client role

src/senaite/core/browser/main_template/templates/main_template.pt

+17-7
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,10 @@
4444
<!-- <link tal:replace="structure provider:plone.htmlhead.links" /> -->
4545
<!-- <metal:styleslot define-slot="style_slot" /> -->
4646

47-
<!-- SENAITE legacy resouces -->
48-
<metal:resources define-slot="senaite_legacy_resources" />
49-
<!-- SENAITE legacy JS -->
50-
<metal:resources define-slot="senaite_legacy_js" />
51-
<!-- SENAITE legacy CSS -->
52-
<metal:resources define-slot="senaite_legacy_css" />
47+
<!-- NOTE: All Legacy JS/CSS are rendered at the bottom of the page! -->
48+
49+
<meta name="generator" content="SENAITE - https://www.senaite.com" />
5350

54-
<meta name="generator" content="Plone - http://plone.com" />
5551
<meta name="viewport"
5652
tal:define="viewportvalues bootstrapview/get_viewport_values"
5753
tal:attributes="content viewportvalues"
@@ -185,6 +181,20 @@
185181
</div>
186182

187183
</div>
184+
185+
<!-- NOTE:
186+
We define all legacy resource slots at the bottom to ensure these are
187+
loaded *after* the JS/CSS from the resources viewlet (rendered in the
188+
IHtmlHead viewlet manager) and the HTML is completely loaded.
189+
-->
190+
191+
<!-- SENAITE legacy resouces -->
192+
<metal:resources define-slot="senaite_legacy_resources" />
193+
<!-- SENAITE legacy JS -->
194+
<metal:resources define-slot="senaite_legacy_js" />
195+
<!-- SENAITE legacy CSS -->
196+
<metal:resources define-slot="senaite_legacy_css" />
197+
188198
</body>
189199
</html>
190200

0 commit comments

Comments
 (0)