cleanup
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 30 Jul 2009 18:52:33 +0200
changeset 2577 7c9888114085
parent 2576 4ed80b85a22a
child 2578 b717ebef04d8
cleanup
sobjects/notification.py
web/views/formrenderers.py
--- a/sobjects/notification.py	Thu Jul 30 18:52:26 2009 +0200
+++ b/sobjects/notification.py	Thu Jul 30 18:52:33 2009 +0200
@@ -133,8 +133,10 @@
     * set a content attribute to define the content of the email (unless you
       override call)
     """
+    # XXX refactor this class to work with len(rset) > 1
+
     msgid_timestamp = True
-    # XXX refactor to work with len(rset) > 1
+
     def recipients(self):
         finder = self.vreg.select('components', 'recipients_finder', self.req,
                                   rset=self.rset)
--- a/web/views/formrenderers.py	Thu Jul 30 18:52:26 2009 +0200
+++ b/web/views/formrenderers.py	Thu Jul 30 18:52:33 2009 +0200
@@ -323,10 +323,12 @@
             entity = form.edited_entity
             values = form.form_previous_values
             qeid = eid_param('eid', entity.eid)
-            cbsetstate = "setCheckboxesState2('eid', %s, 'checked')" % xml_escape(dumps(entity.eid))
+            cbsetstate = "setCheckboxesState2('eid', %s, 'checked')" % \
+                         xml_escape(dumps(entity.eid))
             w(u'<tr class="%s">' % (entity.row % 2 and u'even' or u'odd'))
             # XXX turn this into a widget used on the eid field
-            w(u'<td>%s</td>' % checkbox('eid', entity.eid, checked=qeid in values))
+            w(u'<td>%s</td>' % checkbox('eid', entity.eid,
+                                        checked=qeid in values))
             for field in fields:
                 error = form.form_field_error(field)
                 if error:
@@ -334,10 +336,12 @@
                     w(error)
                 else:
                     w(u'<td>')
-                if isinstance(field.widget, (fwdgs.Select, fwdgs.CheckBox, fwdgs.Radio)):
+                if isinstance(field.widget, (fwdgs.Select, fwdgs.CheckBox,
+                                             fwdgs.Radio)):
                     field.widget.attrs['onchange'] = cbsetstate
                 elif isinstance(field.widget, fwdgs.Input):
                     field.widget.attrs['onkeypress'] = cbsetstate
+                # XXX else
                 w(u'<div>%s</div>' % field.render(form, self))
                 w(u'</td></tr>')
         else: