[rhmessaging-commits] rhmessaging commits: r3379 - in mgmt/trunk/wooly: resources and 1 other directory.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Wed May 13 12:47:29 EDT 2009
Author: eallen
Date: 2009-05-13 12:47:28 -0400 (Wed, 13 May 2009)
New Revision: 3379
Modified:
mgmt/trunk/wooly/python/wooly/pages.strings
mgmt/trunk/wooly/resources/wooly.js
Log:
Double the update interval every hour
Modified: mgmt/trunk/wooly/python/wooly/pages.strings
===================================================================
--- mgmt/trunk/wooly/python/wooly/pages.strings 2009-05-13 16:46:29 UTC (rev 3378)
+++ mgmt/trunk/wooly/python/wooly/pages.strings 2009-05-13 16:47:28 UTC (rev 3379)
@@ -32,6 +32,14 @@
// ]]>
</script>
+[UpdateScript.html]
+<script type="text/javascript">
+ // <![CDATA[
+ wooly.setIntervalUpdate('{url}', wooly.updatePage, {interval});
+ setInterval(wooly.doubleIntervalUpdate, 1000 * 60 * 60);
+ // ]]>
+</script>
+
[UpdatePage.html]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE widgets [
Modified: mgmt/trunk/wooly/resources/wooly.js
===================================================================
--- mgmt/trunk/wooly/resources/wooly.js 2009-05-13 16:46:29 UTC (rev 3378)
+++ mgmt/trunk/wooly/resources/wooly.js 2009-05-13 16:47:28 UTC (rev 3379)
@@ -376,7 +376,8 @@
timerId: 0,
url: "",
callback: "",
- interval: 0
+ interval: 0,
+ passback: null
};
this.setIntervalUpdate = function(url, callback, interval, passback) {
@@ -403,6 +404,7 @@
this.intervalUpdateInfo.url = url;
this.intervalUpdateInfo.callback = callback;
this.intervalUpdateInfo.interval = interval;
+ this.intervalUpdateInfo.passback = passback;
}
function update() {
@@ -436,13 +438,24 @@
this.restartIntervalUpdate = function (url) {
this.cancelIntervalUpdate();
- this.setIntervalUpdate(url, this.intervalUpdateInfo.callback, this.intervalUpdateInfo.interval);
+ this.setIntervalUpdate(url, this.intervalUpdateInfo.callback,
+ this.intervalUpdateInfo.interval,
+ this.intervalUpdateInfo.passback);
}
this.branchIntervalUpdate = function () {
return this.session.branch(this.intervalUpdateInfo.url);
}
+ this.doubleIntervalUpdate = function () {
+ wooly.cancelIntervalUpdate();
+ wooly.intervalUpdateInfo.interval *= 2;
+ wooly.setIntervalUpdate(wooly.intervalUpdateInfo.url,
+ wooly.intervalUpdateInfo.callback,
+ wooly.intervalUpdateInfo.interval,
+ wooly.intervalUpdateInfo.passback);
+ }
+
this._doc = new WoolyDocument(document);
this.doc = function(doc) {
More information about the rhmessaging-commits
mailing list