dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #03037
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1023: invisible not yet finish functions in excel reporting
------------------------------------------------------------
revno: 1023
committer: Tran Thanh Tri <Tran Thanh Tri@TranThanhTri-PC>
branch nick: trunk
timestamp: Wed 2009-11-11 12:46:50 +0700
message:
invisible not yet finish functions in excel reporting
modified:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module.properties
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module_vi_VN.properties
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelitemgroupassociation.vm
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelitemgroups.vm
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelitems.vm
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/importDataParams.vm
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/commons.js
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportItems.vm
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportassociation.vm
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reports.vm
--
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/resources/org/hisp/dhis/reportexcel/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module.properties 2009-11-11 04:15:09 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module.properties 2009-11-11 05:46:50 +0000
@@ -160,5 +160,6 @@
excelitem_group = Excel item group
edit = Edit
copy_items = Copy items
+filter_by_name = Filter by name
period_type = Period type
-import_data = Import data
\ No newline at end of file
+import_data = Import data
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module_vi_VN.properties'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module_vi_VN.properties 2009-11-11 04:15:09 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module_vi_VN.properties 2009-11-11 05:46:50 +0000
@@ -170,9 +170,10 @@
choose_excelItem = Xin ch\u1ecdn c\u00e1c gi\u00e1 tr\u1ecb c\u1ea7n import
copy_items_duplicated = ReportItem b\u1ecb tr\u00f9ng l\u1eb7p, kh\u00f4ng th\u1ec3 sao ch\u00e9p !
copy_successful = Sao ch\u00e9p th\u00e0nh c\u00f4ng !
+filter_by_name = T\u00ecm theo t\u00ean
copy_selected_item_to_excel_item = Sao ch\u00e9p report item cho excel item
excelitem_group = Nh\u00f3m excel item
edit = HI\u1ec7u ch\u1ec9nh
copy_items = Sao ch\u00e9p item
period_type = Lo\u1ea1i th\u1eddi \u0111i\u1ec3m
-import_data = Import d\u1eef li\u1ec7u
\ No newline at end of file
+import_data = Import d\u1eef li\u1ec7u
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelitemgroupassociation.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelitemgroupassociation.vm 2009-10-27 06:05:22 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelitemgroupassociation.vm 2009-11-11 05:46:50 +0000
@@ -13,13 +13,12 @@
<div id="selectionTree" style="width:50em;height:30em;overflow:auto;border:1px solid #cccccc"></div>
<span id="message"></span>
<p> <input type="submit" id="submitButton" value="$i18n.getString( "save" )" style="width:10em">
- <input type="button" onclick="window.location.href='index.action'" value="$i18n.getString( "cancel" )" style="width:10em"></p>
+ <input type="button" onclick="window.location.href='listAllExcelItemGroup.action'" value="$i18n.getString( "cancel" )" style="width:10em"></p>
</form>
<script type="text/javascript">
var i18n_loading = '$encoder.jsEncode( $i18n.getString( "loading" ) )';
-
selectionTreeSelection.setMultipleSelectionAllowed( true );
selectionTreeSelection.setOnSelectFunction( treeClicked );
selectionTreeSelection.setListenerFunction( selectCompleted );
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelitemgroups.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelitemgroups.vm 2009-11-11 04:15:09 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelitemgroups.vm 2009-11-11 05:46:50 +0000
@@ -1,14 +1,24 @@
<h2>$i18n.getString('excelitem_group')</h2>
-<p><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"></p>
+<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>$i18n.getString('type')</th>
<th>$i18n.getString('period_type')</th>
- <th width="200px">$i18n.getString('operations')</th>
+ <th width="110px">$i18n.getString('operations')</th>
</tr>
+ <tbody id="list">
#set( $mark = false )
#foreach($excelItemGroup in $excelItemGroups)
<tr #alternate( $mark )>
@@ -43,6 +53,7 @@
#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;">
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelitems.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelitems.vm 2009-11-11 04:15:09 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelitems.vm 2009-11-11 05:46:50 +0000
@@ -2,10 +2,9 @@
<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">
-
+<td align="right">
<input type="button" onclick="mode='add'; openAddExcelItem()" value="$i18n.getString('add')" style="width:100px"/>
<input type="button" onclick="window.location='listAllExcelItemGroup.action'" value="$i18n.getString('cancel')" style="width:100px"/>
</td>
@@ -21,6 +20,7 @@
<th width="70px">$i18n.getString('operations')</th>
</tr>
+ <tbody id="list">
#set( $mark = false )
#foreach($excelItem in $excelItems)
<tr #alternate( $mark )>
@@ -40,6 +40,7 @@
#set( $mark = true )
#end
#end
+ </tbody>
</table>
<script type="text/javascript">
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/importDataParams.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/importDataParams.vm 2009-11-11 04:15:09 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/importDataParams.vm 2009-11-11 05:46:50 +0000
@@ -32,8 +32,8 @@
<tr>
<td>$i18n.getString( 'period' )</td>
<td>
- <input type="button" value="<<" id="lastYear" name="lastYear" onclick="lastPeriod();" />
- <input type="button" value=">>" id="nextYear" name="nextYear" onclick="nextPeriod()" />
+ <input type="button" value="<<" id="lastYear" name="lastYear" onclick="lastPeriod();" #if(!$!fileExcel) disabled #end/>
+ <input type="button" value=">>" id="nextYear" name="nextYear" onclick="nextPeriod()" #if(!$!fileExcel) disabled #end />
<select name="period" id="period" style="min-width:20em; width:100%" type="text" disabled>
</select></td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/commons.js 2009-09-14 15:29:21 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/commons.js 2009-11-11 05:46:50 +0000
@@ -26,4 +26,27 @@
div.style.left = y +"px";
this.show();
}
-});
\ No newline at end of file
+});
+
+function filterValues( filter, columnIndex )
+{
+ var list = document.getElementById( 'list' );
+
+ var rows = list.getElementsByTagName( 'tr' );
+
+ for ( var i = 0; i < rows.length; ++i )
+ {
+ var cell = rows[i].getElementsByTagName( 'td' )[columnIndex-1];
+
+ var value = cell.firstChild.nodeValue;
+
+ if ( value.toLowerCase().indexOf( filter.toLowerCase() ) != -1 )
+ {
+ rows[i].style.display = 'table-row';
+ }
+ else
+ {
+ rows[i].style.display = 'none';
+ }
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportItems.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportItems.vm 2009-11-10 06:39:31 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportItems.vm 2009-11-11 05:46:50 +0000
@@ -1,20 +1,21 @@
<h2>$!encoder.htmlEncode($!reportExcel.name)</h2>
<table width="100%">
-<tr>
+<tr style="vertical-align:bottom;">
<td>
- <input type="button" onclick="copySelectedItem()" value="$i18n.getString('copy_selected_item_to')"/>
- <input type="button" onclick="copySelectedExcelItemForm()" value="$i18n.getString('copy_selected_item_to_excel_item')"/>
-</td>
-<td align="right">
+ $i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues( this.value , 2)" style="width:300px"/>
$i18n.getString('filter_by_sheet')
<select id="sheetNoFilter" onchange="getReportItemBySheet();">
<option value="" >--- ALL ---</option>
#foreach($sheet in $sheets)
<option value="$sheet" #if($sheetNo==$sheet) selected #end >$sheet</option>
#end
- </select>
- <input type="button" onclick="openAddReportItemForm()" value="$i18n.getString('add')" style="width:100px"/>
- <input type="button" onclick="window.location='listReportExcel.action'" value="$i18n.getString('cancel')" style="width:100px"/>
+ </select>
+</td>
+<td align="right">
+ <input type="button" onclick="openAddReportItemForm()" value="$i18n.getString('add')" style="width:150px"/><br>
+ <input type="button" onclick="window.location='listReportExcel.action'" value="$i18n.getString('cancel')" style="width:150px"/><br>
+ <input type="button" onclick="copySelectedItem()" value="$i18n.getString('copy_selected_item_to')" style="width:150px"/><br>
+ <input type="button" onclick="copySelectedExcelItemForm()" value="$i18n.getString('copy_selected_item_to_excel_item')" style="width:150px"/>
</td>
</tr>
</table>
@@ -30,6 +31,7 @@
<th>$i18n.getString('sheet_no')</th>
<th width="70px">$i18n.getString('operations')</th>
</tr>
+ <tbody id="list">
#set( $mark = false )
#foreach($reportItem in $reportItems)
<tr #alternate( $mark )>
@@ -52,6 +54,7 @@
#set( $mark = true )
#end
#end
+ </tbody>
</table>
<script type="text/javascript">
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportassociation.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportassociation.vm 2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportassociation.vm 2009-11-11 05:46:50 +0000
@@ -13,7 +13,7 @@
<div id="selectionTree" style="width:50em;height:30em;overflow:auto;border:1px solid #cccccc"></div>
<span id="message"></span>
<p> <input type="submit" id="submitButton" value="$i18n.getString( "save" )" style="width:10em">
- <input type="button" onclick="window.location.href='index.action'" value="$i18n.getString( "cancel" )" style="width:10em"></p>
+ <input type="button" onclick="window.location.href='listReportExcel.action'" value="$i18n.getString( "cancel" )" style="width:10em"></p>
</form>
<script type="text/javascript">
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reports.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reports.vm 2009-10-26 15:39:29 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reports.vm 2009-11-11 05:46:50 +0000
@@ -1,21 +1,30 @@
<h2>$i18n.getString('reports')</h2>
-<p>
-<form name="fileName" action="uploadBackupFile.action" method="post" enctype="multipart/form-data">
- <input type="button" onclick="openAddReportExcel()" value="$i18n.getString('add')" style="width:100px"/>
- <input type="button" value="$i18n.getString( "cancel" )" onclick="window.location='administration.action'" style="width:100px">
- <input type="file" id="upload" name="upload"/>
- <input name="submit" type="submit" value="$i18n.getString( 'Upload' )" />
- <input type="button" value="$i18n.getString( 'import' )" onclick="restoreReportExcel()"/>
-</form>
-</p>
-
-<table width="100%">
+<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>
+ <form name="fileName" action="uploadBackupFile.action" method="post" enctype="multipart/form-data">
+ <input type="button" onclick="openAddReportExcel()" value="$i18n.getString('add')" style="width:100px"/>
+ <input type="button" value="$i18n.getString( "cancel" )" onclick="window.location='administration.action'" style="width:100px">
+ <!--
+ <input type="file" id="upload" name="upload"/>
+ <input name="submit" type="submit" value="$i18n.getString( 'Upload' )" />
+ <input type="button" value="$i18n.getString( 'import' )" onclick="restoreReportExcel()"/>
+ -->
+ </form>
+ </td>
+ </tr>
+</table>
+<table width="100%">
<tr>
<th>$i18n.getString('name')</th>
<th>$i18n.getString('report_type')</th>
<th>$i18n.getString('excel_template')</th>
- <th width="200px">$i18n.getString('operations')</th>
+ <th width="150px">$i18n.getString('operations')</th>
</tr>
+ <tbody id="list">
#set( $mark = false )
#foreach($report in $reports)
<tr #alternate( $mark )>
@@ -27,7 +36,9 @@
<a href="listReportExcelItemAction.action?reportId=$report.id" title="$i18n.getString( 'report_item' )"><img src="../images/add_section.png" alt="$i18n.getString( 'report_item' )"></a>
<a href="javascript:deleteReportExcel($report.id);" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
<a href="javascript:openUpdateReportReportExcel( $report.id );" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
+ <!--
<a href="javascript:backupReportExcel( $report.id );" title="$i18n.getString( 'backup' )"><img src="../images/open.png" alt="$i18n.getString( 'backup' )"></a>
+ -->
#if($report.isOrganisationUnitGroupListing())
<a href="openUpdateOrgnisationUnitGroupListingReport.action?id=$report.id" title="$i18n.getString( 'organisation_unit_group' )"><img src="images/group_1.jpg"/></a>
#end
@@ -44,6 +55,7 @@
#set( $mark = true )
#end
#end
+ </tbody>
</table>
<div id="dataElementGroups" style="position:fixed;display:none;width:600px;z-index:10001;background-color: white;border: medium solid silver;height:250px;padding:20px;">
<div id="close" style="position:absolute;top:2px;right:2px;cursor: pointer;color:red;" onclick="hideById('dataElementGroups');deleteDivEffect();">[x]</div>