WIP refactor api - export csv refactorings

This commit is contained in:
John Woodlock
2012-05-14 16:43:52 +10:00
parent ad14229e99
commit 934cc0ca47
10 changed files with 433 additions and 654 deletions
@@ -82,11 +82,6 @@ function initialiseReporting(params) {
if (params.pentahoUrl) pentahoUrl = params.pentahoUrl
else pentahoUrl = "";
if (params.exportUrl) exportUrl = params.exportUrl
else exportUrl = "";
// alert("export url: " + exportUrl);
loadingImg = "dots64.gif";
if (params.loadingImg) loadingImg = params.loadingImg;
@@ -1109,8 +1104,8 @@ function getExportCSV(inParams) {
//paramCount = paramCount + 1;
}
var fullExportUrl = exportUrl + inQueryParameters;
//alert('Export url: ' + fullExportUrl);
//var fullExportUrl = RESTUrl + inQueryParameters + "&exportCSV=true";
var fullExportUrl = RESTUrl + "/exportjpw" + inQueryParameters;
showMsg("full export url: " + fullExportUrl);
var loadHTML = '<iframe id=rptLoadingFrame src="' + fullExportUrl + '" frameborder="0" onload="jQuery.stretchyReporting.clearLoadingImg();" width="100%" height="600px" style="background:url(';
loadHTML += "'" + loadingImg + "'" + ') no-repeat scroll 50% 100px;"><p>Your browser does not support iframes.</p></iframe>';
@@ -1133,7 +1128,7 @@ function getPentahoReport(inParams) {
}
var fullReportUrl = pentahoUrl + inQueryParameters;
showMsg("full pentaho url: " + fullExportUrl);
showMsg("full pentaho url: " + fullReportUrl);
var loadHTML = '<iframe src="' + fullReportUrl + '" frameborder="1" width="100%" height="600px" style="background:url(';
loadHTML += "'" + loadingImg + "'" + ') no-repeat scroll 50% 100px;"><p>Your browser does not support iframes.</p></iframe>';
@@ -16,6 +16,6 @@
<script type="text/javascript" src="${resValue}/libs/DataTables-1.8.2/extras/TableTools/media/js/TableTools.min.js"></script>
<script type="text/javascript" src="${resValue}/libs/jquery.i18n.properties-min-1.0.9.js"></script>
<script type="text/javascript" src="${resValue}/libs/OAuthSimple.js"></script>
<script type="text/javascript" src="${resValue}/stretchyreporting/stretchyreporting-0.96.js"></script>
<script type="text/javascript" src="${resValue}/stretchyreporting/stretchyreporting-0.965.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
@@ -94,7 +94,7 @@ var reportingParams = {
RESTUrl: "${baseUrl}api/v1/reports",
pentahoUrl: "${baseUrl}pentahoreport",
//old link exportUrl: "${rootContext}exportcsv",
exportUrl: "${baseUrl}exportcsv",
//not needed now exportUrl: "${baseUrl}exportcsv",
bundleDir: "${resValue}/stretchyreporting/mifosngbundle/",
reportsListDiv: "myListOfReports",
runReportDiv: "myRunReportButton",