rhmessaging commits: r3445 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-06-11 09:10:56 -0400 (Thu, 11 Jun 2009)
New Revision: 3445
Modified:
mgmt/trunk/cumin/resources/app.js
Log:
Fix intermittent javascript error on mouseout of charts.
Modified: mgmt/trunk/cumin/resources/app.js
===================================================================
--- mgmt/trunk/cumin/resources/app.js 2009-06-11 11:41:54 UTC (rev 3444)
+++ mgmt/trunk/cumin/resources/app.js 2009-06-11 13:10:56 UTC (rev 3445)
@@ -111,10 +111,11 @@
event.stop();
});
mImg.addEvent('mouseout', function(event){
- if (event.relatedTarget.className.indexOf("img") == 0) {
- event.stop();
- return false;
- }
+ if (event.relatedTarget && event.relatedTarget.className)
+ if (event.relatedTarget.className.indexOf("img") == 0) {
+ event.stop();
+ return false;
+ }
var oHighlight = document.body.getElement(".imgHighlight_red");
if (oHighlight) oHighlight.style.display = "none";
oHighlight = document.body.getElement(".imgHighlight_green");
15 years, 6 months
rhmessaging commits: r3444 - store/trunk/cpp/tests/cluster.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-06-11 07:41:54 -0400 (Thu, 11 Jun 2009)
New Revision: 3444
Modified:
store/trunk/cpp/tests/cluster/run_cluster_tests
Log:
Fixed typo in run_cluster_tests
Modified: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2009-06-10 19:19:04 UTC (rev 3443)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2009-06-11 11:41:54 UTC (rev 3444)
@@ -85,7 +85,7 @@
RETCODE=$?
if test x${RETCODE} != x0; then
exit 1;
-#fi
+fi
# --- Check for Python, then run python cluster tests ---
15 years, 6 months
rhmessaging commits: r3443 - in store/trunk/cpp/tests: cluster and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-06-10 15:19:04 -0400 (Wed, 10 Jun 2009)
New Revision: 3443
Modified:
store/trunk/cpp/tests/cluster/run_cluster_tests
store/trunk/cpp/tests/run_python_tests
Log:
Connected the installed qpid cluster tests to the store
Modified: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2009-06-10 12:37:10 UTC (rev 3442)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2009-06-10 19:19:04 UTC (rev 3443)
@@ -32,7 +32,7 @@
if test -n "$NOGROUP" -o -n "$NOAISEXEC"; then
cat <<EOF
- =========== WARNING: NOT RUNNING AIS TESTS ==============
+ ========== WARNING: NOT RUNNING CLUSTER TESTS ============
Tests that depend on the openais library (used for clustering)
will not be run because:
@@ -46,31 +46,86 @@
exit 0; # A warning, not a failure.
fi
-# Execute command with the ais group set.
-with_ais_group() {
- id -nG | grep '\<ais\>' >/dev/null || { echo "You are not a member of the ais group."; exit 1; }
- echo $* | newgrp ais
-}
-
# QPID_DIR is defined for source tree builds because of the --with-qpid-checkout config parameter
-CLUSTER_EXEC=cluster_test
+CPP_CLUSTER_EXEC=cluster_test
+PYTHON_CLUSTER_EXEC=cluster.py
if test "${QPID_DIR}" -a -d ${QPID_DIR} ; then
# Source tree path
CLUSTER_DIR=${QPID_DIR}/cpp/src/tests
+ export PYTHONPATH=${QPID_DIR}/python:${abs_srcdir}
+ export QPIDD_EXEC=${QPID_DIR}/cpp/src/qpidd
+ export CLUSTER_LIB=${QPID_DIR}/cpp/src/.libs/cluster.so
+ export QPID_CONFIG_EXEC=${QPID_DIR}/python/commands/qpid-config
+ export QPID_ROUTE_EXEC=${QPID_DIR}/python/commands/qpid-route
+ export RECEIVER_EXEC=${QPID_DIR}/cpp/src/tests/receiver
+ export SENDER_EXEC=${QPID_DIR}/cpp/src/tests/sender
else
# Path from known installed locations
- CLUSTER_PATH=`which ${CLUSTER_EXEC}`
+ CLUSTER_PATH=/usr/libexec/qpid/tests/cluster_test
if test -z ${CLUSTER_PATH} ; then
- echo "No executable \"${CLUSTER_EXEC}\" found in path"
+ echo "No executable \"${CPP_CLUSTER_EXEC}\" found in path"
exit 1
else
CLUSTER_DIR=${CLUSTER_PATH%/*}
fi
+ export PYTHONPATH=${abs_srcdir}
+ export QPIDD_EXEC=/usr/sbin/qpidd
+ export CLUSTER_LIB=/usr/lib/qpid/daemon/cluster.so
+ export QPID_CONFIG_EXEC=/usr/bin/qpid-config
+ export QPID_ROUTE_EXEC=/usr/bin/qpid-route
+ export RECEIVER_EXEC=/usr/libexec/qpid/test/receiver
+ export SENDER_EXEC=/usr/libexec/qpid/test/sender
fi
+export STORE_LIB=${abs_srcdir}/../../lib/.libs/msgstore.so
-# Run the tests
-srcdir=`dirname $0`
+# Run the C++ cluster tests
+pwd=`pwd`
cd ${CLUSTER_DIR}
-pwd
-with_ais_group ./${CLUSTER_EXEC} || ERROR=1
-exit $ERROR
+sg ais -c "./${CPP_CLUSTER_EXEC}"
+RETCODE=$?
+if test x${RETCODE} != x0; then
+ exit 1;
+#fi
+
+# --- Check for Python, then run python cluster tests ---
+
+if python -c "import qpid" ; then
+ PYTHON_TESTS=python_tests
+ FAILING_PYTHON_TESTS=${abs_srcdir}/failing_python_tests.txt
+else
+ cat <<EOF
+
+ =========== WARNING: PYTHON TESTS DISABLED ==============
+
+ Unable to load python qpid module - skipping python tests.
+
+ PYTHONPATH=${PYTHONPATH}"
+
+ ===========================================================
+
+EOF
+ exit
+fi
+
+#Make sure temp dir exists if this is the first to use it
+TEST_DIR=${abs_srcdir}
+TMP_STORE_DIR=${TEST_DIR}/test_tmp
+if ! test -d ${TMP_STORE_DIR} ; then
+ mkdir -p ${TMP_STORE_DIR}/cluster
+else
+ # Delete old cluster test dirs
+ rm -rf "${TMP_STORE_DIR}/cluster"
+ mkdir -p "${TMP_STORE_DIR}/cluster"
+fi
+export TMP_STORE_DIR
+
+sg ais -c "./${PYTHON_CLUSTER_EXEC} -v"
+RETCODE=$?
+if test x${RETCODE} != x0; then
+ exit 1;
+fi
+
+# Delete cluster store dir if test was successful.
+rm -rf ${TMP_STORE_DIR}
+
+exit 0
Modified: store/trunk/cpp/tests/run_python_tests
===================================================================
--- store/trunk/cpp/tests/run_python_tests 2009-06-10 12:37:10 UTC (rev 3442)
+++ store/trunk/cpp/tests/run_python_tests 2009-06-10 19:19:04 UTC (rev 3443)
@@ -67,32 +67,6 @@
mkdir -p "${TMP_STORE_DIR}/cluster"
fi
-# Check AIS requirements
-id -nG | grep '\<ais\>' >/dev/null || NOGROUP="You are not a member of the ais group."
-ps -u root | grep 'aisexec\|corosync' >/dev/null || NOAISEXEC="The aisexec or corosync daemon is not running as root"
-
-if test -n "$NOGROUP" -o -n "$NOAISEXEC"; then
- cat <<EOF
-
- ========= WARNING: CLUSTERING TESTS DISABLED ==============
-
- Tests that depend on the openais library (used for clustering)
- will not be run because:
-
- $NOGROUP
- $NOAISEXEC
-
- ===========================================================
-
-EOF
- exit
-else
- export RUN_CLUSTER_TESTS=1
- if test -z ${LIBCLUSTER} ; then
- export LIBCLUSTER=${QPID_DIR}/cpp/src/.libs/cluster.so
- fi
-fi
-
if test -z ${QPIDD} ; then
export QPIDD=${QPID_DIR}/cpp/src/qpidd
fi
15 years, 6 months
rhmessaging commits: r3442 - mgmt/trunk/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-06-10 08:37:10 -0400 (Wed, 10 Jun 2009)
New Revision: 3442
Modified:
mgmt/trunk/mint/python/mint/model.py
Log:
Avoid a couple of python log errors.
Modified: mgmt/trunk/mint/python/mint/model.py
===================================================================
--- mgmt/trunk/mint/python/mint/model.py 2009-06-09 20:24:38 UTC (rev 3441)
+++ mgmt/trunk/mint/python/mint/model.py 2009-06-10 12:37:10 UTC (rev 3442)
@@ -321,11 +321,11 @@
def newAgent(self, agent):
""" Invoked when a QMF agent is discovered. """
- log.info("Agent connected: ", agent)
+ log.info("Agent connected: %s", agent)
def delAgent(self, agent):
""" Invoked when a QMF agent disconects. """
- log.info("Agent disconnected: ", agent)
+ log.info("Agent disconnected: %s", agent)
up = update.AgentDisconnectUpdate(self, self.getAgentDBId(agent, agent.getBroker().getBrokerId()))
self.app.updateThread.enqueue(up)
15 years, 6 months
rhmessaging commits: r3441 - mgmt/trunk/cumin/python/cumin/inventory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-06-09 16:24:38 -0400 (Tue, 09 Jun 2009)
New Revision: 3441
Modified:
mgmt/trunk/cumin/python/cumin/inventory/system.py
Log:
Truncate the Top System Name when needed in the browser.
Modified: mgmt/trunk/cumin/python/cumin/inventory/system.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/inventory/system.py 2009-06-09 20:24:07 UTC (rev 3440)
+++ mgmt/trunk/cumin/python/cumin/inventory/system.py 2009-06-09 20:24:38 UTC (rev 3441)
@@ -92,14 +92,14 @@
col.alignment = "right"
self.add_column(col)
- class NameColumn(TopTableColumn):
+ class NameColumn(TopClientTruncateColumn):
def render_title(self, session, data):
return "Name"
def render_content(self, session, data):
system = Identifiable(data["id"])
href = self.page.main.inventory.system.get_href(session, system)
- return fmt_link(href, fmt_shorten(data["name"]))
+ return fmt_link(href, data["name"], link_title=data["name"])
class LoadColumn(TopTableColumn):
def render_title(self, session, data):
15 years, 6 months
rhmessaging commits: r3440 - mgmt/trunk/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-06-09 16:24:07 -0400 (Tue, 09 Jun 2009)
New Revision: 3440
Modified:
mgmt/trunk/cumin/python/cumin/grid/job.py
Log:
Truncate the Top Job Name column when needed in the browser.
Modified: mgmt/trunk/cumin/python/cumin/grid/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/job.py 2009-06-09 20:23:15 UTC (rev 3439)
+++ mgmt/trunk/cumin/python/cumin/grid/job.py 2009-06-09 20:24:07 UTC (rev 3440)
@@ -217,7 +217,7 @@
col.alignment = "right"
self.add_column(col)
- class NameColumn(TopTableColumn):
+ class NameColumn(TopClientTruncateColumn):
def render_title(self, session, data):
return "Name"
@@ -229,7 +229,7 @@
self.page.main.grid.pool.object.set(session, pool)
self.page.main.grid.pool.job.object.set(session, job)
self.page.main.grid.pool.job.show(session)
- return fmt_link(branch.marshal(), fmt_shorten(data["name"]))
+ return fmt_link(branch.marshal(), data["name"], link_title=data["name"])
class DurationColumn(TopTableColumn):
def render_title(self, session, data):
15 years, 6 months
rhmessaging commits: r3439 - mgmt/trunk/cumin/python/cumin/messaging.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-06-09 16:23:15 -0400 (Tue, 09 Jun 2009)
New Revision: 3439
Modified:
mgmt/trunk/cumin/python/cumin/messaging/queue.py
mgmt/trunk/cumin/python/cumin/messaging/queue.strings
Log:
Truncate the Queue Name column at the browser instead of in code.
Modified: mgmt/trunk/cumin/python/cumin/messaging/queue.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/messaging/queue.py 2009-06-09 20:22:39 UTC (rev 3438)
+++ mgmt/trunk/cumin/python/cumin/messaging/queue.py 2009-06-09 20:23:15 UTC (rev 3439)
@@ -111,7 +111,7 @@
def render_content(self, session):
return "Remove"
- class NameColumn(SqlTableColumn):
+ class NameColumn(ClientTruncateColumn):
def render_title(self, session, data):
return "Name"
@@ -119,7 +119,7 @@
queue = Identifiable(data["id"])
href = self.page.main.messaging.broker.queue.get_href \
(session, queue)
- return fmt_link(href, fmt_shorten(data["name"]))
+ return fmt_link(href, data["name"], link_title=data["name"])
class ConsumersColumn(SqlTableColumn):
def render_title(self, session, data):
@@ -191,7 +191,7 @@
col.alignment = "right"
self.add_column(col)
- class NameColumn(TopTableColumn):
+ class NameColumn(TopClientTruncateColumn):
def render_title(self, session, data):
return "Name"
@@ -199,13 +199,11 @@
broker = Identifiable(data["broker_id"])
queue = Identifiable(data["id"])
- big = self.parent.get_fullpage(session)
branch = session.branch()
self.page.main.messaging.broker.object.set(branch, broker)
self.page.main.messaging.broker.queue.object.set(branch, queue)
self.page.main.messaging.broker.queue.show(branch)
- name = big and data["name"] or fmt_shorten(data["name"])
- return fmt_link(branch.marshal(), name)
+ return fmt_link(branch.marshal(), data["name"], link_title=data["name"])
class EnqueuesColumn(TopTableColumn):
def render_title(self, session, data):
Modified: mgmt/trunk/cumin/python/cumin/messaging/queue.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/messaging/queue.strings 2009-06-09 20:22:39 UTC (rev 3438)
+++ mgmt/trunk/cumin/python/cumin/messaging/queue.strings 2009-06-09 20:23:15 UTC (rev 3439)
@@ -35,29 +35,34 @@
{sql_where}
[QueueSet.html]
-<form id="{id}" method="post" action="?" update="{id}.table">
+<form id="{id}" method="post" action="?">
<ul class="actions">
<li><a class="nav" href="{add_queue_url}">Add New Queue</a></li>
</ul>
<div class="rfloat">{phase}</div>
{unit}
- <div class="sactions">
- <h2>Act on Selected Queues:</h2>
- {purge} {remove}
- </div>
- <table id="{id}.table" class="mobjects">
- <thead>
- <tr>
- <th class="setnav" colspan="{column_count}">
- <div class="rfloat">{page}</div>
- {count}
- </th>
- </tr>
- <tr>{headers}</tr>
- </thead>
- <tbody>{items}</tbody>
- </table>
+ <div class="sactions">
+ <h2>Act on Selected Queues:</h2>
+ {purge} {remove}
+ </div>
+ <table class="mobjects">
+ <thead>
+ <tr>
+ <th class="setnav">
+ <div class="rfloat">{page}</div>
+ {count}
+ </th>
+ </tr>
+ </thead>
+ </table>
+ <table class="mobjects{extra_class}">
+ <thead>
+ <tr>{headers}</tr>
+ </thead>
+ <tbody>{items}</tbody>
+ </table>
+
<div>{hidden_inputs}</div>
</form>
15 years, 6 months
rhmessaging commits: r3438 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-06-09 16:22:39 -0400 (Tue, 09 Jun 2009)
New Revision: 3438
Modified:
mgmt/trunk/cumin/python/cumin/widgets.py
mgmt/trunk/cumin/python/cumin/widgets.strings
Log:
Create a ClientTruncateColumn class and styles to automatically truncate long columns.
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2009-06-09 20:20:29 UTC (rev 3437)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2009-06-09 20:22:39 UTC (rev 3438)
@@ -707,17 +707,51 @@
return fmt_link("", title, class_, link_title=hover, bm=bm, click=click)
+class ClientTruncateColumn(SqlTableColumn):
+ def __init__(self, app, name):
+ super(ClientTruncateColumn, self).__init__(app, name)
+
+ self.col_percent = 33
+
+ def get_class_list(self, session):
+ cls = super(ClientTruncateColumn, self).get_class_list(session)
+ cls.append("truncate")
+ return cls
+
+ def get_class_attr(self, session):
+ cls = super(ClientTruncateColumn, self).get_class_attr(session)
+ return "width=\"%i%%\" %s" % (self.col_percent, cls)
+
class TopTableColumn(SqlTableColumn):
def __init__(self, app, name):
super(TopTableColumn, self).__init__(app, name)
self.header_class = TopTableColumnHeader
+class TopTableCountColumn(TopTableColumn):
+ def get_class_list(self, session):
+ cls = super(TopTableCountColumn, self).get_class_list(session)
+ cls.append("top_count")
+ return cls
+
class TopTableColumnHeader(ItemTableColumnHeader):
pass
-class TopTable(SqlTable, FullPageNotify):
+class TopClientTruncateColumn(ClientTruncateColumn):
def __init__(self, app, name):
+ super(TopClientTruncateColumn, self).__init__(app, name)
+
+ self.header_class = TopTableColumnHeader
+ self.col_percent = 60
+
+class TruncatableTable(SqlTable):
+ def render_extra_class(self, session, *args):
+ """ if any columns are truncate, table needs a fixed layout """
+ return True in [True for x in self.columns
+ if isinstance(x, ClientTruncateColumn)] and " truncate" or ""
+
+class TopTable(TruncatableTable):
+ def __init__(self, app, name):
super(TopTable, self).__init__(app, name)
col = self.CountColumn(app, "name")
@@ -733,13 +767,13 @@
def get_connection(self, session):
return sqlhub.getConnection().getConnection()
- class CountColumn(TopTableColumn):
+ class CountColumn(TopTableCountColumn):
def render_content(self, session, data):
count = self.parent.count.get(session)
self.parent.count.set(session, count + 1)
return count
-class CuminTable(SqlTable):
+class CuminTable(TruncatableTable):
def __init__(self, app, name):
super(CuminTable, self).__init__(app, name)
Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings 2009-06-09 20:20:29 UTC (rev 3437)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings 2009-06-09 20:22:39 UTC (rev 3438)
@@ -556,6 +556,7 @@
width: 100%;
border-collapse: collapse;
margin: 0;
+ min-width: 100% !important;
}
table.TopTable tr {
@@ -565,6 +566,7 @@
table.TopTable td {
padding: 0.35em 0.5em;
+ text-overflow:ellipsis;
}
table.TopTable th {
@@ -580,8 +582,12 @@
text-align: right;
}
+table.TopTable th.top_count {
+ width: 1em;
+}
+
[TopTable.html]
-<table id="{id}" class="TopTable fullpage_notify">
+<table id="{id}" class="TopTable {extra_class}">
<thead><tr>{headers}</tr></thead>
<tbody>{items}</tbody>
</table>
@@ -594,14 +600,28 @@
font-size: 0.9em;
}
+table.mobjects td {
+ text-overflow:ellipsis;
+}
+
+table.truncate {
+ table-layout: fixed;
+ min-width: 600px;
+}
+
+table.truncate td.truncate {
+ white-space: nowrap;
+ overflow: hidden;
+}
+
[CuminTable.javascript]
wooly.addPageUpdateListener( cumin.restoreTableCheckboxes );
[CuminTable.html]
-<table id="{id}" class="mobjects">
+<table id="{id}" class="mobjects{extra_class}">
<thead>
<tr>
- <th class="setnav" colspan="{column_count}">
+ <th class="setnav">
<div class="rfloat">{page}</div>
{count}
</th>
@@ -647,6 +667,11 @@
[TableHeader.item_html]
<th class="{item_class}"><a href="{item_href}">{item_content}</a></th>
+[CheckboxIdColumnHeader.css]
+th.chk_box {
+ width: 2em;
+}
+
[CheckboxIdColumnHeader.javascript]
function checkAll(control_id, form_id, elem_name) {
control = document.getElementById(control_id)
@@ -663,7 +688,7 @@
}
[CheckboxIdColumnHeader.html]
-<th><input id="{id}" type="checkbox" name="all"
+<th class="chk_box"><input id="{id}" type="checkbox" name="all"
onclick="cumin.clickTableCheckbox(this, 'all'); checkAll('{id}', '{form_id}', '{elem_name}')" value="all"/></th>
[TopN.html]
@@ -805,3 +830,4 @@
[Wait.html]
<div class="loading" style="visibility:visible;"><span>Loading...</span></div>
+
15 years, 6 months
rhmessaging commits: r3437 - mgmt/trunk/wooly/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-06-09 16:20:29 -0400 (Tue, 09 Jun 2009)
New Revision: 3437
Modified:
mgmt/trunk/wooly/python/wooly/tables.py
Log:
Allow classes derived from ItemTableColumn to add their own class names to the <td> tag.
Modified: mgmt/trunk/wooly/python/wooly/tables.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/tables.py 2009-06-08 18:55:08 UTC (rev 3436)
+++ mgmt/trunk/wooly/python/wooly/tables.py 2009-06-09 20:20:29 UTC (rev 3437)
@@ -114,8 +114,16 @@
def get_column_key(self, session):
return self.name
+ def get_class_list(self, session):
+ """ allow derived classes to add their own classes """
+ cls = list()
+ if self.alignment == "right":
+ cls.append("ralign");
+ return cls
+
def get_class_attr(self, session):
- return self.alignment == "right" and "class=\"ralign\"" or ""
+ cls = self.get_class_list(session)
+ return cls and "class=\"%s\"" % " ".join(cls) or ""
def do_render(self, session, data):
content = self.render_content(session, data)
15 years, 6 months
rhmessaging commits: r3436 - in mgmt/trunk/cumin: resources and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-06-08 14:55:08 -0400 (Mon, 08 Jun 2009)
New Revision: 3436
Modified:
mgmt/trunk/cumin/python/cumin/page.strings
mgmt/trunk/cumin/resources/app.css
mgmt/trunk/cumin/resources/app.js
Log:
Simplify widget zoom.
Move fullpage icon closer to actual right side of widget.
Modified: mgmt/trunk/cumin/python/cumin/page.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/page.strings 2009-06-08 18:24:33 UTC (rev 3435)
+++ mgmt/trunk/cumin/python/cumin/page.strings 2009-06-08 18:55:08 UTC (rev 3436)
@@ -16,8 +16,8 @@
vertical-align: top;
}
-table.OverviewTab h2 img {
- vertical-align: -15%;
+h2 img {
+ vertical-align: bottom;
margin: 0 0.2em 0 0;
}
Modified: mgmt/trunk/cumin/resources/app.css
===================================================================
--- mgmt/trunk/cumin/resources/app.css 2009-06-08 18:24:33 UTC (rev 3435)
+++ mgmt/trunk/cumin/resources/app.css 2009-06-08 18:55:08 UTC (rev 3436)
@@ -486,34 +486,13 @@
div.fullpaged {
background-color: white;
border: 10px solid white;
- width: 98%;
- position: absolute;
+ width: 98% !important;
+ position: absolute !important;
left: 0px;
top: 0px;
z-index: 201;
}
-div.fullpageTitle {
- height: 22px;
- width: 100%;
- position: absolute;
- padding-top: 2px;
- display: none;
- top: -2px;
- left: -4px;
- overflow: hidden;
- z-index: 0;
-}
-
-div.fullpageTitleBar {
- position: absolute;
- height: 22px;
- top: -2px;
- left: -4px;
- width: 100%;
- z-index: 3;
-}
-
p.fullpageIcon {
background-color: white;
border-top: 2px solid #685B8A;
@@ -529,7 +508,7 @@
z-index: 4;
position: absolute;
top: -2px;
- right: 14px;
+ right: 4px;
display: none;
}
div.fullpageable:hover div.fullpageTitle,
@@ -546,14 +525,11 @@
border-right: 1px solid #cbb4ff;
}
-div.fullpaged div.fullpageTitle {
+div.fullpaged h2 {
background-color: #E7E7F7;
+ padding: 0.25em;
}
-div.widgetContainer {
- position: relative;
- z-index: 1;
-}
div.fullpageBack {
background-color: white;
position: absolute;
Modified: mgmt/trunk/cumin/resources/app.js
===================================================================
--- mgmt/trunk/cumin/resources/app.js 2009-06-08 18:24:33 UTC (rev 3435)
+++ mgmt/trunk/cumin/resources/app.js 2009-06-08 18:55:08 UTC (rev 3436)
@@ -208,44 +208,27 @@
}
this.makeFullPageable = function (element) {
- if (element.getElement(".fullpageTitle"))
+ if (element.getParent().getElement(".fullpageIcon"))
return; // already fullpaged
- element.removeClass('fullpageable');
- var outer = new Element('div', {'class': 'fullpageable'});
- var titleBack = new Element('div', {'class': 'fullpageTitle'});
- var titleBar = new Element('div', {'class': 'fullpageTitleBar',
- 'events': {'dblclick': function () {fullpage(this);}}});
var icon = new Element('p', {'class': 'fullpageIcon',
'title': 'Full Page',
- 'events': {'click': function () {fullpage(this);}}});
- var container = new Element('div', {'class': 'widgetContainer'});
+ 'events': {'click': function () {fullpage(this)}}});
- outer.appendChild(titleBack);
- outer.appendChild(titleBar);
- outer.appendChild(icon);
- outer.appendChild(container);
+ var title = element.getElement("h2");
+ if (title) {
+ icon.inject(title, 'before');
+ title.addEvent('dblclick', function () {fullpage(icon)});
+ }
+ element.originalParent = element.getParent();
- var parent = element.parentNode;
- outer.originalParent = parent;
- container.appendChild(element);
-
- parent.appendChild(outer);
-
var widgets = element.getElements('.fullpage_notify');
- outer.widgetPaths = [];
+ element.widgetPaths = [];
widgets.each(function (widget) {
if (widget.get("id")) {
- outer.widgetPaths.push(widget.get("id"));
+ element.widgetPaths.push(widget.get("id"));
}
});
-
- if (element.onfullpage) {
- outer.onfullpage = element.onfullpage;
- }
- if (element.onrestore) {
- outer.onrestore = element.onrestore;
- }
}
}
}())
@@ -265,55 +248,44 @@
/* called when the full page icon is clicked */
function fullpage(oIcon) {
- var oFullPage = oIcon;
- if (!oFullPage.hasClass("fullpageable")) {
- try {
- oFullPage = oIcon.parentNode;
- } catch (e) {}
- }
+ var oFullPage = oIcon.getParent();
- if (!oFullPage || !oFullPage.hasClass("fullpageable")) {
- oFullPage = $("fullpage");
+ var oBack = $("fullpageBack");
+ if (!oBack) {
+ oBack = new Element('div', {'class': 'fullpageBack', 'id': 'fullpageBack', 'events': {'click': fullpage}});
+ document.body.appendChild(oBack);
}
+ if (oFullPage.parentNode == document.body) {
+ // undo full page
+ oBack.style.display = "none";
+ oFullPage.removeClass('fullpaged');
+ oFullPage.addClass('fullpageable');
- if (oFullPage) {
- var oBack = $("fullpageBack");
- if (!oBack) {
- oBack = new Element('div', {'class': 'fullpageBack', 'id': 'fullpageBack', 'events': {'click': fullpage}});
- document.body.appendChild(oBack);
- }
- if (oFullPage.parentNode == document.body) {
- // undo full page
- oBack.style.display = "none";
- oFullPage.id = "";
- oFullPage.className = "fullpageable";
+ document.body.style.height = "auto";
+ oFullPage.originalParent.appendChild(oFullPage);
+ oIcon.setProperty("title", "Full Page");
+ setFullpageParam(false, oFullPage);
+ var onrestore = oFullPage.onrestore;
+ if (onrestore) onrestore();
+ window.scrollTo(oFullPage.origScroll.x, oFullPage.origScroll.y);
+ } else {
+ // make it full page
+ oBack.style.display = "block";
+ oBack.style.height = Math.max($(document.body).getCoordinates().height, window.getScrollSize().y) + "px";
- document.body.style.height = "auto";
- oFullPage.originalParent.appendChild(oFullPage);
- oFullPage.getElement("p.fullpageIcon").setProperty("title", "Full Page");
- setFullpageParam(false, oFullPage);
- var onrestore = oFullPage.onrestore;
- if (onrestore) onrestore();
- window.scrollTo(oFullPage.origScroll.x, oFullPage.origScroll.y);
- } else {
- // make it full page
- oBack.style.display = "block";
- oBack.style.height = Math.max($(document.body).getCoordinates().height, window.getScrollSize().y) + "px";
- oFullPage.id = "fullpage";
- oFullPage.className = "fullpaged";
-
- document.body.style.height = "100%";
- document.body.appendChild(oFullPage);
- oFullPage.getElement("p.fullpageIcon").setProperty("title", "Restore");
- setFullpageParam(true, oFullPage);
- var onfullpage = oFullPage.onfullpage;
- var coords = $(oFullPage).getCoordinates();
- var height = Math.min(Math.max(window.getSize().y - 100, 200), 600);
- if (onfullpage) onfullpage(coords.width, height);
- var curScroll = window.getScroll();
- oFullPage.origScroll = curScroll;
- window.scrollTo(0,0);
- }
+ document.body.style.height = "100%";
+ document.body.appendChild(oFullPage);
+ oFullPage.removeClass('fullpageable');
+ oFullPage.addClass('fullpaged');
+ oIcon.setProperty("title", "Restore");
+ setFullpageParam(true, oFullPage);
+ var onfullpage = oFullPage.onfullpage;
+ var coords = $(oFullPage).getCoordinates();
+ var height = Math.min(Math.max(window.getSize().y - 100, 200), 600);
+ if (onfullpage) onfullpage(coords.width, height);
+ var curScroll = window.getScroll();
+ oFullPage.origScroll = curScroll;
+ window.scrollTo(0,0);
}
// sets/clears the fullpage parameter in the wooly background update url
15 years, 6 months