← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7535: Error when to select an orgunit in Program Summary report.

 

------------------------------------------------------------
revno: 7535
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-07-09 10:38:52 +0700
message:
  Error when to select an orgunit in Program Summary report.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/report.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.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/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-07-06 03:53:08 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-07-09 03:38:52 +0000
@@ -107,7 +107,7 @@
 run_validation=Run validation
 please_select_village=Please select village
 select_sorting_attribute=Select a specfied attribute / ALL
-no_result=No result
+no_result_found=No result found
 hierachy_orgunit=Hierarchy organisation unit
 F=F
 M=M

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml	2012-07-06 09:59:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml	2012-07-09 03:38:52 +0000
@@ -331,6 +331,11 @@
 			<param name="page">/dhis-web-caseentry/records.vm</param>
 		</action>
         
+        <action name="getReportPrograms"
+			class="org.hisp.dhis.caseentry.action.caseentry.GetProgramsByOrgunitAction">
+			<result name="success" type="velocity-json">
+				/dhis-web-caseentry/responsePrograms.vm</result>
+		</action>
 		<!-- i18n -->
 
         <action name="i18n" class="org.hisp.dhis.caseentry.action.NoAction">

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/report.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/report.js	2012-03-12 07:03:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/report.js	2012-07-09 03:38:52 +0000
@@ -1,10 +1,9 @@
 isAjax = true;
-
 function organisationUnitSelected( orgUnits, orgUnitNames )
 {
     showLoader();
 	setInnerHTML( 'contentDiv','' );
-	jQuery.getJSON( "getPrograms.action",{}, 
+	jQuery.getJSON( "getReportPrograms.action",{}, 
 		function( json ) 
 		{    
 			setFieldValue( 'orgunitname', orgUnitNames[0] );

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm	2012-06-07 04:23:40 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm	2012-07-09 03:38:52 +0000
@@ -1,13 +1,11 @@
-#if( $programInstance.size() == 0 )
-	<i>$i18n.getString('no_result')</i>
-#else
+#if( $programInstance && $programInstance.size() > 0 )
 <table class="mainPageTable">
 <tr>
     <td style="vertical-align:top">    
     <table class="listTable">
         <tbody id="list" style="width:300px; overflow:auto;">
-            #set( $mark = false )                 
-            #foreach( $programInstance in $programInstances )
+            #set( $mark = false )  
+			#foreach( $programInstance in $programInstances )
                 <tr #alternate( $mark )>                
 					<td>
 						<input type='button' class='patient-object' value='$programInstance.patient.getFullName()' onclick='javascript:showPatientHistory( $programInstance.patient.id )' title='$i18n.getString( "patient_details_and_history" )'>
@@ -47,6 +45,8 @@
 </table>
 
 <div id="viewRecordsDiv"></div>
+#else
+	<h4>$i18n.getString('no_result_found')</h4>
 #end
 <script>
 	var i18n_patient_details_and_history = '$encoder.jsEscape( $i18n.getString( "patient_details_and_history" ) , "'" )';

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm	2012-07-06 03:53:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm	2012-07-09 03:38:52 +0000
@@ -32,7 +32,7 @@
 		  
 			<tr>
 				<td><label>$i18n.getString( "standard_interval_days" )</label></td>
-				<td><input type="text" id="standardInterval" name="standardInterval" value='$!programStage.standardInterval' class="{validate:{required:true,number:true}}" #if($programStage.irregular!='false' ) disabled #end /></td>
+				<td><input type="text" id="standardInterval" name="standardInterval" value='$!programStage.standardInterval' class="{validate:{required:true,number:true}}" #if($programStage.irregular!='true' ) disabled #end /></td>
 			</tr>
 			<tr><td>&nbsp;</td></tr>