web/component.py
changeset 6448 8590d82e9b1b
parent 6423 c560f8d9faee
child 6452 6b6a2fa28069
--- a/web/component.py	Mon Oct 11 17:46:22 2010 +0200
+++ b/web/component.py	Mon Oct 11 19:12:59 2010 +0200
@@ -475,6 +475,7 @@
             mayadd = self.rdef.has_perm(req, 'add', toeid=entity.eid)
             maydel = self.rdef.has_perm(req, 'delete', toeid=entity.eid)
         if mayadd or maydel:
+            req.add_js(('jquery.ui.js', 'cubicweb.widgets.js'))
             req.add_js(('cubicweb.ajax.js', 'cubicweb.ajax.box.js'))
         _ = req._
         if related:
@@ -496,8 +497,8 @@
         else:
             w(_('no related entity'))
         if mayadd:
-            req.add_js('jquery.autocomplete.js')
-            req.add_css('jquery.autocomplete.css')
+            req.add_js(('jquery.ui.js', 'cubicweb.widgets.js'))
+            req.add_css('jquery.ui.css')
             multiple = self.rdef.role_cardinality(self.role) in '*+'
             w(u'<table><tr><td>')
             jscall = unicode(js.ajaxBoxShowSelector(