Do not render links in checkbox columns
Review Request #7487 — Created July 3, 2015 and submitted
Cell rendering in DataGrid columns has been updated to allow the cell
to override theDataGrid
's choice of cell template. This allows the
theCheckboxColumn
to render without links, which would previously
activate when checked.
Tested the change with Review Board. There were no links in the
dashboard's checkboxes. Checking the checkbox did not redirect before
and after switching into mobile mode.
Description | From | Last Updated |
---|---|---|
local variable 'datagrid' is assigned to but never used |
reviewbot | |
This is pretty lengthy, in terms of line count. Can you format like: state.blah = \ self.renderblah(...) |
chipx86 | |
Careful. The render context should be shared amongst all cells, as an optimization (with a standard RequestContext, it'd rebuild bits … |
chipx86 |
- Change Summary:
-
PEP8
- Commit:
-
9cc0fcba57a201f6e2bbcac7c9cb229188a81ffda5659a69999877aa8f3b95226513629a71133894
- Diff:
-
Revision 2 (+48 -4)
-
Tool: Pyflakes Processed Files: djblets/datagrid/grids.py Tool: PEP8 Style Checker Processed Files: djblets/datagrid/grids.py
-
-
This is pretty lengthy, in terms of line count. Can you format like:
state.blah = \ self.renderblah(...)
-
Careful. The render context should be shared amongst all cells, as an optimization (with a standard RequestContext, it'd rebuild bits for every cell, which was slow).
Maybe instead of all this, we just change the template for those cells?
- Description:
-
~ Cell rendering in columns has been refactored to allow the column class
~ to override a the method by which the cached cell will be generated. ~ This allows subclasses to specialize cell rendering by e.g., injecting ~ extra context. This has been used to ensure that the url
context~ Cell rendering in DataGrid columns has been updated to allow the cell
~ to override the DataGrid
's choice of cell template. This allows the~ the CheckboxColumn
to render without links, which would previously~ activate when checked. - parameter is never set when rendering a CheckboxColumn
so that links- will not appear in the column. Previously, a link would be rendered if - there was a URL set for the row and checking the checkbox would - activate the link. - Testing Done:
-
Tested the change with Review Board. There were no links in the
~ dashboard's checkboxes. ~ dashboard's checkboxes. Checking the checkbox did not redirect before + and after switching into mobile mode. - Commit:
-
a5659a69999877aa8f3b95226513629a711338940078e83404e4522dd318efed67e0dbd330737770