← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11998: Fixed bug - When to click Add and register new person in Registration form, the person dashboard ...

 

------------------------------------------------------------
revno: 11998
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-09-10 01:36:06 +0700
message:
  Fixed bug - When to click Add and register new person in Registration form, the person dashboard comes instead of retain the registration form.
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/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-09-07 13:22:52 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2013-09-09 18:36:06 +0000
@@ -222,7 +222,7 @@
 {		
 	var patient = new Patient();
 	var params = 'programId=' + programId + '&' + getParamsForDiv('patientForm');
-	patient.add(programId,related,params);
+	patient.add(programId,related,params, isContinue );
     return false;
 }
 

=== 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-09-07 21:25:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2013-09-09 18:36:06 +0000
@@ -119,8 +119,10 @@
 		setFieldValue('selectedOrgunitText', i18n_please_select_village );
 	#elseif( $status == 2 )
 		setFieldValue('selectedOrgunitText', '$organisationUnit.name' );
+		enable('listPatientBtn');
 	#else
 		setFieldValue('selectedOrgunitText', '$organisationUnit.name' );
+		enable('listPatientBtn');
 		showById('searchDiv');
 	#end
 	
@@ -138,24 +140,6 @@
 	setFieldValue('endDueDate','');
 	jQuery('#emptyProgramOption').text('[' + '$i18n.getString("view_all")' + ']');
 	
-	
-	jQuery(document).ready(function($) {
-		if (window.history && window.history.pushState) {
-			$(window).on('popstate', function() {
-			  var hashLocation = location.hash;
-			  var hashSplit = hashLocation.split("#!/");
-			  var hashName = hashSplit[1];
-
-			  if (hashName !== '') {
-				var hash = window.location.hash;
-				if (hash === '') {
-				  window.location.href="patient.action";
-				}
-			  }
-			});
-			window.history.pushState('patient.action#patient', null, './patient.action#patient');
-	}
-	
 	$( "#orgUnitTree" ).one( "ouwtLoaded", function () {
         var def = $.Deferred();
         var promise = def.promise();
@@ -165,7 +149,5 @@
 
         def.resolve();
     } );
-
-});
 	
 </script>
\ No newline at end of file