← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10070: Fix bug when to download program Statistics as excel file.

 

------------------------------------------------------------
revno: 10070
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-03-08 16:22:54 +0700
message:
  Fix bug when to download program Statistics as excel file.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/statisticalReport.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramReportSelect.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 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/statisticalReport.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/statisticalReport.js	2013-03-08 08:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/statisticalReport.js	2013-03-08 09:22:54 +0000
@@ -15,8 +15,8 @@
 		jQuery( "#statisticalReportDiv" ).load( "generateStatisticalProgramReport.action",
 		{
 			programId: getFieldValue('programId'),
-			startDate: getFieldValue('startDate') + ' 00:00',
-			endDate: getFieldValue( 'endDate' ) + ' 23:59',
+			startDate: getFieldValue('startDateField') + ' 00:00',
+			endDate: getFieldValue( 'endDateField' ) + ' 23:59',
 			facilityLB: $('input[name=facilityLB]:checked').val(),
 		}, function() 
 		{ 
@@ -29,6 +29,8 @@
 	}
 	else
 	{
+		setFieldValue('startDate', getFieldValue('startDateField') + ' 00:00');
+		setFieldValue('endDate', getFieldValue( 'endDateField' ) + ' 23:59');
 		byId('reportForm').submit();
 	}
 	

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramReportSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramReportSelect.vm	2013-03-08 08:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramReportSelect.vm	2013-03-08 09:22:54 +0000
@@ -3,7 +3,7 @@
 		validation( 'reportForm', function(form){
 			generatedStatisticalProgramReport();
 		}); 
-		datePickerInRange( 'startDate' , 'endDate' );
+		datePickerInRange( 'startDateField' , 'endDateField' );
 	});		
 </script>
 
@@ -13,6 +13,8 @@
 	<input type="hidden" id="status" name="status">
 	<input type="hidden" id="type" name="type">
 	<input type="hidden" id="total" name="total">
+	<input type="hidden" id="startDate" name="startDate">
+	<input type="hidden" id="endDate" name="endDate">
 	<input type="button" id='showDataBtn' value="$i18n.getString('data')" onclick="showById('inputCriteria');hideById('showDataBtn')" class="hidden">
 	<div class="inputCriteria" id='inputCriteria' style="width:600px;height:180px;margin-bottom:20px;">
 		<table>	
@@ -34,13 +36,13 @@
 			<tr>
 				<td><label>$i18n.getString( "start_date" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 				<td>
-					<input type="text" id="startDate" name="startDate" />
+					<input type="text" id="startDateField" name="startDateField" />
 				</td>
 			</tr>
 			<tr>
 				<td><label>$i18n.getString( "end_date" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 				<td>
-					<input type="text" id="endDate" name="endDate" />
+					<input type="text" id="endDateField" name="endDateField" />
 				</td>      
 			</tr>
 			<tr>