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:
authorThomas Steur <thomas.steur@gmail.com>2015-02-04 23:12:46 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-02-04 23:12:46 +0300
commita9c7845f406c147971eb407b087769378ee88bb0 (patch)
treecf2490ce2ae5afacb41afa3b597f644ba76a2725 /plugins/CoreHome/javascripts/dataTable.js
parenteb444892b6ec63c292996f263a34e02eb3394d10 (diff)
refs #6790 when exporting a report we need to apply the same request params that were used to render the datatable.
This will not only fix this bug but should also fix potential other bugs where request params were not forwarded. For example an abandonedCarts param in Ecommerce, or hideFutureHoursWhenToday in VisitTime.
Diffstat (limited to 'plugins/CoreHome/javascripts/dataTable.js')
-rw-r--r--plugins/CoreHome/javascripts/dataTable.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js
index 5b37493a60..d221562bc9 100644
--- a/plugins/CoreHome/javascripts/dataTable.js
+++ b/plugins/CoreHome/javascripts/dataTable.js
@@ -1048,6 +1048,14 @@ $.extend(DataTable.prototype, UIControl.prototype, {
.attr('href', function () {
var format = $(this).attr('format');
var method = $(this).attr('methodToCall');
+ var params = $(this).attr('requestParams');
+
+ if (params) {
+ params = JSON.parse(params)
+ } else {
+ params = {};
+ }
+
var segment = self.param.segment;
var label = self.param.label;
var idGoal = self.param.idGoal;
@@ -1072,6 +1080,7 @@ $.extend(DataTable.prototype, UIControl.prototype, {
&& self.param.viewDataTable == "graphEvolution") {
period = 'day';
}
+
var str = 'index.php?module=API'
+ '&method=' + method
+ '&format=' + format
@@ -1081,6 +1090,12 @@ $.extend(DataTable.prototype, UIControl.prototype, {
+ ( typeof self.param.filter_pattern != "undefined" ? '&filter_pattern=' + self.param.filter_pattern : '')
+ ( typeof self.param.filter_pattern_recursive != "undefined" ? '&filter_pattern_recursive=' + self.param.filter_pattern_recursive : '');
+ if ($.isPlainObject(params)) {
+ $.each(params, function (index, param) {
+ str += '&' + index + '=' + encodeURIComponent(param);
+ });
+ }
+
if (typeof self.param.flat != "undefined") {
str += '&flat=' + (self.param.flat == 0 ? '0' : '1');
if (typeof self.param.include_aggregate_rows != "undefined" && self.param.include_aggregate_rows) {