=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/ListAllExcelItemGroupAction.java' --- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/ListAllExcelItemGroupAction.java 2010-02-22 06:15:52 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/ListAllExcelItemGroupAction.java 2010-03-05 08:27:33 +0000 @@ -28,7 +28,6 @@ */ import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.List; === modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/ValidateUploadExcelTemplate.java' --- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/ValidateUploadExcelTemplate.java 2010-03-04 08:29:37 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/ValidateUploadExcelTemplate.java 2010-03-05 08:27:33 +0000 @@ -64,8 +64,6 @@ private String uploadFileName; // The uploaded file name - private String fileCaption;// The caption of the file entered by user - private String message; private I18n i18n; === modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/GetImportingParamsAction.java' --- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/GetImportingParamsAction.java 2009-12-03 08:35:53 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/GetImportingParamsAction.java 2010-03-05 08:27:33 +0000 @@ -31,7 +31,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.Comparator; import java.util.List; import org.hisp.dhis.organisationunit.OrganisationUnit; @@ -39,7 +38,9 @@ import org.hisp.dhis.reportexcel.action.ActionSupport; import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup; import org.hisp.dhis.reportexcel.excelitem.ExcelItemService; +import org.hisp.dhis.reportexcel.excelitem.comparator.ExcelItemGroupComparator; import org.hisp.dhis.reportexcel.state.SelectionManager; +import org.hisp.dhis.user.CurrentUserService; /** * @author Chau Thu Tran @@ -59,6 +60,8 @@ private SelectionManager selectionManager; + private CurrentUserService currentUserService; + // ------------------------------------------------------------------------- // Inputs && Outputs // ------------------------------------------------------------------------- @@ -76,6 +79,11 @@ this.selectionManager = selectionManager; } + public void setCurrentUserService( CurrentUserService currentUserService ) + { + this.currentUserService = currentUserService; + } + public void setExcelItemService( ExcelItemService excelItemService ) { @@ -94,11 +102,6 @@ return organisationUnit; } - public Collection getExcelItemGroups() - { - return excelItemGroups; - } - private File fileExcel; public File getFileExcel() @@ -142,18 +145,7 @@ // Load and sort ExcelItemGroups // --------------------------------------------------------------------- - excelItemGroups = new ArrayList( excelItemService - .getExcelItemGroupsByOrganisationUnit( organisationUnit ) ); - - Collections.sort( excelItemGroups, new Comparator() - { - - @Override - public int compare( ExcelItemGroup arg0, ExcelItemGroup arg1 ) - { - return arg0.getName().compareTo( arg1.getName() ); - } - } ); + excelItemGroups = new ArrayList( excelItemService.getExcelItemGroups( organisationUnit ) ); return SUCCESS; } === modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/UploadExcelFileAction.java' --- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/UploadExcelFileAction.java 2009-11-13 10:28:52 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/UploadExcelFileAction.java 2010-03-05 08:27:33 +0000 @@ -77,6 +77,10 @@ { this.upload = upload; } + + // ------------------------------------------------------------------------- + // Action implementation + // ------------------------------------------------------------------------- public String execute() throws Exception === modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/ViewDataFlowAction.java' --- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/ViewDataFlowAction.java 2009-11-13 10:28:52 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/ViewDataFlowAction.java 2010-03-05 08:27:33 +0000 @@ -29,12 +29,18 @@ import java.io.File; import java.util.ArrayList; import java.util.Collections; +import java.util.Set; +import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.reportexcel.excelitem.ExcelItem; import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup; import org.hisp.dhis.reportexcel.excelitem.ExcelItemService; import org.hisp.dhis.reportexcel.excelitem.comparator.ExcelItemComparator; import org.hisp.dhis.reportexcel.state.SelectionManager; +import org.hisp.dhis.user.CurrentUserService; +import org.hisp.dhis.user.UserAuthorityGroup; +import org.hisp.dhis.user.UserCredentials; +import org.hisp.dhis.user.UserStore; import com.opensymphony.xwork2.Action; @@ -111,13 +117,11 @@ upload = new File( selectionManager.getUploadFilePath() ); excelItemGroup = excelItemService.getExcelItemGroup( excelItemGroupId ); - excelItems = new ArrayList( excelItemGroup.getExcelItems() ); - + Collections.sort( excelItems, new ExcelItemComparator() ); return excelItemGroup.getType(); } - } === modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-03-04 05:58:44 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-03-05 08:27:33 +0000 @@ -944,6 +944,24 @@ ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" /> + + + + + + + + + + @@ -1259,8 +1277,7 @@ id="org.hisp.dhis.reportexcel.filemanager.action.ExcelTemplateListAction" class="org.hisp.dhis.reportexcel.filemanager.action.ExcelTemplateListAction" scope="prototype"> - + - + - + - + - + - + + + + /dhis-web-excel-reporting/responseSuccess.vm + + /dhis-web-excel-reporting/responseError.vm + + getImportingParams.action @@ -1061,7 +1069,7 @@ /dhis-web-excel-reporting/menuWithTree.vm 220 ../dhis-web-commons/ouwt/ouwt.js,javascript/export.js, - javascript/commons.js,javascript/imports.js + javascript/commons.js,javascript/imports.js, javascript/ajaxfileupload.js style/style.css === modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menu.vm' --- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menu.vm 2010-02-24 17:47:59 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menu.vm 2010-03-05 08:27:33 +0000 @@ -4,10 +4,10 @@ \ No newline at end of file + +