update Piwik to version 2.16 (fixes #91)

This commit is contained in:
oliver 2016-04-10 18:55:57 +02:00
commit d885a4baa9
5833 changed files with 418860 additions and 226988 deletions

View file

@ -164,7 +164,12 @@ var Piwik_Overlay_FollowingPages = (function () {
linkTag[0].piwikTagElement = true;
var rate = data.clickRate;
if (rate < 10) {
if( rate < 0.001 ) {
rate = '<0.001';
} else if (rate < 1) {
rate = Math.round( rate * 1000 ) / 1000;
} else if (rate < 10) {
rate = Math.round(rate * 10) / 10;
} else {
rate = Math.round(rate);
@ -387,11 +392,11 @@ var Piwik_Overlay_FollowingPages = (function () {
offset = linkTag.offset();
height = linkTag.outerHeight();
}
var numLinks = linksOnPage[linkUrl].length;
putBoxAroundLink(offset, width, height, numLinks, data.referrals);
// highlight tags
for (var j = 0; j < numLinks; j++) {
var tag = linksOnPage[linkUrl][j][0].piwikTagElement;
@ -407,11 +412,11 @@ var Piwik_Overlay_FollowingPages = (function () {
linkTag[0].piwikHideNotification = Piwik_Overlay_Client.notification(
Piwik_Overlay_Translations.get('link') + ': ' + linkUrl, 'LinkLocation');
}
function putBoxAroundLink(offset, width, height, numLinks, numReferrals) {
var borderWidth = 2;
var padding = 4; // the distance between the link and the border
// top border
highlightElements[0]
.width(width + 2 * padding)
@ -419,7 +424,7 @@ var Piwik_Overlay_FollowingPages = (function () {
top: offset.top - borderWidth - padding,
left: offset.left - padding
}).show();
// right border
highlightElements[1]
.height(height + 2 * borderWidth + 2 * padding)
@ -427,7 +432,7 @@ var Piwik_Overlay_FollowingPages = (function () {
top: offset.top - borderWidth - padding,
left: offset.left + width + padding
}).show();
// left border
highlightElements[2]
.height(height + 2 * borderWidth + 2 * padding)
@ -456,7 +461,7 @@ var Piwik_Overlay_FollowingPages = (function () {
top: offset.top + height + padding,
left: offset.left - borderWidth - padding
}).show();
var minBoxWidth = width + 2 * borderWidth + 2 * padding;
if (highlightElements[3].width() < minBoxWidth) {
// we cannot use minWidth because of IE7
@ -485,7 +490,6 @@ var Piwik_Overlay_FollowingPages = (function () {
}
}
return {
/**