Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgiehl <stefangiehl@gmail.com>2011-09-24 01:06:55 +0400
committersgiehl <stefangiehl@gmail.com>2011-09-24 01:06:55 +0400
commit2a99be396762267377bc8ee7ddade4fe58204e4f (patch)
treeeadc00e6a399d53ede9eacc247634b2f081420c6 /plugins/Live/templates
parent516e9853a88569ff49e8acb7ad2f8d5b99a0ba1b (diff)
prevent live widget to request for data even if dashboard isn't displayed anymore
git-svn-id: http://dev.piwik.org/svn/trunk@5213 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/Live/templates')
-rw-r--r--plugins/Live/templates/scripts/live.js2
-rw-r--r--plugins/Live/templates/scripts/spy.js3
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/Live/templates/scripts/live.js b/plugins/Live/templates/scripts/live.js
index 65579d314a..249bc3db11 100644
--- a/plugins/Live/templates/scripts/live.js
+++ b/plugins/Live/templates/scripts/live.js
@@ -29,7 +29,7 @@ function lastMaxTimestamp()
maxTimestamp = ts;
}
});
- if(!isNaN(maxTimestamp)
+ if($('#visitsLive .serverTimestamp').length && !isNaN(maxTimestamp)
&& parseInt(maxTimestamp)==maxTimestamp)
{
updateTotalVisits();
diff --git a/plugins/Live/templates/scripts/spy.js b/plugins/Live/templates/scripts/spy.js
index 0df9d7b7ae..b9f2716552 100644
--- a/plugins/Live/templates/scripts/spy.js
+++ b/plugins/Live/templates/scripts/spy.js
@@ -128,7 +128,8 @@ $.fn.spy = function(settings) {
var customParameterValue = o.customParameterValueCallback.call();
if(!customParameterValue)
{
- spyRunning = 0;
+ window.clearInterval(spy.ajaxTimer);
+ $('#_spyTmp').remove();
return;
}
parameters[o.customParameterName] = customParameterValue;