=== modified file 'dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm' --- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm 2013-09-20 15:13:05 +0000 +++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm 2013-10-15 11:45:28 +0000 @@ -31,8 +31,11 @@ var organisationUnits = fm.organisationUnits(); var tmpl = $( '#organisation-units-template' ).html(); + var ou = _.values( organisationUnits ); + ou = _.sortBy( ou, function(n) { return n.level; } ); + $('#organisation-units-page section[data-role="content"]').html( - _.template( tmpl, { 'organisationUnits': organisationUnits } ) + _.template( tmpl, { 'organisationUnits': ou } ) ); $('#organisation-unit-list').listview();