diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-03-06 13:58:10 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-03-06 13:58:10 +0400 |
commit | e2024eeb63f9a43359a9c39b290da7baafada301 (patch) | |
tree | 0291f58a7545da48a691bccf7c29e010de9bb310 /plugins/Annotations/templates | |
parent | 455bf2b15e2aacb75f6d25b63c6bb162a6429981 (diff) |
Small fixes/refactor
Diffstat (limited to 'plugins/Annotations/templates')
-rwxr-xr-x | plugins/Annotations/templates/annotations.js | 8 |
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 |