From c6f9ca8bf9f1571777388d3cc657bdc6e74b2c91 Mon Sep 17 00:00:00 2001
From: sgiehl <stefan@piwik.org>
Date: Mon, 14 Sep 2015 20:35:48 +0200
Subject: [PATCH] small improvements

---
 plugins/CoreHome/javascripts/sparkline.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/plugins/CoreHome/javascripts/sparkline.js b/plugins/CoreHome/javascripts/sparkline.js
index e9697efa16..fc3b74f692 100644
--- a/plugins/CoreHome/javascripts/sparkline.js
+++ b/plugins/CoreHome/javascripts/sparkline.js
@@ -43,12 +43,13 @@ window.initializeSparklines = function () {
         // try to find sparklines and add them clickable behaviour
         graph.parent().find('div.sparkline').each(function () {
 
-            $(this).addClass('linked');
-
             // find the sparkline and get it's src attribute
             var sparklineUrl = $('img', this).attr('data-src');
 
             if (sparklineUrl != "") {
+
+                $(this).addClass('linked');
+
                 var params = broadcast.getValuesFromUrl(sparklineUrl);
                 for (var i = 0; i != sparklineUrlParamsToIgnore.length; ++i) {
                     delete params[sparklineUrlParamsToIgnore[i]];
-- 
GitLab