Adding block links in table cells.

Fixes bug #999303

Change-Id: I09a379fbe8afd042a43db99c974c7a8d104de3d3
This commit is contained in:
John Postlethwait 2012-06-06 14:36:59 -07:00
parent ef5b47ced0
commit 187785b28d
3 changed files with 11 additions and 2 deletions

View File

@ -214,6 +214,8 @@ class Column(html.HTMLElement):
self.classes.append("sortable")
if self.hidden:
self.classes.append("hide")
if self.link is not None:
self.classes.append('anchor')
def __unicode__(self):
return unicode(self.verbose_name)

View File

@ -341,7 +341,7 @@ class DataTableTests(test.TestCase):
self.assertEqual(row3.cells['optional'].value, "N/A")
# classes
self.assertEqual(value_col.get_final_attrs().get('class', ""),
"green blue sortable")
"green blue sortable anchor")
# status
cell_status = row.cells['status'].status
self.assertEqual(cell_status, True)

View File

@ -372,6 +372,10 @@ a.current_item:hover h3, a.current_item:hover h4 {
.table th.header:hover {
background-color: #e8e8e8;
}
.table tbody td.anchor a {
display: block;
padding: 8px;
}
.table tr.table_caption th.header:hover {
background-color: transparent;
cursor: default;
@ -396,6 +400,9 @@ a.current_item:hover h3, a.current_item:hover h4 {
th {
background: #f1f1f1;
}
td.anchor {
padding: 0;
}
small {
@ -555,7 +562,7 @@ table form {
font-family: "anivers";
}
#monitoring h3{
#monitoring h3 {
font-size: 14px;
font-weight: normal;
float: left;