# HG changeset patch # User Sylvain Thénault # Date 1286878325 -7200 # Node ID 6b6a2fa28069c6b5d985272b2ec108a74b42e7a9 # Parent f64899fa0b5ce83cfb7d46fe95af9a434a43cde7 [ui] nicer ajax edit relation table (tags box for instance) diff -r f64899fa0b5c -r 6b6a2fa28069 web/component.py --- a/web/component.py Mon Oct 11 19:45:15 2010 +0200 +++ b/web/component.py Tue Oct 12 12:12:05 2010 +0200 @@ -479,7 +479,7 @@ req.add_js(('cubicweb.ajax.js', 'cubicweb.ajax.box.js')) _ = req._ if related: - w(u'') + w(u'
') for rentity in related.entities(): # for each related entity, provide a link to remove the relation subview = rentity.view(self.item_vid) @@ -488,11 +488,11 @@ self.__regid__, entity.eid, rentity.eid, self.fname_remove, self.removed_msg and _(self.removed_msg))) - w(u'' - '' % (xml_escape(jscall), + w(u'' + '' % (xml_escape(jscall), subview)) else: - w(u'' % (subview)) + w(u'' % (subview)) w(u'
[-] %s
%s
%s
%s
') else: w(_('no related entity')) diff -r f64899fa0b5c -r 6b6a2fa28069 web/data/cubicweb.css --- a/web/data/cubicweb.css Mon Oct 11 19:45:15 2010 +0200 +++ b/web/data/cubicweb.css Tue Oct 12 12:12:05 2010 +0200 @@ -819,6 +819,14 @@ margin-bottom: 0.2em; /* because vertical-align doesn't seems to have any effect */ } + +table.ajaxEditRelationTable{ + margin-bottom: 0.5em; +} +table.ajaxEditRelationTable td.entity{ + padding-left: 0.5em; +} + /***************************************/ /* error view (views/management.py) */ /***************************************/ diff -r f64899fa0b5c -r 6b6a2fa28069 web/data/cubicweb.old.css --- a/web/data/cubicweb.old.css Mon Oct 11 19:45:15 2010 +0200 +++ b/web/data/cubicweb.old.css Tue Oct 12 12:12:05 2010 +0200 @@ -825,6 +825,13 @@ margin-bottom: 0.2em; /* because vertical-align doesn't seems to have any effect */ } +table.ajaxEditRelationTable{ + margin-bottom: 0.5em; +} +table.ajaxEditRelationTable td.entity{ + padding-left: 0.5em; +} + /***************************************/ /* error view (views/management.py) */ /***************************************/