diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2016-12-02 07:32:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-02 07:32:03 +0300 |
commit | 95dff7b6812f54c1afc67d6781a5d01d47c3ca60 (patch) | |
tree | 3c49147c490360c0d436dba0e1c9690d9978bd0b /plugins/CoreHome/javascripts/sparkline.js | |
parent | 28409d4c92f46ce3b250501c769bb08ebb26884c (diff) | |
parent | 59ba07cba11cd51a49ba5a4946abee0d34c4c7a9 (diff) |
Merge pull request #10945 from piwik/3.x-dev3.0.0-b4
Piwik 3.0.0-b4 release
Diffstat (limited to 'plugins/CoreHome/javascripts/sparkline.js')
-rw-r--r-- | plugins/CoreHome/javascripts/sparkline.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/CoreHome/javascripts/sparkline.js b/plugins/CoreHome/javascripts/sparkline.js index 8f10a9f1eb..32e23a12aa 100644 --- a/plugins/CoreHome/javascripts/sparkline.js +++ b/plugins/CoreHome/javascripts/sparkline.js @@ -55,16 +55,18 @@ window.initializeSparklines = function () { return; } - var sparklines = parent.find('div.sparkline'); + var sparklines = parent.find('div.sparkline:not(.notLinkable)'); // try to find sparklines and add them clickable behaviour sparklines.each(function () { // find the sparkline and get it's src attribute var sparklineUrl = $('img', this).attr('data-src'); + var $this = $(this); + if (sparklineUrl != "") { - $(this).addClass('linked'); + $this.addClass('linked'); var params = broadcast.getValuesFromUrl(sparklineUrl); for (var i = 0; i != sparklineUrlParamsToIgnore.length; ++i) { @@ -80,8 +82,8 @@ window.initializeSparklines = function () { } // on click, reload the graph with the new url - $(this).off('click.sparkline'); - $(this).on('click.sparkline', function () { + $this.off('click.sparkline'); + $this.on('click.sparkline', function () { var reportId = graph.attr('data-report'), dataTable = graph; |