rhmessaging commits: r2337 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-21 13:13:38 -0400 (Thu, 21 Aug 2008)
New Revision: 2337
Modified:
mgmt/trunk/cumin/python/cumin/broker.strings
mgmt/trunk/cumin/python/cumin/brokercluster.strings
mgmt/trunk/cumin/python/cumin/brokerlink.strings
mgmt/trunk/cumin/python/cumin/brokerprofile.strings
mgmt/trunk/cumin/python/cumin/client.strings
mgmt/trunk/cumin/python/cumin/exchange.strings
mgmt/trunk/cumin/python/cumin/page.strings
mgmt/trunk/cumin/python/cumin/queue.strings
mgmt/trunk/cumin/python/cumin/stat.strings
mgmt/trunk/cumin/python/cumin/widgets.strings
Log:
Added <![CDATA[ and ]]> tags to inline javascript
Modified: mgmt/trunk/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/broker.strings 2008-08-21 16:36:37 UTC (rev 2336)
+++ mgmt/trunk/cumin/python/cumin/broker.strings 2008-08-21 17:13:38 UTC (rev 2337)
@@ -48,7 +48,9 @@
[BrokerView.html]
<script type="text/javascript">
+<![CDATA[
{script}
+]]>
</script>
{status}
@@ -63,6 +65,7 @@
reload in <span id="timer_count">10</span> <span id="timer_word">seconds</span>.
</div>
<script type="text/javascript">
+<![CDATA[
var secs = 10
function updateTimer() {
@@ -77,6 +80,7 @@
}
window.setInterval(updateTimer, 1000);
+]]>
</script>
[BrokerQueueTab.html]
@@ -199,11 +203,13 @@
</div>
</form>
<script type="text/javascript" defer="defer">
+<![CDATA[
(function() {
var elem = wooly.doc().elembyid("{id}").node.elements[1];
elem.focus();
elem.select();
}())
+]]>
</script>
[BrokerSetForm.field_html]
Modified: mgmt/trunk/cumin/python/cumin/brokercluster.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokercluster.strings 2008-08-21 16:36:37 UTC (rev 2336)
+++ mgmt/trunk/cumin/python/cumin/brokercluster.strings 2008-08-21 17:13:38 UTC (rev 2337)
@@ -97,9 +97,11 @@
</div>
</form>
<script type="text/javascript" defer="defer">
+<![CDATA[
(function() {
var elem = wooly.doc().elembyid("{id}").node.elements[1];
elem.focus();
elem.select();
}())
+]]>
</script>
Modified: mgmt/trunk/cumin/python/cumin/brokerlink.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerlink.strings 2008-08-21 16:36:37 UTC (rev 2336)
+++ mgmt/trunk/cumin/python/cumin/brokerlink.strings 2008-08-21 17:13:38 UTC (rev 2337)
@@ -177,7 +177,9 @@
<div>{hidden_inputs}</div>
</form>
<script type="text/javascript">
+<![CDATA[
wooly.doc().elembyid("{id}").node.elements[0].focus();
+]]>
</script>
[ExchangeRadioField.exchange_html]
@@ -218,7 +220,9 @@
</div>
</form>
<script type="text/javascript">
+<![CDATA[
wooly.doc().elembyid("{id}").node.elements[0].focus();
+]]>
</script>
[PeerRouteSetClose.item_html]
Modified: mgmt/trunk/cumin/python/cumin/brokerprofile.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerprofile.strings 2008-08-21 16:36:37 UTC (rev 2336)
+++ mgmt/trunk/cumin/python/cumin/brokerprofile.strings 2008-08-21 17:13:38 UTC (rev 2337)
@@ -93,9 +93,11 @@
</div>
</form>
<script type="text/javascript" defer="defer">
+<![CDATA[
(function() {
var elem = wooly.doc().elembyid("{id}").node.elements[1];
elem.focus();
elem.select();
}())
+]]>
</script>
Modified: mgmt/trunk/cumin/python/cumin/client.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/client.strings 2008-08-21 16:36:37 UTC (rev 2336)
+++ mgmt/trunk/cumin/python/cumin/client.strings 2008-08-21 17:13:38 UTC (rev 2337)
@@ -91,7 +91,9 @@
</table>
</div>
<script type="text/javascript">
+<![CDATA[
cumin.objectListeners["{id}"] = updateConnectionStatus, 3000;
+]]>
</script>
[ConnectionView.javascript]
Modified: mgmt/trunk/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/exchange.strings 2008-08-21 16:36:37 UTC (rev 2336)
+++ mgmt/trunk/cumin/python/cumin/exchange.strings 2008-08-21 17:13:38 UTC (rev 2337)
@@ -122,12 +122,14 @@
</div>
</form>
<script type="text/javascript" defer="defer">
+<![CDATA[
(function() {
// elements[0] is a fieldset, at least in firefox
var elem = wooly.doc().elembyid("{id}").node.elements[0];
elem.focus();
elem.select();
}())
+]]>
</script>
[ExchangeStatus.javascript]
@@ -173,7 +175,9 @@
</table>
</div>
<script type="text/javascript">
+<![CDATA[
cumin.objectListeners["{id}"] = updateExchangeStatus
+]]>
</script>
[ExchangeView.javascript]
Modified: mgmt/trunk/cumin/python/cumin/page.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/page.strings 2008-08-21 16:36:37 UTC (rev 2336)
+++ mgmt/trunk/cumin/python/cumin/page.strings 2008-08-21 17:13:38 UTC (rev 2337)
@@ -603,9 +603,11 @@
<span>{failed_count}</span> failed
</a>
</div>
- <script type="text/javascript">
+<script type="text/javascript">
+<![CDATA[
cumin.modelListeners["actions"] = updateActions
- </script>
+]]>
+</script>
<ul id="context">{frames}</ul>
</div>
@@ -624,7 +626,9 @@
[MessagingView.html]
<script type="text/javascript">
+<![CDATA[
wooly.setIntervalUpdate("{data_url}", updateMain, 3000);
+]]>
</script>
<div class="oblock">
<img id="msg_logo" src="resource?name=rh_messaging_logo.png" alt="messaging logo"/>
@@ -635,7 +639,9 @@
[GridView.html]
<script type="text/javascript">
+<![CDATA[
wooly.setIntervalUpdate("{data_url}", updateMain, 3000);
+]]>
</script>
<div class="oblock">
<ul class="TabbedModeSet tabs">{tabs}</ul>
@@ -644,7 +650,9 @@
[SystemsView.html]
<script type="text/javascript">
+<![CDATA[
wooly.setIntervalUpdate("{data_url}", updateMain, 3000);
+]]>
</script>
<div class="oblock">
<ul class="TabbedModeSet tabs">{tabs}</ul>
Modified: mgmt/trunk/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/queue.strings 2008-08-21 16:36:37 UTC (rev 2336)
+++ mgmt/trunk/cumin/python/cumin/queue.strings 2008-08-21 17:13:38 UTC (rev 2337)
@@ -106,7 +106,9 @@
</table>
</div>
<script type="text/javascript">
+<![CDATA[
cumin.objectListeners["{id}"] = updateQueueStatus
+]]>
</script>
[QueueView.javascript]
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2008-08-21 16:36:37 UTC (rev 2336)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2008-08-21 17:13:38 UTC (rev 2337)
@@ -89,7 +89,9 @@
</tbody>
</table>
<script type="text/javascript">
+<![CDATA[
cumin.objectListeners["{id}"] = updateStats;
+]]>
</script>
[StatSet.item_html]
@@ -156,7 +158,9 @@
<img id="{id}" src="{href}" height="100" width="360" alt="stats" />
</div>
<script type="text/javascript">
+<![CDATA[
cumin.objectListeners["{id}"] = updateChart
+]]>
</script>
[StatValueChart.stat_html]
Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings 2008-08-21 16:36:37 UTC (rev 2336)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings 2008-08-21 17:13:38 UTC (rev 2337)
@@ -19,7 +19,9 @@
[CuminView.html]
<script type="text/javascript">
+<![CDATA[
{script}
+]]>
</script>
{status}
@@ -41,7 +43,9 @@
<div>{hidden_inputs}</div>
</form>
<script type="text/javascript">
+<![CDATA[
wooly.doc().elembyid("{id}").node.elements[0].focus();
+]]>
</script>
[CuminConfirmForm.html]
@@ -56,7 +60,9 @@
</div>
</form>
<script type="text/javascript">
+<![CDATA[
wooly.doc().elembyid("{id}").node.elements[1].focus();
+]]>
</script>
[CuminActionSetForm.html]
@@ -79,7 +85,9 @@
</div>
</form>
<script type="text/javascript">
+<![CDATA[
wooly.doc().elembyid("{id}").node.elements[0].focus();
+]]>
</script>
[CuminActionSetForm.item_html]
@@ -105,7 +113,9 @@
</div>
</form>
<script type="text/javascript">
+<![CDATA[
wooly.doc().elembyid("{id}").node.elements[0].focus();
+]]>
</script>
[CuminBulkActionForm.item_html]
16 years, 4 months
rhmessaging commits: r2336 - mgmt/trunk/cumin/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-21 12:36:37 -0400 (Thu, 21 Aug 2008)
New Revision: 2336
Modified:
mgmt/trunk/cumin/python/wooly/__init__.py
Log:
Use application/xhtml+xml as content type to fix font size problem
Modified: mgmt/trunk/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/__init__.py 2008-08-21 16:35:32 UTC (rev 2335)
+++ mgmt/trunk/cumin/python/wooly/__init__.py 2008-08-21 16:36:37 UTC (rev 2336)
@@ -302,7 +302,10 @@
return datetime.utcnow()
def get_content_type(self, session):
- return "text/html"
+ if self.name.endswith(".html"):
+ return "application/xhtml+xml"
+ else:
+ return "text/html"
def get_cache_control(self, session):
return None
16 years, 4 months
rhmessaging commits: r2335 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-21 12:35:32 -0400 (Thu, 21 Aug 2008)
New Revision: 2335
Modified:
mgmt/trunk/cumin/python/cumin/page.strings
Log:
Restored global font size on body tag
Modified: mgmt/trunk/cumin/python/cumin/page.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/page.strings 2008-08-21 16:34:50 UTC (rev 2334)
+++ mgmt/trunk/cumin/python/cumin/page.strings 2008-08-21 16:35:32 UTC (rev 2335)
@@ -5,7 +5,7 @@
background-color: #fff;
font-family: "DejaVu LGC Sans", "Bitstream Vera Sans", "Lucida Grande",
"Trebuchet MS", verdana, helvetica, arial, sans-serif;
- /* font-size: 0.9em; */
+ font-size: 0.9em;
}
body.modal {
@@ -609,7 +609,6 @@
<ul id="context">{frames}</ul>
</div>
- <!-- <a id="logo" href="{href}"><img src="resource?name=rhm-32x14.png" alt="Red Hat Messaging" /></a> -->
</div>
<div id="trans"></div>
<div id="body">{mode}</div>
16 years, 4 months
rhmessaging commits: r2334 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-21 12:34:50 -0400 (Thu, 21 Aug 2008)
New Revision: 2334
Modified:
mgmt/trunk/cumin/python/cumin/broker.strings
mgmt/trunk/cumin/python/cumin/client.strings
mgmt/trunk/cumin/python/cumin/exchange.strings
mgmt/trunk/cumin/python/cumin/queue.strings
mgmt/trunk/cumin/python/cumin/widgets.strings
Log:
Added <tbody></tbody> tags to match css rule
Modified: mgmt/trunk/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/broker.strings 2008-08-21 16:10:57 UTC (rev 2333)
+++ mgmt/trunk/cumin/python/cumin/broker.strings 2008-08-21 16:34:50 UTC (rev 2334)
@@ -84,6 +84,7 @@
[BrokerDetailsTab.html]
<table class="CuminDetails">
+ <tbody>
<tr>
<td>
<h2>Properties</h2>
@@ -94,6 +95,7 @@
{actions}
</td>
</tr>
+ </tbody>
</table>
[BrokerBrowser.css]
Modified: mgmt/trunk/cumin/python/cumin/client.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/client.strings 2008-08-21 16:10:57 UTC (rev 2333)
+++ mgmt/trunk/cumin/python/cumin/client.strings 2008-08-21 16:34:50 UTC (rev 2334)
@@ -111,6 +111,7 @@
[ConnectionStats.html]
<table class="twocol">
+ <tbody>
<tr>
<td>
<h2>Input/Output</h2>
@@ -123,6 +124,7 @@
{sendrecv}
</td>
</tr>
+ </tbody>
</table>
[SessionSet.sql]
Modified: mgmt/trunk/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/exchange.strings 2008-08-21 16:10:57 UTC (rev 2333)
+++ mgmt/trunk/cumin/python/cumin/exchange.strings 2008-08-21 16:34:50 UTC (rev 2334)
@@ -222,6 +222,7 @@
[ExchangeStats.html]
<table class="twocol">
+ <tbody>
<tr>
<td>
<h2>Input/Output</h2>
@@ -235,6 +236,7 @@
{producers}
</td>
</tr>
+ </tbody>
</table>
[ExchangeProducerSet.html]
Modified: mgmt/trunk/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/queue.strings 2008-08-21 16:10:57 UTC (rev 2333)
+++ mgmt/trunk/cumin/python/cumin/queue.strings 2008-08-21 16:34:50 UTC (rev 2334)
@@ -163,6 +163,7 @@
[QueueStatsGeneral.html]
<table class="twocol">
+ <tbody>
<tr>
<td>
<h2>Input/Output</h2>
@@ -177,10 +178,12 @@
{consumers}
</td>
</tr>
+ </tbody>
</table>
[QueueStatsDurability.html]
<table class="twocol">
+ <tbody>
<tr>
<td>
<h2>Durable Input/Output</h2>
@@ -193,6 +196,7 @@
{enqdeq}
</td>
</tr>
+ </tbody>
</table>
[JournalStats.html]
@@ -211,6 +215,7 @@
[QueueStatsTransactions.html]
<table class="twocol">
+ <tbody>
<tr>
<td>
<h2>Transactions</h2>
@@ -225,6 +230,7 @@
{enqdeq}
</td>
</tr>
+ </tbody>
</table>
[QueueConsumerSet.html]
Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings 2008-08-21 16:10:57 UTC (rev 2333)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings 2008-08-21 16:34:50 UTC (rev 2334)
@@ -208,6 +208,7 @@
[CuminDetails.html]
<table class="CuminDetails">
+ <tbody>
<tr>
<td>
<h2>Properties</h2>
@@ -218,6 +219,7 @@
{actions}
</td>
</tr>
+ </tbody>
</table>
[CuminSummary.css]
16 years, 4 months
rhmessaging commits: r2333 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-21 12:10:57 -0400 (Thu, 21 Aug 2008)
New Revision: 2333
Modified:
mgmt/trunk/cumin/python/cumin/widgets.py
Log:
Fix badly defaulted id argument
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2008-08-21 15:05:39 UTC (rev 2332)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2008-08-21 16:10:57 UTC (rev 2333)
@@ -357,7 +357,7 @@
def get_items(self, session):
return self.__states
- def render_item_link(self, session, state, id=id):
+ def render_item_link(self, session, state, id=""):
branch = session.branch()
self.set(branch, state)
16 years, 4 months
rhmessaging commits: r2332 - mgmt/trunk/cumin/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-21 11:05:39 -0400 (Thu, 21 Aug 2008)
New Revision: 2332
Modified:
mgmt/trunk/cumin/python/wooly/tables.py
Log:
Added closing / for <img> tags
Modified: mgmt/trunk/cumin/python/wooly/tables.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/tables.py 2008-08-21 15:04:40 UTC (rev 2331)
+++ mgmt/trunk/cumin/python/wooly/tables.py 2008-08-21 15:05:39 UTC (rev 2332)
@@ -159,9 +159,9 @@
if sel is self.column:
if self.parent.reversed.get(session):
- return "<img src=\"resource?name=sort-arrow-up.png\">"
+ return "<img src=\"resource?name=sort-arrow-up.png\" />"
else:
- return "<img src=\"resource?name=sort-arrow-down.png\">"
+ return "<img src=\"resource?name=sort-arrow-down.png\" />"
class SqlTable(ItemTable):
def __init__(self, app, name):
16 years, 4 months
rhmessaging commits: r2331 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-21 11:04:40 -0400 (Thu, 21 Aug 2008)
New Revision: 2331
Modified:
mgmt/trunk/cumin/python/cumin/broker.strings
Log:
Fixed mis-matched table closing tag
Modified: mgmt/trunk/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/broker.strings 2008-08-21 14:11:03 UTC (rev 2330)
+++ mgmt/trunk/cumin/python/cumin/broker.strings 2008-08-21 15:04:40 UTC (rev 2331)
@@ -142,7 +142,7 @@
{brokers}
</td>
</tr>
-</div>
+</table>
[BrokerBrowser.group_html]
<li>{group_link}</li>
16 years, 4 months
rhmessaging commits: r2330 - in mgmt/trunk: cumin/bin and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-08-21 10:11:03 -0400 (Thu, 21 Aug 2008)
New Revision: 2330
Added:
mgmt/trunk/cumin/bin/cumin-load-demo-data
Modified:
mgmt/trunk/bin/reschema
mgmt/trunk/cumin/python/cumin/demo.py
Log:
Add a demo data loading script, and make it by default a part of reschema
Modified: mgmt/trunk/bin/reschema
===================================================================
--- mgmt/trunk/bin/reschema 2008-08-20 21:03:53 UTC (rev 2329)
+++ mgmt/trunk/bin/reschema 2008-08-21 14:11:03 UTC (rev 2330)
@@ -3,3 +3,4 @@
cumin-admin drop-schema --force
cumin-admin create-schema --force
cumin-admin add-user guest
+cumin-load-demo-data
Added: mgmt/trunk/cumin/bin/cumin-load-demo-data
===================================================================
--- mgmt/trunk/cumin/bin/cumin-load-demo-data (rev 0)
+++ mgmt/trunk/cumin/bin/cumin-load-demo-data 2008-08-21 14:11:03 UTC (rev 2330)
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+
+import sys, os
+from sqlobject import connectionForURI
+from traceback import print_exc
+from getpass import getpass
+from random import sample
+from crypt import crypt
+from mint import MintDatabase, ConsoleUser
+from psycopg2 import IntegrityError
+
+from cumin import *
+from cumin.util import *
+from cumin.demo import *
+
+def main():
+ config = CuminConfig()
+
+ if "-h" in sys.argv or "--help" in sys.argv:
+ config.print_usage("cumin-load-demo-data")
+ sys.exit(0)
+
+ config.init()
+
+ if config.debug:
+ config.prt()
+
+ cumin = Cumin(config.home, config.data, config.spec)
+ cumin.check()
+ cumin.init()
+
+ data = DemoData()
+ data.load()
+
+if __name__ == "__main__":
+ try:
+ main()
+ except SystemExit, e:
+ raise e
+ except:
+ print_exc()
+ sys.exit(1)
Property changes on: mgmt/trunk/cumin/bin/cumin-load-demo-data
___________________________________________________________________
Name: svn:executable
+ *
Modified: mgmt/trunk/cumin/python/cumin/demo.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/demo.py 2008-08-20 21:03:53 UTC (rev 2329)
+++ mgmt/trunk/cumin/python/cumin/demo.py 2008-08-21 14:11:03 UTC (rev 2330)
@@ -19,20 +19,22 @@
group = BrokerGroup(name=name)
groups[name] = group
- profiles = list()
+ Pool(name="main")
- for name in ("4S Xserve", "2S ProLiant"):
- profile = BrokerProfile(name=name)
- profiles.append(profile)
+ #profiles = list()
- #self.load_props(profile)
+ #for name in ("4S Xserve", "2S ProLiant"):
+ # profile = BrokerProfile(name=name)
+ # profiles.append(profile)
- clusters = list()
+ # self.load_props(profile)
- for cluster_count in range(3):
- cluster = BrokerCluster(name=fmt("cluster", cluster_count))
- clusters.append(cluster)
+ #clusters = list()
+ #for cluster_count in range(3):
+ # cluster = BrokerCluster(name=fmt("cluster", cluster_count))
+ # clusters.append(cluster)
+
def load_props(self, obj):
prop = ConfigProperty()
prop.name = "max_threads"
16 years, 4 months
rhmessaging commits: r2329 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-20 17:03:53 -0400 (Wed, 20 Aug 2008)
New Revision: 2329
Modified:
mgmt/trunk/cumin/python/cumin/page.strings
Log:
Removed font-size from body to avoid intermittent font sizing problem
Modified: mgmt/trunk/cumin/python/cumin/page.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/page.strings 2008-08-20 21:00:54 UTC (rev 2328)
+++ mgmt/trunk/cumin/python/cumin/page.strings 2008-08-20 21:03:53 UTC (rev 2329)
@@ -3,9 +3,9 @@
margin: 0;
padding: 0;
background-color: #fff;
- font-size: 0.9em;
font-family: "DejaVu LGC Sans", "Bitstream Vera Sans", "Lucida Grande",
"Trebuchet MS", verdana, helvetica, arial, sans-serif;
+ /* font-size: 0.9em; */
}
body.modal {
16 years, 4 months
rhmessaging commits: r2328 - in mgmt/trunk/cumin/python: wooly and 1 other directory.
by rhmessaging-commits@lists.jboss.org
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]
16 years, 4 months