=== 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 2010-12-06 03:08:31 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js 2011-01-25 09:45:14 +0000 @@ -29,6 +29,7 @@ { var listenerFunction; var multipleSelectionAllowed = false; + var unselectAllowed = false; this.setListenerFunction = function( listenerFunction_ ) { @@ -39,6 +40,11 @@ { multipleSelectionAllowed = allowed; }; + + this.setUnselectAllowed = function( allowed ) + { + unselectAllowed = allowed; + } this.select = function( unitId ) { @@ -46,7 +52,7 @@ var linkTags = unitTag.getElementsByTagName( 'a' ); - if ( linkTags[0].className == 'selected' ) + if ( linkTags[0].className == 'selected' && unselectAllowed ) { $.post(organisationUnitTreePath + "removeorgunit.action",{ id:unitId === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.js 2010-12-16 13:23:27 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.js 2011-01-25 09:45:14 +0000 @@ -8,6 +8,7 @@ } selection.setListenerFunction( organisationUnitSelected ); +selection.setUnselectAllowed( true ); // ----------------------------------------------------------------------------- // View details