From 10403e280cced7e5f08bef1ee717587506aa9a90 Mon Sep 17 00:00:00 2001 From: gamonoid Date: Sun, 8 Oct 2017 16:52:10 +0200 Subject: [PATCH] Add export tab to admin reports --- admin/reports/index.php | 26 ++++++++++++++++++-------- admin/reports/lib.js | 14 +++++++------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/admin/reports/index.php b/admin/reports/index.php index d93847be..22ef8233 100644 --- a/admin/reports/index.php +++ b/admin/reports/index.php @@ -1,38 +1,48 @@ -
- + - +
- +
+
+
+
+ +
- + diff --git a/admin/reports/lib.js b/admin/reports/lib.js index 989e8716..ccfdceac 100644 --- a/admin/reports/lib.js +++ b/admin/reports/lib.js @@ -78,17 +78,17 @@ ReportAdapter.method('processFormFieldsWithObject', function(object) { that.remoteFieldsExists = true; } }); - + } } - + var tempArray = []; that._formFileds.forEach(function(entry) { if(jQuery.inArray(entry[0], fieldsToDelete) < 0){ tempArray.push(entry); } }); - + that._formFileds = tempArray; }); @@ -107,7 +107,7 @@ ReportAdapter.method('renderForm', function(object) { } this.currentReport = object; - + }); ReportAdapter.method('renderFormNew', function(object) { @@ -284,8 +284,8 @@ ReportAdapter.method('addSuccessCallBack', function(callBackData,serverData) { link = 'Download Report '; } link = link.replace(/_BASE_/g,this.baseUrl); - - if(this.currentReport.output == "PDF"){ + + if(this.currentReport.output == "PDF" || this.currentReport.output == "JSON"){ this.showMessage("Download Report",link); @@ -352,7 +352,7 @@ ReportAdapter.method('fillForm', function(object) { }else{ $("#"+this.getTableName()+'Form #'+fields[i][0]).val(object[fields[i][0]]); } - + } });