dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16802
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6484: local vn - The period list box should be hidden if the selected report type is "Period Listing".
------------------------------------------------------------
revno: 6484
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-04-05 14:16:03 +0700
message:
local vn - The period list box should be hidden if the selected report type is "Period Listing".
modified:
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonExportReports.vm
--
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 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js 2012-02-28 08:50:46 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js 2012-04-05 07:16:03 +0000
@@ -5,6 +5,9 @@
// Period type object
var periodTypeFactory = new PeriodType();
+// The current selected report type name
+var currentReportTypeName = '';
+
// The current selected period type name
var currentPeriodTypeName = '';
@@ -34,7 +37,7 @@
{
jQuery('#exportReport').empty();
jQuery.each( json.exportReports, function(i, item){
- addOptionById( 'exportReport', item.id + '_' + item.flag, item.name );
+ addOptionById( 'exportReport', item.id + '_' + item.flag + '_' + item.reportType, item.name );
});
currentPeriodOffset = 0;
@@ -51,6 +54,13 @@
if ( value && value != null )
{
currentPeriodTypeName = (value.split( '_' )[1] == "true") ? 'Daily' : 'Monthly';
+ currentReportTypeName = value.split( '_' )[2];
+
+ if ( currentReportTypeName == "P" ) {
+ hideById( "periodRow" );
+ }else {
+ showById( "periodRow" );
+ }
}
}
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonExportReports.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonExportReports.vm 2012-03-29 10:05:35 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonExportReports.vm 2012-04-05 07:16:03 +0000
@@ -1,11 +1,13 @@
{
"organisationUnit": "$!encoder.xmlEncode( ${organisationUnit.name} )",
- #set( $size = $exportReports.size() )
+ #set( $size = $!exportReports.size() )
"exportReports": [
- #foreach( $exportReport in $exportReports )
+ #foreach( $exportReport in $!exportReports )
{
+ #set( $reportType = ${exportReport.getReportType()} )
"id": "${exportReport.id}",
"name": "$!encoder.jsonEncode( ${exportReport.displayName} )",
+ "reportType": #if ( $reportType == "NORMAL" ) "N",#elseif ( $reportType == "CATEGORY" ) "C",#elseif ( $reportType == "PERIOD_COLUMN_LISTING" ) "P",#else "O",#end
"flag": "$!idMap.contains( $!{exportReport.id} )"
}#if( $velocityCount < $size ),#end
#end