[rhmessaging-commits] rhmessaging commits: r4112 - in mgmt/newdata: cumin/resources and 1 other directories.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue Jul 13 15:39:46 EDT 2010


Author: justi9
Date: 2010-07-13 15:39:46 -0400 (Tue, 13 Jul 2010)
New Revision: 4112

Modified:
   mgmt/newdata/cumin/python/cumin/objectselector.py
   mgmt/newdata/cumin/resources/app.css
   mgmt/newdata/wooly/python/wooly/table.py
   mgmt/newdata/wooly/python/wooly/table.strings
Log:
By default sort the first 'sortable' column; move some misplaced style rules

Modified: mgmt/newdata/cumin/python/cumin/objectselector.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/objectselector.py	2010-07-13 18:36:01 UTC (rev 4111)
+++ mgmt/newdata/cumin/python/cumin/objectselector.py	2010-07-13 19:39:46 UTC (rev 4112)
@@ -26,6 +26,8 @@
 
         self.update_enabled = True
 
+        self.ascending.default = True
+
         # (RosemaryAttribute this, RosemaryAttribute that, Attribute object)
         self.filter_specs = list()
 
@@ -36,6 +38,12 @@
         assert self.adapter, self
         #assert self.adapter.id_field, self
 
+        for col in self.columns:
+            if col.sortable:
+                self.sort.default = col.name
+
+                break
+
     def add_attribute_column(self, attr):
         assert isinstance(attr, RosemaryAttribute), attr
 
@@ -146,6 +154,7 @@
         self.cell.input = ObjectCheckboxColumnInput(app, "input", selection)
         self.cell.replace_child(self.cell.input)
 
+        self.sortable = False
         self.width = "1%"
 
     def render_cell_value(self, session, record):

Modified: mgmt/newdata/cumin/resources/app.css
===================================================================
--- mgmt/newdata/cumin/resources/app.css	2010-07-13 18:36:01 UTC (rev 4111)
+++ mgmt/newdata/cumin/resources/app.css	2010-07-13 19:39:46 UTC (rev 4112)
@@ -599,6 +599,9 @@
     font-weight: normal;
 }
 
+table.DataTable.Cumin td.selected, table.DataTable.Cumin th.selected {
+}
+
 table.DataTable.Cumin thead, table.DataTable.Cumin tfoot {
     background-color: #f7f7f7;
 }

Modified: mgmt/newdata/wooly/python/wooly/table.py
===================================================================
--- mgmt/newdata/wooly/python/wooly/table.py	2010-07-13 18:36:01 UTC (rev 4111)
+++ mgmt/newdata/wooly/python/wooly/table.py	2010-07-13 19:39:46 UTC (rev 4112)
@@ -94,6 +94,7 @@
         self.cell = TableColumnCell(app, "cell")
         self.add_child(self.cell)
 
+        self.sortable = True
         self.visible = True
         self.width = None
 
@@ -214,6 +215,7 @@
         self.cell = CheckboxColumnCell(app, "cell", selection)
         self.replace_child(self.cell)
 
+        self.sortable = False
         self.width = "1%"
 
     def init(self):

Modified: mgmt/newdata/wooly/python/wooly/table.strings
===================================================================
--- mgmt/newdata/wooly/python/wooly/table.strings	2010-07-13 18:36:01 UTC (rev 4111)
+++ mgmt/newdata/wooly/python/wooly/table.strings	2010-07-13 19:39:46 UTC (rev 4112)
@@ -52,14 +52,6 @@
     width: {width};
 }
 
-table.Table th.{class}.selected {
-    background-color: #f0f0f0;
-}
-
-table.Table td.{class}.selected {
-    background-color: #f7f7f7;
-}
-
 [TableColumnHeader.html]
 <th class="{class}"><a href="{href}">{content}</a></th>
 



More information about the rhmessaging-commits mailing list