Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benakamoorthi@fastmail.fm>2014-07-08 11:04:05 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2014-07-08 11:04:05 +0400
commit05207e39786e7fe155b3b15b2ffb8619be01ad8d (patch)
tree97f6a7691112dc24ff81e0ac3ee09e288939baa7 /plugins
parentd42c8bae8bd8d6ec3a08bdaf7937b29161e4c686 (diff)
Refs #4363, introduce @ terminal operator for row evolution queries to get rid of previous hack used to fix #4363. Includes tests and changes to transitions so it will continue working.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/API/RowEvolution.php7
-rw-r--r--plugins/CoreHome/javascripts/dataTable_rowactions.js6
-rw-r--r--plugins/Transitions/javascripts/transitions.js5
3 files changed, 10 insertions, 8 deletions
diff --git a/plugins/API/RowEvolution.php b/plugins/API/RowEvolution.php
index 705bdb2a6e..69bb5e2f56 100644
--- a/plugins/API/RowEvolution.php
+++ b/plugins/API/RowEvolution.php
@@ -204,10 +204,13 @@ class RowEvolution
$replaceRegex = "/\\s*" . preg_quote(LabelFilter::SEPARATOR_RECURSIVE_LABEL) . "\\s*/";
$cleanLabel = preg_replace($replaceRegex, '/', $label);
- return $mainUrlHost . '/' . $cleanLabel . '/';
+ $result = $mainUrlHost . '/' . $cleanLabel . '/';
} else {
- return str_replace(LabelFilter::SEPARATOR_RECURSIVE_LABEL, ' - ', $label);
+ $result = str_replace(LabelFilter::SEPARATOR_RECURSIVE_LABEL, ' - ', $label);
}
+
+ // remove @ terminal operator occurances
+ return str_replace(LabelFilter::TERMINAL_OPERATOR, '', $result);
}
/**
diff --git a/plugins/CoreHome/javascripts/dataTable_rowactions.js b/plugins/CoreHome/javascripts/dataTable_rowactions.js
index b5e7140b8e..4d717938ab 100644
--- a/plugins/CoreHome/javascripts/dataTable_rowactions.js
+++ b/plugins/CoreHome/javascripts/dataTable_rowactions.js
@@ -215,11 +215,9 @@ DataTable_RowAction.prototype.getLabelFromTr = function (tr) {
value = value.trim();
value = encodeURIComponent(value);
- // if tr is a terminal node, we add a '%20' to signfy this. Piwik will notice this and make sure to
- // look for a terminal, even if there's a sibling branch node w/ the same label. this is a workaround
- // for #4363.
+ // if tr is a terminal node, we use the @ operator to distinguish it from branch nodes w/ the same name
if (!tr.hasClass('subDataTable')) {
- value = value + '%20';
+ value = '@' + value;
}
return value;
diff --git a/plugins/Transitions/javascripts/transitions.js b/plugins/Transitions/javascripts/transitions.js
index eef37f4320..174bce2474 100644
--- a/plugins/Transitions/javascripts/transitions.js
+++ b/plugins/Transitions/javascripts/transitions.js
@@ -46,11 +46,12 @@ DataTable_RowActions_Transitions.prototype.trigger = function (tr, e, subTableLa
}
};
-DataTable_RowAction.prototype.performAction = function (label, tr, e) {
+DataTable_RowActions_Transitions.prototype.performAction = function (label, tr, e) {
var separator = ' > '; // LabelFilter::SEPARATOR_RECURSIVE_LABEL
var labelParts = label.split(separator);
for (var i = 0; i < labelParts.length; i++) {
- labelParts[i] = $.trim(decodeURIComponent(labelParts[i]));
+ var labelPart = labelParts[i].replace('@', '');
+ labelParts[i] = $.trim(decodeURIComponent(labelPart));
}
label = labelParts.join(piwik.config.action_url_category_delimiter);
this.openPopover('title:' + label);