dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18370
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7721: disable button while doing work in std dev, min-max, validation rule analysis
------------------------------------------------------------
revno: 7721
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-07-26 11:59:38 +0200
message:
disable button while doing work in std dev, min-max, validation rule analysis
modified:
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.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-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm 2012-02-22 18:23:04 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm 2012-07-26 09:59:38 +0000
@@ -114,7 +114,7 @@
<option value="3.5">3.5</option>
<option value="4.0">4.0</option>
<option value="4.5">4.5</option>
- <option value="5.0">5.0</option>
+ <option value="5.0">5.0</option>
</select>
</td>
</tr>
@@ -128,7 +128,7 @@
</tr>
<tr>
<td>
- <input type="button" onclick="validateRunAnalyseData()" value="$i18n.getString( 'start' )" style="width:120px" />
+ <input id="startButton" type="button" onclick="validateRunAnalyseData()" value="$i18n.getString( 'start' )" style="width:120px" />
</td>
</tr>
</table>
@@ -136,4 +136,4 @@
<span id="message"></span>
</div>
-<div id="analysisResult"></div>
+<div id="analysisResult"></div>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js 2012-02-22 18:23:04 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js 2012-07-26 09:59:38 +0000
@@ -9,6 +9,8 @@
{
if ( analyseDataInvalid() )
{
+ $( '#startButton').attr( 'disabled', true );
+
$.getJSON( "validateRunAnalysis.action", {
fromDate : getFieldValue( 'fromDate' ),
toDate : getFieldValue( 'toDate' )
@@ -22,6 +24,7 @@
else
{
setMessage( json.message );
+ $( '#startButton').removeAttr( 'disabled' );
}
} );
}
@@ -69,6 +72,8 @@
$( "div#analysisInput" ).hide();
$( "div#analysisResult" ).show();
$( "div#analysisResult" ).html( data );
+
+ $( '#startButton').removeAttr( 'disabled' );
} );
}