← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12596: Fixed bug in Loading the first event after register person.

 

------------------------------------------------------------
revno: 12596
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-10-12 21:34:49 +0700
message:
  Fixed bug in Loading the first event after register person.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.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/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2013-10-10 09:04:12 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2013-10-12 14:34:49 +0000
@@ -211,6 +211,7 @@
 	var patient = new Patient();
 	var params = 'programId=' + programId + '&' + getParamsForDiv('patientForm');
 	patient.add(programId,related,params, isContinue );
+	registrationProgress = true;
     return false;
 }
 
@@ -429,11 +430,15 @@
 			hideLoader();
 			hideById('contentDiv');
 			
-			var reportDateToUse = selectedProgramStageInstance.attr('reportDateToUse');
-			if(reportDateToUse != "undefined" && reportDateToUse!='' && $('#executionDate').val() == '' ){
-				$('#executionDate').val(reportDateToUse);
-				$('#executionDate').change();
+			if(registrationProgress)
+			{
+				var reportDateToUse = selectedProgramStageInstance.attr('reportDateToUse');
+				if(reportDateToUse != "undefined" && reportDateToUse!='' && $('#executionDate').val() == '' ){
+					$('#executionDate').val(reportDateToUse);
+					$('#executionDate').change();
+				}
 			}
+			registrationProgress = false;
 		
 		} );
 	

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm	2013-10-12 14:19:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm	2013-10-12 14:34:49 +0000
@@ -86,17 +86,18 @@
 							#else
 								#set($standardInterval=0)
 							#end
-							<option value="$programStage.uid" 
-							localid='$programStage.id' 
-							prevStageId='$prevStageId'
-							standardInterval='$standardInterval' 
-							selected repeatable="true"
-							allowGenerateNextVisit='$allowGenerateNextVisit' 
-							programType = '$programStage.program.type'
-							reportDateDes='$programStage.reportDateDescription'
-							repeatable="false"
-							openAfterEnrollment="$programStage.openAfterEnrollment"
-							reportDateToUse="$reportDateToUse"
+							<option 
+								value="$programStage.uid" 
+								localid='$programStage.id' 
+								prevStageId='$prevStageId'
+								standardInterval='$standardInterval' 
+								selected repeatable="true"
+								allowGenerateNextVisit='$allowGenerateNextVisit' 
+								programType = '$programStage.program.type'
+								reportDateDes='$programStage.reportDateDescription'
+								repeatable="false"
+								openAfterEnrollment="$programStage.openAfterEnrollment"
+								reportDateToUse="$reportDateToUse"
 							>$!programStage.displayName</option>
 						#else
 							#set($hasEvent="false")
@@ -125,7 +126,7 @@
 								repeatable="false"
 								openAfterEnrollment="$programStage.openAfterEnrollment"
 								reportDateToUse="$reportDateToUse"
-								>$!programStage.displayName</option>
+							>$!programStage.displayName</option>
 							
 						#end
 						

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2013-10-10 05:29:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2013-10-12 14:34:49 +0000
@@ -3,6 +3,7 @@
 		jQuery('#criteriaBtnTD').attr('rowspan', 2);
 		showById('searchByIdTR');
 	});
+	var registrationProgress = false;
 </script>
 	
 <h3 id='mainLinkLbl'>$i18n.getString( "patient_management" ) #openHelp( "patient" )</a></h3>