dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17251
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6803: local vn - Fixed GUI for creating export report and export item.
------------------------------------------------------------
revno: 6803
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-04-28 23:58:08 +0700
message:
local vn - Fixed GUI for creating export report and export item.
modified:
local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/AddExportReportAction.java
local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module.properties
local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module_vi_VN.properties
local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportItems.js
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/addExportItemForm.vm
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/addExportReportForm.vm
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/categoryVerticalExpressionBuilderForm.vm
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/dataelementExpressionBuilderForm.vm
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/excelFormulaExpressionBuilderForm.vm
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/indicatorExpressionBuilderForm.vm
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/updateExportItemForm.vm
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/updateExportReportForm.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 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/AddExportReportAction.java'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/AddExportReportAction.java 2012-04-16 03:00:30 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/AddExportReportAction.java 2012-04-28 16:58:08 +0000
@@ -33,6 +33,7 @@
import org.hisp.dhis.reportsheet.ExportReportNormal;
import org.hisp.dhis.reportsheet.ExportReportOrganizationGroupListing;
import org.hisp.dhis.reportsheet.ExportReportPeriodColumnListing;
+import org.hisp.dhis.reportsheet.ExportReportVerticalCategory;
import com.opensymphony.xwork2.Action;
@@ -144,6 +145,11 @@
exportReport = new ExportReportCategory();
}
+ if ( exportReportType.equalsIgnoreCase( ExportReport.TYPE.CATEGORY_VERTICAL ) )
+ {
+ exportReport = new ExportReportVerticalCategory();
+ }
+
if ( exportReportType.equalsIgnoreCase( ExportReport.TYPE.ORGANIZATION_GROUP_LISTING ) )
{
exportReport = new ExportReportOrganizationGroupListing();
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module.properties'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module.properties 2012-04-25 09:59:24 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module.properties 2012-04-28 16:58:08 +0000
@@ -10,6 +10,7 @@
ORGANIZATION_GROUP_LISTING = Organization Unit Listing
NORMAL = Normal
CATEGORY = Category
+CATEGORY_VERTICAL = Category Vertical
ATTRIBUTE = Attribute
export_items = Export Items
period_postion_row = Period Position Row
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module_vi_VN.properties'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module_vi_VN.properties 2012-04-25 15:07:51 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module_vi_VN.properties 2012-04-28 16:58:08 +0000
@@ -230,6 +230,7 @@
file_type_not_supported=Lo\u1ea1i t\u1eadp tin n\u00e0y kh\u00f4ng \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3
confirm_update_system=B\u1ea1n c\u00f3 mu\u1ed1n c\u1eadp nh\u1eadt l\u1ea1i H\u1ec7 th\u1ed1ng b\u00e1o c\u00e1o?
CATEGORY=Ph\u00e2n lo\u1ea1i
+CATEGORY_VERTICAL=Ph\u00e2n lo\u1ea1i theo h\u00e0ng d\u1ecdc
the_specified_report_is_not_exist=C\u1ea3nh b\u00e1o! B\u00e1o c\u00e1o n\u00e0y hi\u1ec7n t\u1ea1i kh\u00f4ng c\u00f2n hi\u1ec7u l\u1ef1c/t\u1ed3n t\u1ea1i.
yealy=H\u1eb1ng n\u0103m
export_reports=B\u00e1o c\u00e1o Xu\u1ea5t
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml 2012-04-26 19:11:23 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml 2012-04-28 16:58:08 +0000
@@ -116,8 +116,7 @@
<action name="addExportReportForm"
class="org.hisp.dhis.reportsheet.filemanager.action.ExcelTemplateListAction">
<result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-spreadsheet-reporting/report/addExportReportForm.vm</param>
- <param name="javascripts">javascript/exportReports.js</param>
+ <param name="page">/dhis-web-spreadsheet-reporting/report/addExportReportForm.vm</param>
<param name="requiredAuthorities">F_EXCEL_REPORT_ADMINISTRATION</param>
</action>
@@ -148,8 +147,7 @@
class="org.hisp.dhis.reportsheet.exportreport.action.ListExportReportAction">
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-spreadsheet-reporting/report/exportReports.vm</param>
- <param name="menu">/dhis-web-spreadsheet-reporting/menu.vm</param>
- <param name="javascripts">javascript/exportReports.js</param>
+ <param name="menu">/dhis-web-spreadsheet-reporting/menu.vm</param>
<param name="requiredAuthorities">F_EXCEL_REPORT_ADMINISTRATION</param>
</action>
@@ -168,8 +166,7 @@
<action name="updateExportReportForm"
class="org.hisp.dhis.reportsheet.filemanager.action.ExcelTemplateListAction">
<result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-spreadsheet-reporting/report/updateExportReportForm.vm</param>
- <param name="javascripts">javascript/exportReports.js</param>
+ <param name="page">/dhis-web-spreadsheet-reporting/report/updateExportReportForm.vm</param>
<param name="requiredAuthorities">F_EXCEL_REPORT_ADMINISTRATION</param>
</action>
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportItems.js'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportItems.js 2012-04-26 18:25:07 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportItems.js 2012-04-28 16:58:08 +0000
@@ -98,11 +98,11 @@
setFieldValue( 'attributevalue [id=formula]', getFieldValue( 'attributevalue [id=formula]' ) + expression );
}
else if ( category ) {
- expression = "[*." + getFieldValue( "dataelement [id=elementSelect]" )+ "]";
+ expression = "[*." + getFieldValue( "dataelement [id=elementSelect]" ) + "]";
setFieldValue( 'dataelement [id=formula]', getFieldValue( 'dataelement [id=formula]' ) + expression );
}
else if ( categoryVertical ) {
- expression = "[*." + getFieldValue( "categoryoption [id=elementSelect]" )+ "]";
+ expression = "[" + getFieldValue( "categoryoption [id=elementSelect]" ) + ".*]";
setFieldValue( 'categoryoption [id=formula]', getFieldValue( 'categoryoption [id=formula]' ) + expression );
}
else {
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/addExportItemForm.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/addExportItemForm.vm 2012-04-26 18:25:07 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/addExportItemForm.vm 2012-04-28 16:58:08 +0000
@@ -9,7 +9,7 @@
var attribute = $!exportReport.isAttribute();
var category = $!exportReport.isCategory();
var categoryVertical = $!exportReport.isCategoryVertical();
-
+ var i18n_expression = '$encoder.jsEscape( $i18n.getString( "expression" ) , "'")';
</script>
<h3>$i18n.getString( 'add_export_item' )</h3>
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/addExportReportForm.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/addExportReportForm.vm 2012-04-16 03:00:30 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/addExportReportForm.vm 2012-04-28 16:58:08 +0000
@@ -46,11 +46,9 @@
<td><label>$i18n.getString('export_report_type')<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td>
<select name="exportReportType" style="min-width:20em">
- <option value='NORMAL'>$i18n.getString('NORMAL')</option>
- <option value='ATTRIBUTE'>$i18n.getString('ATTRIBUTE')</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>
+ #foreach( $type in $reportTypes )
+ <option value='$type'>$i18n.getString( $type )</option>
+ #end
</select>
</td>
</tr>
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/categoryVerticalExpressionBuilderForm.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/categoryVerticalExpressionBuilderForm.vm 2012-04-26 18:25:07 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/categoryVerticalExpressionBuilderForm.vm 2012-04-28 16:58:08 +0000
@@ -30,7 +30,7 @@
<textarea id="formula" name="expression" cols="40" rows="5" class="{validate:{required:true}}"></textarea><br/>
</td>
<td>
- <select id="groupSelect" style="width:500px" onchange="dataDictionary.loadDataElementsByGroup( this.value, 'categoryoption select[id=elementSelect]' )"></select>
+ <select id="groupSelect" style="width:500px" onchange="dataDictionary.loadDataElementsByGroup( this.value, '#categoryoption select[id=elementSelect]' )"></select>
<select id="elementSelect" size="15" style="width:500px;" ondblclick="insertExpression()"></select>
</td>
</tr>
@@ -56,8 +56,8 @@
<script>
function coExpressionBuilderForm()
{
- dataDictionary.loadDataElementGroups( "categoryoption select[id=groupSelect]" );
-
+ dataDictionary.loadDataElementGroups( "#categoryoption select[id=groupSelect]" );
+
setFieldValue( 'categoryoption textarea[id=formula]', getFieldValue( 'expression' ) );
getExpression();
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/dataelementExpressionBuilderForm.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/dataelementExpressionBuilderForm.vm 2012-04-25 09:59:24 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/dataelementExpressionBuilderForm.vm 2012-04-28 16:58:08 +0000
@@ -1,4 +1,4 @@
-<script>
+<script type="text/javascript">
jQuery(document).ready(function(){
deExpressionValidator = validation( 'dataelement-form', function(){
@@ -16,8 +16,7 @@
var deExpressionValidator = null;
var deExpressionDialog = null;
- var i18n_no_group_order_created_for_category = '$encoder.jsEscape( $i18n.getString( "no_group_order_created_for_category" ) , "'")';;
-
+ var i18n_no_group_order_created_for_category = '$encoder.jsEscape( $i18n.getString( "no_group_order_created_for_category" ) , "'" )';
</script>
<div id="dataelement" style="display:none">
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/excelFormulaExpressionBuilderForm.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/excelFormulaExpressionBuilderForm.vm 2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/excelFormulaExpressionBuilderForm.vm 2012-04-28 16:58:08 +0000
@@ -5,6 +5,7 @@
});
var excelFormulaDialog = null;
+ var i18n_expression = '$encoder.jsEscape( $i18n.getString( "expression" ) , "'")';
</script>
<div id="excelformula">
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/indicatorExpressionBuilderForm.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/indicatorExpressionBuilderForm.vm 2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/indicatorExpressionBuilderForm.vm 2012-04-28 16:58:08 +0000
@@ -5,7 +5,6 @@
});
var inExpressionDialog = null;
- var i18n_expression = '$encoder.jsEscape( $i18n.getString( "expression" ) , "'")';
</script>
<div id="indicator">
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/updateExportItemForm.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/updateExportItemForm.vm 2012-04-26 18:25:07 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/updateExportItemForm.vm 2012-04-28 16:58:08 +0000
@@ -9,7 +9,7 @@
var attribute = $!exportReport.isAttribute();
var category = $!exportReport.isCategory();
var categoryVertical = $!exportReport.isCategoryVertical();
-
+ var i18n_expression = '$encoder.jsEscape( $i18n.getString( "expression" ) , "'")';
</script>
<h3>$i18n.getString( 'update_export_item' )</h3>
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/updateExportReportForm.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/updateExportReportForm.vm 2012-03-29 10:05:35 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/updateExportReportForm.vm 2012-04-28 16:58:08 +0000
@@ -51,7 +51,7 @@
<td>
<select name="exportReportType" style="min-width:20em" disabled="true">
#foreach( $type in $reportTypes )
- <option value='$type' #if( $exportReport.getReportType()==$type) selected="selected" #end>$i18n.getString($type)</option>
+ <option value='$type' #if( $exportReport.getReportType()==$type) selected="selected" #end>$i18n.getString( $type )</option>
#end
</select>
</td>