=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js 2009-10-22 17:22:15 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js 2010-07-22 13:55:39 +0000 @@ -41,29 +41,39 @@ this.select = function( unitId ) { - var request = new Request(); - request.setCallbackSuccess( responseReceived ); - request.setResponseTypeXML( 'selected' ); - var unitTag = document.getElementById( getTagId( unitId )); var linkTags = unitTag.getElementsByTagName( 'a' ); if ( linkTags[0].className == 'selected' ) { - request.send( organisationUnitTreePath + 'removeorgunit.action?id=' + unitId ); + $.post(organisationUnitTreePath + "removeorgunit.action",{ + id:unitId + }, function (data){ + responseReceived(data.firstChild); + },'xml'); + linkTags[0].className = ''; } else { if ( multipleSelectionAllowed ) { - request.send( organisationUnitTreePath + 'addorgunit.action?id=' + unitId ); + $.post(organisationUnitTreePath + "addorgunit.action",{ + id:unitId + }, function (data){ + responseReceived(data.firstChild); + },'xml'); + linkTags[0].className = 'selected'; } else { - request.send( organisationUnitTreePath + 'setorgunit.action?id=' + unitId ); - + $.post(organisationUnitTreePath + "setorgunit.action",{ + id:unitId + }, function (data){ + responseReceived(data.firstChild); + },'xml'); + // Remove all select marks var treeTag = document.getElementById( 'orgUnitTree' ); var linkTags = treeTag.getElementsByTagName( 'a' ); === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2010-07-18 15:17:23 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2010-07-22 13:55:39 +0000 @@ -188,21 +188,21 @@ - + /dhis-web-commons/ouwt/responseSelect.vm plainTextError - + /dhis-web-commons/ouwt/responseSelect.vm plainTextError - + /dhis-web-commons/ouwt/responseSelect.vm plainTextError