From: Scott Baker Date: Tue, 28 Oct 2014 21:59:00 +0000 (-0700) Subject: fix bug where startPolling would only poll the last collection to have called startPo... X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=51239d09dea4959af2a1cb20b9fa4e87b56eca1f;p=plstackapi.git fix bug where startPolling would only poll the last collection to have called startPolling --- diff --git a/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js b/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js index 4451328..d2d8f17 100644 --- a/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js +++ b/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js @@ -87,8 +87,8 @@ if (! window.XOSLIB_LOADED ) { }, startPolling: function() { - if (!this._polling) { - collection=this; + if (!this._polling) { + var collection=this; setInterval(function() { collection.fetch(); }, 10000); this._polling=true; this.fetch();