# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1233060770 -3600 # Node ID 79eccee3004918d9d484a23037c1579dfc8a9b30 # Parent 62968fa8845c88469822f4a036733eb9b4fd117d allow divid as method argument (backport from default) diff -r 62968fa8845c -r 79eccee30049 web/views/tableview.py --- a/web/views/tableview.py Tue Jan 27 13:52:07 2009 +0100 +++ b/web/views/tableview.py Tue Jan 27 13:52:50 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'