dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21419
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10135: Display message Aggregate Successfully instead of preview page when to click Aggregate and Save b...
------------------------------------------------------------
revno: 10135
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-03-11 20:09:11 +0700
message:
Display message Aggregate Successfully instead of preview page when to click Aggregate and Save button in Manual Person Aggregate.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js
--
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-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-03-11 02:53:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-03-11 13:09:11 +0000
@@ -596,4 +596,5 @@
program_stages = Program stages
aggregate_and_save = Aggregate and Save
preview = Preview
-confirm_data_values_aggregated_saved_into_database_directly = Are you sure you want to save data values aggregated into database directly ?
\ No newline at end of file
+confirm_data_values_aggregated_saved_into_database_directly = Are you sure you want to save data values aggregated into database directly ?
+aggregate_successfully = Aggregate successfully
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2013-03-11 06:04:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2013-03-11 13:09:11 +0000
@@ -418,7 +418,6 @@
<result name="success" type="velocity">/content.vm</result>
<param name="page">/dhis-web-caseentry/caseAggregationResult.vm</param>
<param name="menu">/dhis-web-caseentry/caseAggregationMenu.vm</param>
- <param name="javascripts">javascript/caseagg.js</param>
<param name="requiredAuthorities">F_PATIENT_AGGREGATION</param>
</action>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm 2013-03-11 02:53:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm 2013-03-11 13:09:11 +0000
@@ -2,6 +2,7 @@
var i18n_greater_then_from_date = '$encoder.jsEscape( $i18n.getString( "greater_then_from_date" ) , "'" )';
var i18n_please_select = '$encoder.jsEscape( $i18n.getString( "please_select" ) , "'" )';
var i18n_confirm_data_values_aggregated_saved_into_database_directly = '$encoder.jsEscape( $i18n.getString( "confirm_data_values_aggregated_saved_into_database_directly" ) , "'" )';
+ var i18n_aggregate_successfully = '$encoder.jsEscape( $i18n.getString( "aggregate_successfully" ) , "'" )';
var isSubmit = true;
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm 2013-03-10 15:03:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm 2013-03-11 13:09:11 +0000
@@ -2,10 +2,8 @@
#if($orgunits.size()>0)
<div>
<input type="button" value="$i18n.getString( 'back' )" onclick="backBtnOnClick();" style="width:10em">
- #if($autoSave=='false')
<input type='button' value="$i18n.getString( 'save_selected_values' )" onclick='saveAggregateDataValues( false )' >
<input type='button' value="$i18n.getString( 'save_all_values' )" onclick='saveAggregateDataValues( true )' >
- #end
</div>
<p></p>
@@ -26,11 +24,7 @@
#set( $dataValues = $mapDataValues.get( $key ) )
<table class="formSection mainPageTable hidden" id='$periodDiv'>
<col width="40">
-
- #if($autoSave=='false')
<col>
- #end
-
<col>
<col>
<tbody>
@@ -38,11 +32,7 @@
#set($no = 1)
<tr>
<th>#</th>
-
- #if($autoSave=='false')
<th><input type='checkbox' onchange="toogleAllCheckBoxes( '$periodDiv', this.checked );"></th>
- #end
-
<th>$i18n.getString('name')</th>
<th>$i18n.getString('value')</th>
<th>$i18n.getString('status')</th>
@@ -52,14 +42,10 @@
#set( $statusKey = $key + '-' + $dataValue.dataElement.id )
<tr #alternate( $mark )>
<td>$no</td>
-
- #if($autoSave=='false')
<td>
#set( $item=$dataValue.dataElement.id + '_' + $dataValue.optionCombo.id + '_' + $period.periodType.name + '_' + $format.formatDate($period.startDate) + '_' + $orgunit.id + '_' + $dataValue.value )
<input type='checkbox' name='aggregateValues' value='$item'>
</td>
- #end
-
<td>$dataValue.dataElement.name</td>
<td>$dataValue.value</td>
<td>$!mapStatusValues.get( $statusKey )</td>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js 2013-03-11 02:53:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js 2013-03-11 13:09:11 +0000
@@ -48,13 +48,14 @@
}
else
{
- runAggregate(autoSave);
+ previewAggregate(autoSave);
}
}
function runAggregate(autoSave)
{
hideById('caseAggregationForm');
+ hideById('caseAggregationResult');
showLoader();
$('#caseAggregationResult').load("caseAggregationResult.action",
@@ -67,6 +68,26 @@
}
, function(){
$( "#loaderDiv" ).hide();
+ showById('caseAggregationForm');
+ setMessage(i18n_aggregate_successfully);
+ });
+}
+
+function previewAggregate(autoSave)
+{
+ hideById('caseAggregationForm');
+ hideById('message');
+ showLoader();
+ $('#caseAggregationResult').load("caseAggregationResult.action",
+ {
+ facilityLB: getFieldValue('facilityLB'),
+ dataSetId: getFieldValue('dataSetId'),
+ startDate: getFieldValue('startDate'),
+ endDate: getFieldValue('endDate'),
+ autoSave: getFieldValue('autoSave')
+ }
+ , function(){
+ $( "#loaderDiv" ).hide();
showById('caseAggregationResult');
});
}