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>2013-01-05 03:26:50 +0400
committersgiehl <stefangiehl@gmail.com>2013-01-05 03:26:50 +0400
commitdc0b2af59dc76cab9b2382476cf902b6ecfd50d9 (patch)
treeb856c0e5f36f9b56b5481daa8fa5a33d0a3ba7f9 /plugins/Annotations/templates
parent719f14f88157f100ef24c53c18683126df4b1ef8 (diff)
fixed js error in annotations if no graph available
git-svn-id: http://dev.piwik.org/svn/trunk@7735 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/Annotations/templates')
-rwxr-xr-xplugins/Annotations/templates/annotations.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/Annotations/templates/annotations.js b/plugins/Annotations/templates/annotations.js
index f04847ef5b..0c6975f011 100755
--- a/plugins/Annotations/templates/annotations.js
+++ b/plugins/Annotations/templates/annotations.js
@@ -600,6 +600,12 @@ var placeEvolutionIcons = function (annotations, graphElem)
var canvases = $('.piwik-graph .jqplot-xaxis canvas', graphElem),
noteSize = 16;
+ // if no graph available, hide all icons
+ if (!canvases || canvases.length == 0) {
+ $('span', annotations).hide();
+ return true;
+ }
+
// set position of each individual icon
$('span', annotations).each(function(i) {
var canvas = $(canvases[i]),