=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java 2012-04-17 04:39:03 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java 2013-02-19 08:22:26 +0000 @@ -29,11 +29,14 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; +import java.util.List; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramService; import org.hisp.dhis.program.ProgramStage; import org.hisp.dhis.program.ProgramStageService; +import org.hisp.dhis.program.comparator.ProgramNameComparator; import com.opensymphony.xwork2.Action; @@ -90,14 +93,14 @@ this.associations = associations; } - private Collection programs = new ArrayList(); + private List programs = new ArrayList(); - public Collection getPrograms() + public List getPrograms() { return programs; } - public void setPrograms( Collection programs ) + public void setPrograms( List programs ) { this.programs = programs; } @@ -109,8 +112,9 @@ public String execute() throws Exception { - programs = programService.getAllPrograms(); - + programs = new ArrayList( programService.getAllPrograms() ); + Collections.sort( programs, new ProgramNameComparator() ); + if ( id == null ) { associations = programStageService.getAllProgramStages(); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2013-02-19 06:54:22 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2013-02-19 08:22:26 +0000 @@ -72,8 +72,4 @@ var i18n_single_event_with_registration = '$encoder.jsEscape( $i18n.getString( "single_event_with_registration" ) , "'")'; var i18n_single_event_without_registration = '$encoder.jsEscape( $i18n.getString( "single_event_without_registration" ) , "'")'; - jQuery(document).ready(function(){ - tableSorter( 'listTable' ); - }); -