← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4299: Made ouwt json more compact

 

------------------------------------------------------------
revno: 4299
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-08-15 14:20:05 +0200
message:
  Made ouwt json more compact
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnitTree.vm


--
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-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