dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10867
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2995: Reverted r 2994
------------------------------------------------------------
revno: 2995
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-03-10 11:22:31 +0100
message:
Reverted r 2994
modified:
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js 2011-03-10 03:22:59 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js 2011-03-10 10:22:31 +0000
@@ -2,6 +2,8 @@
var MODE_REPORT = "report";
var MODE_TABLE = "table";
+var reportType;
+
// -----------------------------------------------------------------------------
// Report params
// -----------------------------------------------------------------------------
@@ -32,14 +34,16 @@
// Report
// -----------------------------------------------------------------------------
-function generateReport()
+function generateReport( type )
{
+ reportType = type != null && type != "" ? type : "pdf";
+
if ( validationError() )
{
return false;
}
- setMessage( i18n_please_wait + "..." );
+ setWaitMessage( i18n_please_wait );
var doDataMart = ( $( "#doDataMart" ).length && $( "#doDataMart" ).val() == "true" );
@@ -74,7 +78,7 @@
if ( finished == "true" )
{
- setMessage( i18n_process_completed );
+ setMessage( i18n_process_completed );
viewReport();
}
else
@@ -87,9 +91,11 @@
{
var mode = $( "#mode" ).val();
+ setMessage( i18n_process_completed );
+
if ( mode == MODE_REPORT )
{
- window.location.href = "renderReport.action?" + getUrlParams();
+ window.location.href = "renderReport.action?type=" + reportType + "&" + getUrlParams();
}
else // MODE_TABLE
{