← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6246: (patient) Minor fix for tabular report.

 

------------------------------------------------------------
revno: 6246
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-03-12 14:24:12 +0700
message:
  (patient) Minor fix for tabular report.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/ValidateTabularReportAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/tabularReport.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportSelect.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/java/org/hisp/dhis/caseentry/action/report/ValidateTabularReportAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/ValidateTabularReportAction.java	2012-03-12 07:03:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/ValidateTabularReportAction.java	2012-03-12 07:24:12 +0000
@@ -89,11 +89,13 @@
         if ( selectedOrgunit == null )
         {
             message = i18n.getString( "please_specify_an_orgunit" );
+            return INPUT;
         }
         
         if ( selectedOrgunit != null && facilityLB.equals( "childrenOnly" ) && !selectedOrgunit.hasChild() )
         {
             message = i18n.getString( "selected_orgunit_no_have_any_child" );
+            return INPUT;
         }
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/tabularReport.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/tabularReport.js	2012-03-12 07:03:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/tabularReport.js	2012-03-12 07:24:12 +0000
@@ -163,7 +163,10 @@
 
 function validateTabularReport()
 {
-	$.post( 'validateTabularReport.action',{}
+	$.post( 'validateTabularReport.action',
+		{
+			facilityLB: getFieldValue('facilityLB')
+		}
 		, function( json ) 
 		{
 			if( json.response == 'success' )
@@ -172,7 +175,7 @@
 			}
 			else
 			{
-				setMessage( json.messsage );
+				setMessage( json.message );
 			}
 		} );
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportSelect.vm	2012-03-12 07:03:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportSelect.vm	2012-03-12 07:24:12 +0000
@@ -1,7 +1,7 @@
 <script>
 	jQuery(document).ready(	function(){
 			validation2( 'reportForm', function(form){
-				loadGeneratedReport();
+				validateTabularReport();
 			}, {
 				'beforeValidateHandler' : function()
 				{