dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04047
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1341: Function Excel-File Management - Working in process
------------------------------------------------------------
revno: 1341
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-01-26 14:15:52 +0700
message:
Function Excel-File Management - Working in process
removed:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/images/group.jpg
added:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelTemplateList.vm
modified:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/DownloadFileAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/SaveDataElementGroupOrderForCategoryAction.java
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/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml
--
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-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/DownloadFileAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/DownloadFileAction.java 2009-11-13 10:28:52 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/DownloadFileAction.java 2010-01-26 07:15:52 +0000
@@ -92,7 +92,6 @@
public String execute()
throws Exception
{
-
File output = new File( selectionManager.getDownloadFilePath() );
fileName = output.getName();
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/SaveDataElementGroupOrderForCategoryAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/SaveDataElementGroupOrderForCategoryAction.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/SaveDataElementGroupOrderForCategoryAction.java 2010-01-26 07:15:52 +0000
@@ -98,8 +98,6 @@
public String execute() throws Exception {
-System.out.println("\n\n dataElementIds : " + dataElementIds);
-
ExcelItemGroup excelItemGroup = (ExcelItemGroup) excelItemService
.getExcelItemGroup(id);
=== 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-11-09 07:34:00 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementForCategoryAction.java 2010-01-26 07:15:52 +0000
@@ -103,9 +103,7 @@
List<DataElement> dataElements = new ArrayList<DataElement>();
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/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-01-12 06:00:44 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-01-26 07:15:52 +0000
@@ -1240,5 +1240,11 @@
<property name="excelItemService" ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
<property name="statementManager" ref="statementManager" />
</bean>
+
+ <bean id="org.hisp.dhis.reportexcel.filemanager.action.ExcelTemplateListAction"
+ class="org.hisp.dhis.reportexcel.filemanager.action.ExcelTemplateListAction"
+ scope="prototype">
+ <property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
+ </bean>
</beans>
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml 2010-01-18 03:21:24 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml 2010-01-26 07:15:52 +0000
@@ -1211,5 +1211,15 @@
/dhis-web-excel-reporting/responsePeriodColumn.vm
</result>
</action>
+
+ <!-- Period Column -->
+ <action name="excelTemplateList"
+ class="org.hisp.dhis.reportexcel.filemanager.action.ExcelTemplateListAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-excel-reporting/excelTemplateList.vm</param>
+ <param name="menu">/dhis-web-excel-reporting/menu.vm</param>
+ <param name="javascripts">javascript/commons.js,javascript/exceltemplate.js</param>
+ </action>
+
</package>
</struts>
=== added file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelTemplateList.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelTemplateList.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelTemplateList.vm 2010-01-26 07:15:52 +0000
@@ -0,0 +1,101 @@
+<h2>$i18n.getString('excel_template_group')</h2>
+<table width=100%>
+ <tr>
+ <td>
+ $i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues( this.value , 1)" style="width:300px"/>
+ </td>
+ <td align=right>
+ <input type="button" onclick="mode='add'; openAddExcelItemGroup()" value="$i18n.getString('add')" style="width:100px"/>
+ <input type="button" value="$i18n.getString( "cancel" )" onclick="window.location='administration.action'" style="width:100px">
+ </td>
+ </tr>
+</table>
+
+<table width="100%">
+ <tr>
+ <th>$i18n.getString('name')</th>
+ <th width="110px">$i18n.getString('operations')</th>
+ </tr>
+ <tbody id="list">
+ #set( $mark = false )
+ #foreach($templateFile in $templateFiles)
+ <tr #alternate( $mark )>
+ <td>$encoder.htmlEncode( $templateFile.name )</td>
+ <td align="left">
+ <a href="openExcelItemGroupAssociations.action?excelItemGroupId=$excelItemGroup.id" title="$i18n.getString( 'associations' )"><img src="../images/assign.png" alt="$i18n.getString( 'associations' )"></a>
+ <a href="listExcelItems.action?excelItemGroupId=$excelItemGroup.id" title="$i18n.getString( 'excel_item' )"><img src="../images/add_section.png" alt="$i18n.getString( 'excelitem' )"></a>
+ <a href="javascript:deleteExcelItemGroup('$excelItemGroup.id');" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
+ <a href="javascript:mode = 'edit'; openUpdateExcelItemGroup( '$excelItemGroup.id' );" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
+ #if($excelItemGroup.isOrganisationUnitGroupListing())
+ <a href="openUpdateOrgnisationUnitGroupForExcelItemGroup.action?id=$excelItemGroup.id" title="$i18n.getString( 'organisation_unit_group' )"><img src="images/group_1.jpg"/></a>
+ #end
+ #if($excelItemGroup.isCategory())
+ <a href="listDataElementGroupOrderForExcelItemGroup.action?id=$excelItemGroup.id" title="$i18n.getString( 'dataelement_groups' )"><img src="images/group.jpg"/></a>
+ #end
+ <!-- #if($report.isOrganisationUnitGroupListing())
+ <a href="openUpdateOrgnisationUnitGroupListingReport.action?id=$report.id" title="$i18n.getString( 'organisation_unit_group' )"><img src="images/group_1.jpg"/></a>
+ #end
+ #if($report.isCategory())
+ <a href="listDataElementGroupOrder.action?id=$report.id" title="$i18n.getString( 'dataelement_groups' )"><img src="images/group.jpg"/></a>
+
+ #end-->
+
+ </td>
+ </tr>
+
+ #if( $mark )
+ #set( $mark = false )
+ #else
+ #set( $mark = true )
+ #end
+ #end
+ </tbody>
+</table>
+
+<div id="divExcelitemGroup" style="position:fixed;display:none;width:400px;z-index:11;background-color: white;border: medium solid silver;height:100px;padding:20px;">
+ <div id="close" style="position:absolute;top:2px;right:2px;cursor: pointer;color:red;" onclick="hideById('divExcelitemGroup');deleteDivEffect();">[x]</div>
+ <input type="hidden" value="" id="id"/>
+ <table>
+ <tr>
+ <td><label>$i18n.getString('name')<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+ <td><input type="text" id="name" style="width:20em"/></td>
+ </tr>
+ <tr>
+ <td><label>$i18n.getString('report_type')<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+ <td>
+ <select type="text" id="type" name="type" style="min-width:20em">
+ <option value='NORMAL'>$i18n.getString('NORMAL')</option>
+ <option value='CATEGORY'>$i18n.getString('CATEGORY')</option>
+ <!-- <option value='PERIOD_COLUMN_LISTING'>$i18n.getString('PERIOD_COLUMN_LISTING')</option> -->
+ <option value='ORGANIZATION_GROUP_LISTING'>$i18n.getString('ORGANIZATION_GROUP_LISTING')</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><label>$i18n.getString('periodType')<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+ <td>
+ <select type="text" id="periodType" name="periodType" style="min-width:20em">
+ #foreach ( $periodType in $periodTypes )
+ <option value="$periodType.name" #if( $excelitemGroup.periodType.name.equals( $periodType.name ) ) selected="selected" #end>$i18n.getString( $periodType.name )</option>
+ #end
+ </select>
+ </td>
+ </tr>
+
+ </table>
+ <p align="center">
+ <input type="button" value="$i18n.getString('ok')" id="excelitemGroupAddUpdateButton" onClick="validateExcelItemGroup()"/>
+ <input type="button" value="$i18n.getString('cancel')" onclick="hideById('divExcelitemGroup');deleteDivEffect();"/>
+ </p>
+</div>
+<script language="javascript">
+ var mode = 'add';
+ var i18n_confirm_delete = '$encoder.jsEscape($i18n.getString( 'confirm_delete' ) , "'")';
+
+</script>
+
+<span id="message" style="top:100px;right:5px;position:fixed;width:200px;z-index:10002" onclick="javascript:hideById(this.id);"></span>
+
+
+
+
=== removed file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/images/group.jpg'
Binary files dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/images/group.jpg 2009-09-14 03:19:36 +0000 and dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/images/group.jpg 1970-01-01 00:00:00 +0000 differ