Author: croberts
Date: 2011-09-28 19:37:59 +0000 (Wed, 28 Sep 2011)
New Revision: 5027
Modified:
trunk/cumin/python/cumin/grid/tags.py
trunk/wooly/python/wooly/datatable.py
trunk/wooly/python/wooly/table.py
trunk/wooly/python/wooly/table.strings
Log:
Adding a title attribute to the features column under Grid::Configuration that will show
all the features (not just the abbreviated list). Also provided the plumbing to add a
cell_title to any table cell.
Modified: trunk/cumin/python/cumin/grid/tags.py
===================================================================
--- trunk/cumin/python/cumin/grid/tags.py 2011-09-28 17:44:27 UTC (rev 5026)
+++ trunk/cumin/python/cumin/grid/tags.py 2011-09-28 19:37:59 UTC (rev 5027)
@@ -335,8 +335,11 @@
def render_cell_content(self, session, data):
feature_list = data[2]
features = truncate_text(feature_list, 50, True)
- return features
+ return features
+ def render_cell_title(self, session, data):
+ return data[2]
+
class HostCountColumn(ObjectTableColumn):
def render_cell_content(self, session, data):
tags = super(TagInventory.HostCountColumn, self).render_cell_content(session,
data)
Modified: trunk/wooly/python/wooly/datatable.py
===================================================================
--- trunk/wooly/python/wooly/datatable.py 2011-09-28 17:44:27 UTC (rev 5026)
+++ trunk/wooly/python/wooly/datatable.py 2011-09-28 19:37:59 UTC (rev 5027)
@@ -186,6 +186,9 @@
def render_cell_content(self, session, record):
return self.field.get_content(session, record)
+
+ def render_cell_title(self, session, record):
+ return ""
class DataTableHeader(TableHeader):
def __init__(self, app, name):
Modified: trunk/wooly/python/wooly/table.py
===================================================================
--- trunk/wooly/python/wooly/table.py 2011-09-28 17:44:27 UTC (rev 5026)
+++ trunk/wooly/python/wooly/table.py 2011-09-28 19:37:59 UTC (rev 5027)
@@ -243,6 +243,10 @@
def render_content(self, session, record):
return self.parent.render_cell_content(session, record)
+
+ def render_cell_title(self, session, record):
+ #gives us the title="" attribute for each table cell
+ return self.parent.render_cell_title(session, record)
class TableHeader(TableChild):
def render_colspan(self, session):
Modified: trunk/wooly/python/wooly/table.strings
===================================================================
--- trunk/wooly/python/wooly/table.strings 2011-09-28 17:44:27 UTC (rev 5026)
+++ trunk/wooly/python/wooly/table.strings 2011-09-28 19:37:59 UTC (rev 5027)
@@ -59,7 +59,7 @@
<th class="{class}">{content}</th>
[TableColumnCell.html]
-<td class="{class}">{content}</td>
+<td class="{class}" title="{cell_title}">{content}</td>
[TableRow.html]
<tr>{cells}</tr>
Show replies by date