← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3472: Fixed bug to show feedback when deleted a attribute option in "Update Beneficiary Attribute".

 

------------------------------------------------------------
revno: 3472
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-04-27 12:10:13 +0700
message:
  Fixed bug to show feedback when deleted a attribute option in "Update Beneficiary Attribute".
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js


--
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-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js	2010-10-05 11:58:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js	2011-04-27 05:10:13 +0000
@@ -76,16 +76,13 @@
 		if( jQuery(this_).siblings("input").attr("name") != "attrOptions")
 		{
 			jQuery.get("removePatientAttributeOption.action?id="+optionId,function(data){
-				var type  = jQuery(data).find("message").attr("type");
-				alert(type);
-				if( type == "success")
+				if( data.response == "success")
 				{
-					alert("success");
 					jQuery(this_).parent().parent().remove();
-					alert(jQuery(data).text());
+					showSuccessMessage( data.message );
 				}else 
 				{
-					alert(jQuery(data).text());
+					showErrorMessage( data.message );
 				}
 			});
 		}else