Skip to content

Commit

Permalink
Adding block links in table cells.
Browse files Browse the repository at this point in the history
Fixes bug #999303

Change-Id: I09a379fbe8afd042a43db99c974c7a8d104de3d3
  • Loading branch information
John Postlethwait committed Jun 7, 2012
1 parent ef5b47c commit 187785b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions horizon/tables/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ def __init__(self, transform, verbose_name=None, sortable=True,
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)
Expand Down
2 changes: 1 addition & 1 deletion horizon/tests/table_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def test_table_column(self):
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)
Expand Down
9 changes: 8 additions & 1 deletion openstack_dashboard/static/dashboard/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -396,6 +400,9 @@ a.current_item:hover h3, a.current_item:hover h4 {
th {
background: #f1f1f1;
}
td.anchor {
padding: 0;
}


small {
Expand Down Expand Up @@ -555,7 +562,7 @@ table form {
font-family: "anivers";
}

#monitoring h3{
#monitoring h3 {
font-size: 14px;
font-weight: normal;
float: left;
Expand Down

0 comments on commit 187785b

Please sign in to comment.