mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-29 17:36:49 +01:00
Moved Hallo media into widget
This commit is contained in:
parent
e4b75b4c41
commit
5773a5bebb
@ -3,7 +3,8 @@ from __future__ import absolute_import, unicode_literals
|
||||
import json
|
||||
|
||||
from django.conf import settings
|
||||
from django.forms import widgets
|
||||
from django.contrib.staticfiles.templatetags.staticfiles import static
|
||||
from django.forms import Media, widgets
|
||||
from django.utils.module_loading import import_string
|
||||
|
||||
from wagtail.utils.widgets import WidgetWithScript
|
||||
@ -31,6 +32,15 @@ class HalloRichTextArea(WidgetWithScript, widgets.Textarea):
|
||||
return None
|
||||
return DbWhitelister.clean(original_value)
|
||||
|
||||
@property
|
||||
def media(self):
|
||||
return Media(js=[
|
||||
static('wagtailadmin/js/vendor/hallo.js'),
|
||||
static('wagtailadmin/js/hallo-plugins/hallo-wagtaillink.js'),
|
||||
static('wagtailadmin/js/hallo-plugins/hallo-hr.js'),
|
||||
static('wagtailadmin/js/hallo-plugins/hallo-requireparagraphs.js'),
|
||||
])
|
||||
|
||||
|
||||
DEFAULT_RICH_TEXT_EDITORS = {
|
||||
'default': {
|
||||
|
@ -13,13 +13,9 @@
|
||||
</script>
|
||||
|
||||
<script src="{% static 'wagtailadmin/js/vendor/rangy-core.js' %}"></script>
|
||||
<script src="{% static 'wagtailadmin/js/vendor/hallo.js' %}"></script>
|
||||
<script src="{% static 'wagtailadmin/js/vendor/mousetrap.min.js' %}"></script>
|
||||
<script src="{% static 'wagtailadmin/js/expanding_formset.js' %}"></script>
|
||||
<script src="{% static 'wagtailadmin/js/modal-workflow.js' %}"></script>
|
||||
<script src="{% static 'wagtailadmin/js/hallo-plugins/hallo-wagtaillink.js' %}"></script>
|
||||
<script src="{% static 'wagtailadmin/js/hallo-plugins/hallo-hr.js' %}"></script>
|
||||
<script src="{% static 'wagtailadmin/js/hallo-plugins/hallo-requireparagraphs.js' %}"></script>
|
||||
<script src="{% static 'wagtailadmin/js/page-editor.js' %}"></script>
|
||||
<script src="{% static 'wagtailadmin/js/page-chooser.js' %}"></script>
|
||||
<script src="{% static 'admin/js/urlify.js' %}"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user