← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11811: Fix bug - Exception thrown when to remove a person in list.

 

------------------------------------------------------------
revno: 11811
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-08-27 15:54:26 +0700
message:
  Fix bug - Exception thrown when to remove a person in list.
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/patientRegistrationList.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-08-14 06:58:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2013-08-27 08:54:26 +0000
@@ -60,9 +60,9 @@
 			});
 	};
 	
-	this.remove = function( confirm_delete )
+	this.remove = function( confirm_delete_patient )
 	{
-		removeItem( this.patientId, this.fullName, i18n_confirm_delete, 'removePatient.action' );
+		removeItem( this.patientId, this.fullName, confirm_delete_patient, 'removePatient.action' );
 	};
 	
 	this.add = function(params,isContinue)
@@ -187,12 +187,12 @@
 // Remove patient
 // -----------------------------------------------------------------------------
 
-function removePatient( patientId, fullName, i18n_confirm_delete )
+function removePatient( patientId, fullName, i18n_confirm_delete_patient )
 {
 	var patient = new Patient();
 	patient.patientId = patientId;
 	patient.fullName = fullName;
-	patient.remove( confirm_delete );
+	patient.remove( i18n_confirm_delete_patient );
 }
 
 // -----------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2013-08-14 06:58:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2013-08-27 08:54:26 +0000
@@ -169,7 +169,7 @@
                   #if( $auth.hasAccess( "dhis-web-caseentry", "getPatientLocation" ) )
 				  <a href="javascript:isDashboard=false;getPatientLocation( '$patient.id' );" title='$i18n.getString( "change_location" )'><img src="../icons/dataentry.png" alt='$i18n.getString( "change_patient_location" )' style='width:25px; height:25px'></a>
 				  #end
-				  <a href="javascript:removePatient( '$patient.id', '$encoder.jsEncode( $patient.getFullName() )' )" title='$i18n.getString( "remove" )'><img src="../images/delete.png" alt='$i18n.getString( "remove" )'></a>
+				  <a href="javascript:removePatient( '$patient.id', '$encoder.jsEncode( $patient.getFullName() )', i18n_confirm_delete_patient )" title='$i18n.getString( "remove" )'><img src="../images/delete.png" alt='$i18n.getString( "remove" )'></a>
 				  <a href="javascript:showPatientHistory( '$patient.id' )" title='$i18n.getString( "patient_details_and_history" )'><img src="../images/information.png" alt='$i18n.getString( "patient_details_and_history" )'></a>
 				</td>
 				
@@ -227,4 +227,5 @@
 	var i18n_save_success = '$encoder.jsEscape( $i18n.getString( "save_success" ) , "'")';
 	var i18n_color_quick_help = '$encoder.jsEscape( $i18n.getString( "color_quick_help" ) , "'")';
 	var i18n_reenrollment_confirm_message = '$encoder.jsEscape( $i18n.getString( "reenrollment_confirm_message" ) , "'")';
+	var i18n_confirm_delete_patient = '$encoder.jsEscape( $i18n.getString( "confirm_delete_patient" ) , "'")';
 </script>