finished up form media

This commit is contained in:
vabene1111
2018-05-17 21:47:22 +02:00
parent 062d00c474
commit 6590bec117
5 changed files with 6 additions and 5 deletions

View File

@ -12,7 +12,6 @@ class MultiSelectWidget(widgets.SelectMultiple):
class EmojiWidget(forms.TextInput):
class Media:
js = ('custom/js/form_emoji.js',)
# TODO add class to input fields so there is no longer a static reference to #id_icon in the js but a class based like in multiselect
class EditRecipeForm(forms.ModelForm):

View File

@ -1,3 +1,3 @@
$(document).ready(function () {
$('#id_icon').emojioneArea();
$('.emojiwidget').emojioneArea();
});

View File

@ -1,3 +1,3 @@
$(document).ready(function () {
$('.selectmultiple').select2();
$('.multiselectwidget').select2();
});

View File

@ -45,6 +45,7 @@ INSTALLED_APPS = [
'django_filters',
'crispy_forms',
'rest_framework',
'watson',
'cookbook.apps.CookbookConfig',
]

View File

@ -6,3 +6,4 @@ django-filter
django-crispy-forms
djangorestframework
django-autocomplete-light
django-watson