dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25517
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12683: Validation analysis UI. Js formatting. Fixed annoying page load when returning from results.
------------------------------------------------------------
revno: 12683
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-10-15 16:22:12 +0200
message:
Validation analysis UI. Js formatting. Fixed annoying page load when returning from results.
modified:
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/runValidation.js
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/viewValidationResultForm.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-validationrule/src/main/webapp/dhis-web-validationrule/javascript/runValidation.js'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/runValidation.js 2013-04-30 08:31:58 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/runValidation.js 2013-10-15 14:22:12 +0000
@@ -16,8 +16,13 @@
aggregate = $( '#aggregate' ).val();
validationRuleGroupId = $( '#validationRuleGroupId' ).val();
- $.getJSON( 'validateRunValidation.action',
- { startDate:startDate, endDate:endDate, aggregate:aggregate }, function( json )
+ $.getJSON( 'validateRunValidation.action',
+ {
+ startDate:startDate,
+ endDate:endDate,
+ aggregate:aggregate
+ },
+ function( json )
{
if ( json.response == 'success' )
{
@@ -26,8 +31,15 @@
setWaitMessage( i18n_analysing_please_wait );
$.get( 'runValidationAction.action',
- { organisationUnitId:organisationUnitId, startDate:startDate, endDate:endDate, validationRuleGroupId:validationRuleGroupId, aggregate:aggregate }, function( data )
+ {
+ organisationUnitId:organisationUnitId,
+ startDate:startDate, endDate:endDate,
+ validationRuleGroupId:validationRuleGroupId,
+ aggregate:aggregate
+ },
+ function( data )
{
+ hideMessage();
$( 'div#analysisInput' ).hide();
$( 'div#analysisResult' ).show();
$( 'div#analysisResult' ).html( data );
@@ -45,6 +57,12 @@
return false;
}
+function displayAnalysisInput()
+{
+ $( 'div#analysisInput' ).show();
+ $( 'div#analysisResult' ).empty().hide();
+}
+
function displayValidationDetailsDialog()
{
$( '#validationResultDetailsDiv' ).dialog( {
@@ -57,9 +75,13 @@
function viewValidationResultDetails( validationRuleId, sourceId, periodId )
{
- $( '#validationResultDetailsDiv' ).load( 'viewValidationResultDetails.action', {
- validationRuleId: validationRuleId, sourceId: sourceId, periodId: periodId },
- displayValidationDetailsDialog
+ $( '#validationResultDetailsDiv' ).load( 'viewValidationResultDetails.action',
+ {
+ validationRuleId: validationRuleId,
+ sourceId: sourceId,
+ periodId: periodId
+ },
+ displayValidationDetailsDialog
);
}
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/viewValidationResultForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/viewValidationResultForm.vm 2013-10-08 19:10:40 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/viewValidationResultForm.vm 2013-10-15 14:22:12 +0000
@@ -46,7 +46,7 @@
<td>$i18n.getString( "end_date" ):</td>
<td>$endDate</td>
<td><input type="button" value="$i18n.getString( 'get_report_as_csv' )" style="width:180px" onclick="exportValidationResult( 'csv' )"></td>
- <td><input name="button" type="button" style="width:180px" onclick="window.location.href='showRunValidationForm.action'" value="$i18n.getString( 'done' )"></td>
+ <td><input name="button" type="button" style="width:180px" onclick="displayAnalysisInput()" value="$i18n.getString( 'done' )"></td>
</tr>
<tr>
<td colspan="4" height="15"></td>