[rhmessaging-commits] rhmessaging commits: r2328 - in mgmt/trunk/cumin/python: wooly and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Wed Aug 20 17:00:54 EDT 2008


Author: eallen
Date: 2008-08-20 17:00:54 -0400 (Wed, 20 Aug 2008)
New Revision: 2328

Modified:
   mgmt/trunk/cumin/python/cumin/widgets.strings
   mgmt/trunk/cumin/python/wooly/widgets.py
Log:
Render CuminProperties as <div>s instead of <table> to work-around FF cascading font sizes into tables problem.

Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings	2008-08-20 18:00:21 UTC (rev 2327)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings	2008-08-20 21:00:54 UTC (rev 2328)
@@ -202,6 +202,7 @@
 }
 
 table.CuminDetails ul.ActionSet {
+  font-size: 0.9em;
   margin: 1em 0.5em;
 }
 
@@ -271,20 +272,35 @@
 </div>
 
 [SummaryProperties.css]
-table.SummaryProperties th {
+div.SummaryProperties div.titles {
   color: #444;
+  float:left;
   font-weight: normal;
   padding: 0 0.5em 0 0;
 }
+div.SummaryProperties div.values {
+  float:left;
+}
+div.SummaryProperties:after {
+    content: ".";
+    display: block;
+    height: 0;
+    clear: left;
+    visibility: hidden;
+}  
 
 [SummaryProperties.html]
-<table class="SummaryProperties">
-  <tbody>{items}</tbody>
-</table>
+<div class="SummaryProperties">
+  <div class="titles">{titles}</div>
+  <div class="values">{values}</div>
+</div>
 
-[SummaryProperties.property_html]
-<tr><th>{title}</th><td>{value}</td></tr>
+[SummaryProperties.title_html]
+	<div>{title}</div>
 
+[SummaryProperties.value_html]
+	<div>{value}</div>
+
 [StateSwitch.html]
 <ul class="radiotabs">
   {items}

Modified: mgmt/trunk/cumin/python/wooly/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/widgets.py	2008-08-20 18:00:21 UTC (rev 2327)
+++ mgmt/trunk/cumin/python/wooly/widgets.py	2008-08-20 21:00:54 UTC (rev 2328)
@@ -387,6 +387,27 @@
         if self.item_renderer is None:
             self.item_renderer = PropertyRenderer(self, "property_html")
 
+        # Added as an alternate way to render titles and values
+        # Instead of outputting the title and value in the same row,
+        # this is used to putput all the titles, then all the values.
+        self.title_renderer = PropertyRenderer(self, "title_html")
+        self.value_renderer = PropertyRenderer(self, "value_html")
+
+    def render_prop(self, session, renderer, *args):
+        items = self.get_items(session, *args)
+        writer = Writer()
+    
+        for item in items:
+            renderer.render(writer, session, item)
+    
+        return writer.to_string()
+    
+    def render_titles(self, session, *args):
+        return self.render_prop(session, self.title_renderer, *args)
+    
+    def render_values(self, session, *args):
+        return self.render_prop(session, self.value_renderer, *args)
+    
 class PropertyRenderer(TemplateRenderer):
     def render_title(self, session, prop):
         return prop[0]




More information about the rhmessaging-commits mailing list