diff options
author | Lukas Winkler <github@lw1.at> | 2018-07-25 01:26:06 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2018-07-25 01:26:06 +0300 |
commit | b7e77d84d83643346f54b9e99191d6ea850f70bd (patch) | |
tree | 239db8c280493adc37d70b8c58baba69ce43be9f /plugins/Morpheus | |
parent | 521cbbe4c5e28caa18fdf233880cb39060de8722 (diff) |
use JS handler for installing all paid plugins (#12783)
Diffstat (limited to 'plugins/Morpheus')
-rw-r--r-- | plugins/Morpheus/javascripts/piwikHelper.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/Morpheus/javascripts/piwikHelper.js b/plugins/Morpheus/javascripts/piwikHelper.js index 8a76122ebe..dc8b27f50b 100644 --- a/plugins/Morpheus/javascripts/piwikHelper.js +++ b/plugins/Morpheus/javascripts/piwikHelper.js @@ -275,11 +275,17 @@ var piwikHelper = { button.attr('title', title); } - if(typeof handles[role] == 'function') { + if (typeof handles !== 'undefined' && typeof handles[role] == 'function') { button.on('click', function(){ handles[role].apply() }); } + if (typeof $button.data('href') !== 'undefined') { + button.on('click', function () { + window.location.href = $button.data('href'); + }) + } + $footer.append(button); }); |