=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnitTree.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnitTree.vm 2011-08-12 13:23:47 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnitTree.vm 2011-08-15 12:20:05 +0000 @@ -1,22 +1,19 @@ #macro( expandOrganisationUnit $organisationUnit ) - { - "id": $!{organisationUnit.id}, - #if( $organisationUnit.parent )"parentId": $!{organisationUnit.parent.id},#end - "name": "$!encoder.jsonEncode( ${organisationUnit.name} )"#if( $organisationUnit.children.size() > 0 ), - "children": [ - #foreach ( $child in $organisationUnit.sortedChildren ) - #expandOrganisationUnit( $child )#if( $velocityCount < $organisationUnit.children.size() ),#end - #end]#end - } +{ +"id":$!{organisationUnit.id}, +#if( $organisationUnit.parent )"parentId":$!{organisationUnit.parent.id},#end +"name":"$!encoder.jsonEncode( ${organisationUnit.name} )"#if( $organisationUnit.children.size() > 0 ), +"children":[ +#foreach ( $child in $organisationUnit.sortedChildren ) +#expandOrganisationUnit( $child )#if( $velocityCount < $organisationUnit.children.size() ),#end +#end]#end } #end -{ "version": "$!encoder.jsonEncode( $version )" - #if( ! $versionOnly ) - ,"organisationUnits": [ - #foreach ( $organisationUnit in $organisationUnits ) - #expandOrganisationUnit( $organisationUnit )#if( $velocityCount < $organisationUnits.size() ),#end - #end - ] - #end -} +{ "version":"$!encoder.jsonEncode( $version )" +#if( ! $versionOnly ) +,"organisationUnits":[ +#foreach ( $organisationUnit in $organisationUnits ) +#expandOrganisationUnit( $organisationUnit )#if( $velocityCount < $organisationUnits.size() ),#end +#end ] +#end } \ No newline at end of file