# HG changeset patch # User Aurelien Campeas # Date 1316703223 -7200 # Node ID 37d23a1d3547bc003c8e1cf15537e55e9bba9e6c # Parent 65b7ea00bab8b10f41e5c557f2bbe5e5ad4b63f9 [views/table] parametrize table view co-classes (closes #1947472) diff -r 65b7ea00bab8 -r 37d23a1d3547 web/views/tableview.py --- a/web/views/tableview.py Thu Sep 22 15:55:58 2011 +0200 +++ b/web/views/tableview.py Thu Sep 22 16:53:43 2011 +0200 @@ -42,6 +42,9 @@ title = _('table') finalview = 'final' + table_widget_class = TableWidget + table_column_class = TableColumn + def form_filter(self, divid, displaycols, displayactions, displayfilter, paginate, hidden=True): try: @@ -144,7 +147,7 @@ if paginate: self.divid = divid # XXX iirk (see usage in page_navigation_url) self.paginate(page_size=page_size, show_all_option=False) - table = TableWidget(self) + table = self.table_widget_class(self) for column in self.get_columns(computed_labels, displaycols, headers, subvid, cellvids, cellattrs, mainindex): table.append_column(column) @@ -195,7 +198,7 @@ label = headers[displaycols.index(colindex)] if colindex == mainindex and label is not None: label += ' (%s)' % self.cw_rset.rowcount - column = TableColumn(label, colindex) + column = self.table_column_class(label, colindex) coltype = self.cw_rset.description[0][colindex] # compute column cell view (if coltype is None, it's a left outer # join, use the default non final subvid)