dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25518
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12684: Std dev analysis, avoiding page load when returning to input ui
------------------------------------------------------------
revno: 12684
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-10-15 16:31:30 +0200
message:
Std dev analysis, avoiding page load when returning to input ui
modified:
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/searchResult.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/dataAnalysis.js'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js 2013-07-25 05:37:29 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js 2013-10-15 14:31:30 +0000
@@ -11,7 +11,8 @@
{
$( '#startButton').attr( 'disabled', true );
- $.getJSON( "validateRunAnalysis.action", {
+ $.getJSON( "validateRunAnalysis.action",
+ {
fromDate : getFieldValue( 'fromDate' ),
toDate : getFieldValue( 'toDate' )
},
@@ -69,6 +70,7 @@
$.get( url, function( data )
{
+ hideMessage();
$( "div#analysisInput" ).hide();
$( "div#analysisResult" ).show();
$( "div#analysisResult" ).html( data );
@@ -91,6 +93,12 @@
} );
}
+function displayAnalysisInput()
+{
+ $( 'div#analysisInput' ).show();
+ $( 'div#analysisResult' ).empty().hide();
+}
+
function exportAnalysisResult( type )
{
var url = 'exportAnalysisResult.action?type=' + type;
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm 2013-10-08 19:10:40 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm 2013-10-15 14:31:30 +0000
@@ -17,13 +17,13 @@
<span id="info">$i18n.getString( "no_values_found" )</span>
-<input type="button" onclick="window.location.href='viewAnalysisForm.action?key=$!{key}'" value="Back" style="width:120px">
+<input type="button" onclick="displayAnalysisInput()" value="$i18n.getString( 'done' )" style="width:120px">
#else
<span id="info">#if( $maxExceeded )$i18n.getString( "max_values_exceeded" ) #else$!dataValues.size() $i18n.getString( "values_found" ) #end</span>
-<input type="button" onclick="window.location.href='viewAnalysisForm.action?key=$!{key}'" value="Back" style="width:120px">
+<input type="button" onclick="displayAnalysisInput()" value="$i18n.getString( 'done' )" style="width:120px">
<input type="button" value="$i18n.getString( 'get_report_as_pdf' )" style="width:140px" onclick="exportAnalysisResult( 'pdf' )">
<input type="button" value="$i18n.getString( 'get_report_as_xls' )" style="width:140px" onclick="exportAnalysisResult( 'xls' )">
<input type="button" value="$i18n.getString( 'get_report_as_csv' )" style="width:140px" onclick="exportAnalysisResult( 'cvs' )">