[rhmessaging-commits] rhmessaging commits: r1725 - mgmt/cumin/resources.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Tue Feb 26 11:23:42 EST 2008
Author: justi9
Date: 2008-02-26 11:23:41 -0500 (Tue, 26 Feb 2008)
New Revision: 1725
Modified:
mgmt/cumin/resources/wooly.js
Log:
Add a function to disable interval updates for cases where we don't want any further http requests
Modified: mgmt/cumin/resources/wooly.js
===================================================================
--- mgmt/cumin/resources/wooly.js 2008-02-22 17:21:51 UTC (rev 1724)
+++ mgmt/cumin/resources/wooly.js 2008-02-26 16:23:41 UTC (rev 1725)
@@ -204,6 +204,7 @@
this.assert = assert;
this.log = log;
this.dir = dir;
+ this.updater_ids = [];
if (window.console) {
this.console = window.console;
@@ -219,6 +220,8 @@
}
var id = window.setInterval(fetch, interval);
+
+ this.updater_ids.push(id);
function update() {
try {
@@ -237,6 +240,12 @@
}
}
+ this.clearUpdates = function() {
+ for (var i = 0; i < this.updater_ids.length; i++) {
+ window.clearInterval(this.updater_ids[i])
+ }
+ }
+
this._doc = new WoolyDocument(document);
this.doc = function(doc) {
More information about the rhmessaging-commits
mailing list