← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6096: (patient) Use jQuery methods insteads of Request object in dhis-web-maintenance-patient.

 

------------------------------------------------------------
revno: 6096
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-02-24 09:10:12 +0700
message:
  (patient) Use jQuery methods insteads of Request object in dhis-web-maintenance-patient.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.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/program.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js	2012-02-13 02:41:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js	2012-02-24 02:10:12 +0000
@@ -37,46 +37,6 @@
 	removeItem( programId, name, i18n_confirm_delete, 'removeProgram.action' );
 }
 
-// -----------------------------------------------------------------------------
-// Create validation for dataelements into program-stages
-// -----------------------------------------------------------------------------
-
-var dataelementId;
-function getDataElementsFromStage(stageId, dataelementId){
-
-	this.dataelementId = dataelementId;
-	clearListById(dataelementId);
-	
-	if(stageId != ''){
-		var request = new Request();
-		request.setResponseTypeXML( 'xmlObject' );
-		request.setCallbackSuccess( getDataElementsFromStageReceived);
-		request.send( "getProgramStage.action?id=" + stageId );
-	}	
-}
-
-function getDataElementsFromStageReceived(xmlObject){
-	
-	var dataelementField = byId(dataelementId);
-	clearListById(dataelementId);
-	
-	xmlObject = xmlObject.getElementsByTagName('dataElements')[0];
-	var dataelementList = xmlObject.getElementsByTagName( 'dataElement' );
-  
-	for ( var i = 0; i < dataelementList.length; i++ )
-    {
-        var id = dataelementList[ i ].getElementsByTagName("id")[0].firstChild.nodeValue;
-        var name = dataelementList[ i ].getElementsByTagName("name")[0].firstChild.nodeValue;
-
-        var option = document.createElement("option");
-        option.value = id;
-        option.text = name;
-        option.title = name;
-        
-        dataelementField.add(option, null);       	
-    }
-}
-
 function singleEventOnChange()
 {
 	var checked = byId('singleEvent').checked;