Only load Hallo CSS if Hallo is in use

This commit is contained in:
Thibaud Colas 2018-01-11 14:34:09 +02:00
parent 9521f21359
commit 194161ec59
2 changed files with 4 additions and 3 deletions

View file

@ -133,7 +133,9 @@ class HalloRichTextArea(WidgetWithScript, widgets.Textarea):
media = Media(js=[
'wagtailadmin/js/vendor/hallo.js',
'wagtailadmin/js/hallo-bootstrap.js',
])
], css={
'all': ['wagtailadmin/css/panels/rich-text.css']
})
for plugin in self.plugins:
media += plugin.media

View file

@ -4,8 +4,7 @@
CSS declarations to be included on the 'create page' and 'edit page' views
{% endcomment %}
<link rel="stylesheet" href="{% static 'wagtailadmin/css/layouts/page-editor.css' %}" type="text/css" />
<link rel="stylesheet" href="{% static 'wagtailadmin/css/panels/rich-text.css' %}" type="text/css" />
<link rel="stylesheet" href="{% static 'wagtailadmin/css/layouts/page-editor.css' %}" />
{% hook_output 'insert_editor_css' %}