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

index 0146b7d..32576e9 100644 (file)
@@ -13,7 +13,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 38dd9a3..1524e16 100644 (file)
@@ -37,7 +37,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 8f10421..df95a20 100644 (file)
@@ -29,7 +29,14 @@ from project.rh.change_list import ChangeList
 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 96525ff..5d2527f 100644 (file)
@@ -138,7 +138,6 @@ AJAX_LOOKUP_CHANNELS = {
     'employes': ('project.rh.catalogues', 'Employe'),
     'dossiers': ('project.rh.catalogues', 'Dossier'),
 }
-AJAX_SELECT_BOOTSTRAP = True
 AJAX_SELECT_INLINES = 'inline'