reorder nav (sidebar) imports so that hooks can still override them (#7954)

- main_nav_css & main_nav_js were added when the new slim sidebar was being built
- with the legacy styles/js - there was little risk of there being conflicts
- with the new sidebar CSS, this sidebar bundle comes with a large duplicate of what is in core.css so we should add it before the hooks run so that hook scan override if needed as per our documentation
- this is a temporary fix for #7943 - ideally we should avoid sidebar.scss bundle duplicating so much of the core css
- note: JS is lower risk but should follow the same convention
pull/7962/head
LB Johnston 2022-02-11 06:15:03 +10:00 zatwierdzone przez Matt Westcott
rodzic adeabd9633
commit f7836c2014
3 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -17,6 +17,7 @@ Changelog
* Fix: Fix issue where bulk actions would not work for object IDs greater than 999 when `USE_THOUSAND_SEPARATOR` (Dennis McGregor)
* Fix: Set cookie for sidebar collapsed state to "SameSite: lax" (LB (Ben Johnston))
* Fix: Prevent error on creating automatic redirects for sites with non-standard ports (Matt Westcott)
* Fix: Restore ability to customise admin UI colours via CSS (LB (Ben Johnston))
2.16 (07.02.2022)

Wyświetl plik

@ -18,3 +18,4 @@ Bug fixes
* Fix issue where bulk actions would not work for object IDs greater than 999 when ``USE_THOUSAND_SEPARATOR`` (Dennis McGregor)
* Set cookie for sidebar collapsed state to "SameSite: lax" (LB (Ben Johnston))
* Prevent error on creating automatic redirects for sites with non-standard ports (Matt Westcott)
* Restore ability to customise admin UI colours via CSS (LB (Ben Johnston))

Wyświetl plik

@ -5,10 +5,11 @@
<link rel="stylesheet" href="{% versioned_static 'wagtailadmin/css/vendor/jquery-ui/jquery-ui-1.10.3.verdant.css' %}" />
<link rel="stylesheet" href="{% versioned_static 'wagtailadmin/css/vendor/jquery.tagit.css' %}">
<link rel="stylesheet" href="{% versioned_static 'wagtailadmin/css/core.css' %}" type="text/css" />
{% hook_output 'insert_global_admin_css' %}
{% main_nav_css %}
{% hook_output 'insert_global_admin_css' %}
{% block extra_css %}{% endblock %}
{% endblock %}
@ -52,11 +53,10 @@
<script src="{% versioned_static 'wagtailadmin/js/core.js' %}"></script>
<script src="{% versioned_static 'wagtailadmin/js/vendor.js' %}"></script>
<script src="{% versioned_static 'wagtailadmin/js/wagtailadmin.js' %}"></script>
{% hook_output 'insert_global_admin_js' %}
{% main_nav_js %}
{% hook_output 'insert_global_admin_js' %}
{% block extra_js %}{% endblock %}
{% endblock %}