# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1232964377 -3600 # Node ID 365826a5866464925a87820575b5ea8a240b9a7b # Parent 3fac8c5087799761565d7437a73eb3fed871e082 allow divid as argument diff -r 3fac8c508779 -r 365826a58664 web/views/tableview.py --- a/web/views/tableview.py Mon Jan 26 11:05:49 2009 +0100 +++ b/web/views/tableview.py Mon Jan 26 11:06:17 2009 +0100 @@ -72,7 +72,7 @@ return displaycols def call(self, title=None, subvid=None, displayfilter=None, headers=None, - displaycols=None, displayactions=None, actions=(), + displaycols=None, displayactions=None, actions=(), divid=None, cellvids=None, cellattrs=None): """Dumps a table displaying a composite query @@ -93,7 +93,7 @@ hidden = True if not subvid and 'subvid' in req.form: subvid = req.form.pop('subvid') - divid = req.form.get('divid') or 'rs%s' % make_uid(id(rset)) + divid = divid or req.form.get('divid') or 'rs%s' % make_uid(id(rset)) actions = list(actions) if mainindex is None: displayfilter, displayactions = False, False @@ -208,7 +208,6 @@ else: column.append_renderer(subvid or 'incontext', colindex) - if cellattrs and colindex in cellattrs: for name, value in cellattrs[colindex].iteritems(): column.add_attr(name,value) @@ -291,7 +290,7 @@ # parameters title = None - def call(self, title=None, subvid=None, headers=None, + def call(self, title=None, subvid=None, headers=None, divid=None, displaycols=None, displayactions=None): """Dumps a table displaying a composite query""" actrql = self.req.form['actualrql'] @@ -299,6 +298,8 @@ displaycols = self.displaycols(displaycols) if displayactions is None and 'displayactions' in self.req.form: displayactions = True + if divid is None and 'divid' in self.req.form: + divid = self.req.form['divid'] self.w(u'