Skip to content

Commit

Permalink
fix: remove multiple jQuery versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jerivas committed Aug 12, 2020
1 parent 9a25687 commit f0a8d8b
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 11,050 deletions.
2 changes: 0 additions & 2 deletions mezzanine/core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ class BaseTranslationModelAdmin(TranslationAdmin):
"""
class Media:
js = (
'admin/js/jquery.init.js',
static("modeltranslation/js/force_jquery.js"),
static("mezzanine/js/admin/tabbed_translation_fields.js"),
)
css = {
Expand Down
2 changes: 1 addition & 1 deletion mezzanine/core/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
description=_("Name of the jQuery file found in "
"mezzanine/core/static/mezzanine/js/"),
editable=False,
default="jquery-1.12.4.js",
default="jquery-3.4.1.js",
)

register_setting(
Expand Down
4 changes: 1 addition & 3 deletions mezzanine/core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ class TinyMceWidget(forms.Textarea):

@property
def media(self):
extra = '' if settings.DEBUG else '.min'
js = [
'admin/js/vendor/jquery/jquery%s.js' % extra,
'admin/js/jquery.init.js',
static("mezzanine/tinymce/tinymce.min.js"),
static("mezzanine/tinymce/jquery.tinymce.min.js"),
static(settings.TINYMCE_SETUP_JS),
Expand Down Expand Up @@ -92,6 +89,7 @@ class DynamicInlineAdminForm(forms.ModelForm):

class Media:
js = [
# Ensure Django's noConflict jQuery has loaded BEFORE our scripts
'admin/js/jquery.init.js',
static("mezzanine/js/%s" % settings.JQUERY_UI_FILENAME),
static("mezzanine/js/admin/dynamic_inline.js")
Expand Down
Loading

0 comments on commit f0a8d8b

Please sign in to comment.