cleanup tls-sprint
authorsylvain.thenault@logilab.fr
Thu, 09 Apr 2009 14:32:18 +0200
branchtls-sprint
changeset 1320 c85f4d8eff8b
parent 1319 2fe3df4e1e60
child 1321 c5655237f08a
cleanup
server/repository.py
web/data/cubicweb.ajax.js
web/views/basecontrollers.py
web/views/editforms.py
web/views/eproperties.py
--- a/server/repository.py	Thu Apr 09 14:31:48 2009 +0200
+++ b/server/repository.py	Thu Apr 09 14:32:18 2009 +0200
@@ -112,11 +112,13 @@
     if card[0] in '1?':
         rschema = session.repo.schema.rschema(rtype)
         if not rschema.inlined:
-            session.unsafe_execute('DELETE X %s Y WHERE X eid %%(x)s, NOT Y eid %%(y)s' % rtype,
-                                   {'x': eidfrom, 'y': eidto}, 'x')
+            session.unsafe_execute(
+                'DELETE X %s Y WHERE X eid %%(x)s, NOT Y eid %%(y)s' % rtype,
+                {'x': eidfrom, 'y': eidto}, 'x')
     if card[1] in '1?':
-        session.unsafe_execute('DELETE X %s Y WHERE NOT X eid %%(x)s, Y eid %%(y)s' % rtype,
-                               {'x': eidfrom, 'y': eidto}, 'y')
+        session.unsafe_execute(
+            'DELETE X %s Y WHERE NOT X eid %%(x)s, Y eid %%(y)s' % rtype,
+            {'x': eidfrom, 'y': eidto}, 'y')
 
     
 class Repository(object):
--- a/web/data/cubicweb.ajax.js	Thu Apr 09 14:31:48 2009 +0200
+++ b/web/data/cubicweb.ajax.js	Thu Apr 09 14:32:18 2009 +0200
@@ -58,8 +58,6 @@
 	callback = data.callback;
 	delete data.callback;
     }
-    var node = this.get(0); // only consider the first element
-    ajax = jQuery.post;
     ajax(url, data, function(response) {
 	var domnode = getDomFromResponse(response);
 	if (mode == 'swap') {
--- a/web/views/basecontrollers.py	Thu Apr 09 14:31:48 2009 +0200
+++ b/web/views/basecontrollers.py	Thu Apr 09 14:32:18 2009 +0200
@@ -388,7 +388,6 @@
 
     def js_prop_widget(self, propkey, varname, tabindex=None):
         """specific method for EProperty handling"""
-        print 'PROP WIDGET', propkey, varname, tabindex
         entity = self.vreg.etype_class('EProperty')(self.req, None, None)
         entity.eid = varname
         entity['pkey'] = propkey
--- a/web/views/editforms.py	Thu Apr 09 14:31:48 2009 +0200
+++ b/web/views/editforms.py	Thu Apr 09 14:32:18 2009 +0200
@@ -40,8 +40,10 @@
     """return javascript snippet to delete/undelete a relation between two
     entities
     """
-    js = u"javascript: togglePendingDelete('%s', %s);" % (nodeid, html_escape(dumps(eid)))
-    return u'[<a class="handle" href="%s" id="handle%s">%s</a>]' % (js, nodeid, label)
+    js = u"javascript: togglePendingDelete('%s', %s);" % (
+        nodeid, html_escape(dumps(eid)))
+    return u'[<a class="handle" href="%s" id="handle%s">%s</a>]' % (
+        js, nodeid, label)
 
 
 class DeleteConfForm(FormViewMixIn, EntityView):
@@ -359,7 +361,7 @@
           - oneline view of related entity
         """
         entity = self.edited_entity
-        pending_deletes = self.req.get_pending_deletes(entity.eid)
+        pending_deletes = self.req.get_pending_deletes(entity.eid)        
         for label, rschema, role in self.srelations_by_category('generic', 'add'):
             relatedrset = entity.related(rschema, role, limit=self.related_limit)
             if rschema.has_perm(self.req, 'delete'):
--- a/web/views/eproperties.py	Thu Apr 09 14:31:48 2009 +0200
+++ b/web/views/eproperties.py	Thu Apr 09 14:32:18 2009 +0200
@@ -115,9 +115,8 @@
               (make_togglable_link('fieldset_' + group, label,
                                    self._cookie_name(group))))
             w(u'<div id="fieldset_%s" %s>' % (group, status))
-            w(u'<fieldset class="subentity">')
             w(form)
-            w(u'</fieldset></div>')
+            w(u'</div>')
         for label, group, objects in sorted((_(g), g, o)
                                             for g, o in groupedopts.iteritems()):
             status = css_class(self._group_status(group))