dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18365
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7716: disable validate button while validation runs
------------------------------------------------------------
revno: 7716
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-07-26 10:45:54 +0200
message:
disable validate button while validation runs
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/runValidationForm.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 2012-05-01 13:14:33 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/runValidation.js 2012-07-26 08:45:54 +0000
@@ -16,6 +16,8 @@
aggregate = $( '#aggregate' ).val();
validationRuleGroupId = $( '#validationRuleGroupId' ).val();
+ $( '#validateButton' ).attr( 'disabled', true )
+
$.getJSON( 'validateRunValidation.action',
{ startDate:startDate, endDate:endDate, aggregate:aggregate }, function( json )
{
@@ -30,6 +32,8 @@
$( 'div#analysisResult' ).show();
$( 'div#analysisResult' ).html( data );
setTableStyles();
+
+ $( '#validateButton' ).removeAttr( 'disabled' );
} );
}
else if ( json.response == 'input' )
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm 2012-03-07 10:32:33 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm 2012-07-26 08:45:54 +0000
@@ -68,7 +68,7 @@
</tr>
<tr>
<td>
- <input type="button" value="$i18n.getString( 'validate' )" style="width:10em" onclick="validateRunValidation()">
+ <input id="validateButton" type="button" value="$i18n.getString( 'validate' )" style="width:10em" onclick="validateRunValidation()">
</td>
<td></td>
</tr>