From 605cbece20911879322becf7664c8e45712147b3 Mon Sep 17 00:00:00 2001 From: Corey Oordt Date: Mon, 26 Apr 2010 14:47:28 -0400 Subject: [PATCH] Fixing jquery issues --- editor/settings.py | 2 +- editor/templates/admin/editor/editor.html | 6 +++--- editor/tree_editor.py | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/editor/settings.py b/editor/settings.py index 65ac141..1d758ad 100644 --- a/editor/settings.py +++ b/editor/settings.py @@ -4,6 +4,6 @@ import django DJANGO10_COMPAT = django.VERSION[0] < 1 or (django.VERSION[0] == 1 and django.VERSION[1] < 1) MEDIA_PATH = getattr(settings, 'EDITOR_MEDIA_PATH', '/media/editor/') - +STATIC_MEDIA_PATH = getattr(settings, 'STATIC_URL', settings.MEDIA_URL) # Link to google APIs instead of using local copy of JS libraries MEDIA_HOTLINKING = getattr(settings, 'EDITOR_MEDIA_HOTLINKING', False) diff --git a/editor/templates/admin/editor/editor.html b/editor/templates/admin/editor/editor.html index 4285127..2790212 100644 --- a/editor/templates/admin/editor/editor.html +++ b/editor/templates/admin/editor/editor.html @@ -8,9 +8,9 @@ {% else %} - - - + + + {% endif %} diff --git a/editor/tree_editor.py b/editor/tree_editor.py index 62bf45c..4cbc053 100644 --- a/editor/tree_editor.py +++ b/editor/tree_editor.py @@ -112,14 +112,14 @@ class TreeEditor(admin.ModelAdmin): css = {} js = [] if settings.MEDIA_HOTLINKING: - js.extend(( "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js", )) + js.extend(( "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", )) else: - js.extend(( settings.MEDIA_PATH + "jquery-1.3.2.min.js", )) + js.extend(( settings.STATIC_URL + "jquery-1.4.2.min.js", )) - js.extend(( settings.MEDIA_PATH + "ie_compat.js", - settings.MEDIA_PATH + "jquery.cookie.js" , - settings.MEDIA_PATH + "toolbox.js", - settings.MEDIA_PATH + "page_toolbox.js", + js.extend(( settings.STATIC_URL + "ie_compat.js", + settings.STATIC_URL + "jquery.cookie.js" , + settings.STATIC_URL + "toolbox.js", + settings.STATIC_URL + "page_toolbox.js", )) def __init__(self, *args, **kwargs):