Fix django ajax selects
authorEric Mc Sween <eric.mcsween@auf.org>
Mon, 4 Jun 2012 15:36:38 +0000 (11:36 -0400)
committerEric Mc Sween <eric.mcsween@auf.org>
Mon, 4 Jun 2012 15:36:38 +0000 (11:36 -0400)
project/dae/admin.py
project/recrutement/admin.py
project/rh/admin.py
project/settings.py

index a1ae18b..eba45f3 100644 (file)
@@ -11,7 +11,14 @@ from project.dae.models import Poste, Dossier
 class BaseAdmin(admin.ModelAdmin):
 
     class Media:
-        css = {'screen': ('css/admin_custom.css',)}
+        css = {'screen': (
+            'css/admin_custom.css',
+            'jquery-autocomplete/jquery.autocomplete.css',
+        )}
+        js = (
+            'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js',
+            'jquery-autocomplete/jquery.autocomplete.min.js',
+        )
 
 
 class PosteAdmin(BaseAdmin, VersionAdmin):
index e312d7f..ac47ca2 100644 (file)
@@ -28,7 +28,14 @@ IMPLANTATIONS_CENTRALES = [15, 19]
 class BaseAdmin(admin.ModelAdmin):
 
     class Media:
-        css = {'screen': ('css/admin_custom.css',)}
+        css = {'screen': (
+            'css/admin_custom.css',
+            'jquery-autocomplete/jquery.autocomplete.css',
+        )}
+        js = (
+            'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js',
+            'jquery-autocomplete/jquery.autocomplete.min.js',
+        )
 
 
 class OrderedChangeList(admin.views.main.ChangeList):
index 1e0c14a..0d4f547 100644 (file)
@@ -25,7 +25,14 @@ from decorators import in_drh_or_admin
 class BaseAdmin(admin.ModelAdmin):
 
     class Media:
-        css = {'screen': ('css/admin_custom.css',)}
+        css = {'screen': (
+            'css/admin_custom.css',
+            'jquery-autocomplete/jquery.autocomplete.css',
+        )}
+        js = (
+            'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js',
+            'jquery-autocomplete/jquery.autocomplete.min.js',
+        )
 
 
 class ArchiveMixin(object):
index d2d27f5..3393676 100644 (file)
@@ -141,7 +141,6 @@ AJAX_LOOKUP_CHANNELS = {
     'employes' : ('rh.catalogues', 'Employe'),
     'dossiers' : ('rh.catalogues', 'Dossier'),
 }
-AJAX_SELECT_BOOTSTRAP = True
 AJAX_SELECT_INLINES = 'inline'