=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/GetExcelItemGroupByIdAction.java' --- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/GetExcelItemGroupByIdAction.java 2009-10-27 06:05:22 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/GetExcelItemGroupByIdAction.java 2009-11-09 07:34:00 +0000 @@ -73,9 +73,9 @@ // ------------------------------------------------------------------------- public String execute() throws Exception { - +System.out.println("\n\n\n ==== id = " + id); excelItemGroup = excelItemService.getExcelItemGroup(id); - +System.out.println("\n\n\n ==== excelItemGroup = " + excelItemGroup); return SUCCESS; } } === modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementForCategoryAction.java' --- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementForCategoryAction.java 2009-10-30 09:59:20 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementForCategoryAction.java 2009-11-09 07:34:00 +0000 @@ -96,14 +96,16 @@ // ------------------------------------------- public String execute() throws Exception { + + DataElementGroupOrder dataElementGroupOrder = excelItemService + .getDataElementGroupOrder(id.intValue()); - DataElementGroupOrder dataElementGroupOrder = excelItemService - .getDataElementGroupOrder(id); - List dataElements = new ArrayList(); for (String dataElementId : this.dataElementIds) { - +System.out.println("\n\n === dataElementId = " + dataElementId); +System.out.println("\n\n === dataElementId = " + Integer + .parseInt(dataElementId)); DataElement dataElement = dataElementService.getDataElement(Integer .parseInt(dataElementId)); dataElements.add(dataElement); === modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java' --- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java 2009-10-30 09:59:20 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java 2009-11-09 07:34:00 +0000 @@ -30,17 +30,16 @@ import java.util.List; import org.hisp.dhis.reportexcel.DataElementGroupOrder; +import org.hisp.dhis.reportexcel.action.ActionSupport; import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup; import org.hisp.dhis.reportexcel.excelitem.ExcelItemService; -import com.opensymphony.xwork2.Action; - /** * @author Chau Thu Tran * @version $Id$ */ -public class UpdateSortedDataElementGroupOrderForCategoryAction implements - Action { +public class UpdateSortedDataElementGroupOrderForCategoryAction extends + ActionSupport { // ------------------------------------------- // Dependency // ------------------------------------------- @@ -95,6 +94,8 @@ excelItemService.updateExcelItemGroup(excelItemGroup); + message = i18n.getString("success"); + return SUCCESS; } === 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 2009-11-09 04:18:02 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml 2009-11-09 07:34:00 +0000 @@ -1109,8 +1109,8 @@ scope="prototype"> - + - - /dhis-web-excel-reporting/responseSuccess.vm + + listDataElementGroupOrder.action?id=${id} /dhis-web-excel-reporting/listDataElementGroupByExcelItemGroup.vm /dhis-web-excel-reporting/menu.vm javascript/ui.core.js,javascript/ui.sortable.js, - javascript/excelitemgroups.js,javascript/commons.js + javascript/sortedDataElementGroup.js,javascript/commons.js style/ui.theme.css, style/basic.css, style/style.css @@ -841,7 +841,8 @@ - listDataElementGroupOrderForExcelItemGroup.action?id=${id} + listDataElementGroupOrderForExcelItemGroup.action?id=${id} + /main.vm /dhis-web-excel-reporting/sortDataElementsForCategory.vm /dhis-web-excel-reporting/menu.vm + javascript/sortedDataElementGroup.js style/ui.theme.css,style/basic.css @@ -870,10 +872,10 @@ /dhis-web-excel-reporting/responseSuccess.vm - - - listDataElementGroupOrder.action?id=${excelItemGroupId} + + /dhis-web-excel-reporting/responseSuccess.vm === modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/excelitemgroups.js' --- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/excelitemgroups.js 2009-11-09 04:18:02 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/excelitemgroups.js 2009-11-09 07:34:00 +0000 @@ -176,116 +176,4 @@ } getDataElementsByGroup($("#availableDataElementGroups").val()); },'xml'); -} - -/* -* Add Data Element Group Order -*/ -function submitDataElementGroupOrder(){ - - if($("#name").val()=='') setMessage(i18n_name_is_null); - else{ - selectAllById('dataElementIds'); - document.forms['dataElementGroups'].submit(); - } -} -/* -* Delete Data Element Order -*/ - -function deleteDataElementOrder( id ){ - if(window.confirm(i18n_confirm_delete)){ - $.post("deleteDataElementGroupOrderForCategory.action",{id:id}, function (data){window.location.reload()},'xml'); - } -} - -/* -* Open Update Data Element Order -*/ - -function openUpdateDataElementOrder( id ){ - - $("#dataElementGroupOrderId").val( id ); - $.post("getDataElementGroupOrderForCategory.action",{id:id}, - function(data){ - var listDataElement = document.getElementById('dataElementIds'); - listDataElement.options.length = 0; - data = data.getElementsByTagName('dataElementGroupOrder')[0]; - $("#name").val(data.getElementsByTagName('name')[0].firstChild.nodeValue); - $("#code").val(data.getElementsByTagName('code')[0].firstChild.nodeValue); - var dataElements = data.getElementsByTagName('dataElements')[0].getElementsByTagName('dataElement'); - - for(var i=0;i$encoder.htmlEncode( $group.name ) $encoder.htmlEncode( $group.code ) - $i18n.getString( 'remove' ) + $i18n.getString( 'remove' ) $i18n.getString( 'edit' ) @@ -40,9 +40,9 @@
- + -
+