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:
Diffstat (limited to 'plugins/Annotations/templates')
-rwxr-xr-xplugins/Annotations/templates/annotations.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/Annotations/templates/annotations.js b/plugins/Annotations/templates/annotations.js
index 0c6975f011..62f63a59aa 100755
--- a/plugins/Annotations/templates/annotations.js
+++ b/plugins/Annotations/templates/annotations.js
@@ -489,8 +489,12 @@ var showAnnotationViewer = function(domElem, idSite, date, period, lastN, callba
annotationCount = +$(this).attr('data-count');
// modify the starred count & make sure the correct image is used
- var newStarCount = starredCount + starAmt,
- newImg = 'themes/default/images/' + (newStarCount > 0 ? 'yellow_marker.png' : 'grey_marker.png');
+ var newStarCount = starredCount + starAmt;
+ if(newStarCount > 0) {
+ var newImg = 'themes/default/images/yellow_marker.png';
+ } else {
+ var newImg = 'themes/default/images/grey_marker.png';
+ }
$(this).attr('data-starred', newStarCount).find('img').attr('src', newImg);
// modify the annotation count & hide/show based on new count