=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js 2012-03-02 09:08:35 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js 2012-03-02 11:49:40 +0000 @@ -40,10 +40,15 @@ { return selectedOrganisationUnit; }; + + this.isSelected = function() + { + return selectedOrganisationUnit && selectedOrganisationUnit.length > 0; + } this.select = function( unitId ) { - if ( onSelectFunction ) + if ( onSelectFunction ) { onSelectFunction(); } @@ -88,11 +93,6 @@ function responseReceived( json ) { - if ( !listenerFunction ) - { - return; - } - selectedOrganisationUnit = new Array(); var unitIds = new Array(); @@ -104,7 +104,11 @@ } jQuery("body").trigger("oust.selected", selectedOrganisationUnit); - listenerFunction( unitIds ); + + if ( listenerFunction ) + { + listenerFunction( unitIds ); + } } function getTagId( unitId ) @@ -123,8 +127,7 @@ { $.ajax({ url: selectionTreePath + "clearSelectedOrganisationUnits.action", - async: false, - dataType: "xml" + async: false }); }; === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm 2012-02-12 12:21:49 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm 2012-03-02 11:49:40 +0000 @@ -1,13 +1,17 @@