← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7715: disable report button while waiting for completeness report

 

------------------------------------------------------------
revno: 7715
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-07-26 10:23:00 +0200
message:
  disable report button while waiting for completeness report
modified:
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataCompleteness.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/orgUnitDistribution.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.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-reporting/src/main/webapp/dhis-web-reporting/javascript/dataCompleteness.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataCompleteness.js	2012-05-01 13:14:33 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataCompleteness.js	2012-07-26 08:23:00 +0000
@@ -18,6 +18,8 @@
         return false;
     }
 
+    $( '#reportButton' ).attr( 'disabled', true );
+
     showLoader();
 
     var url = "getDataCompleteness.action" + "?periodId=" + periodId + "&criteria=" + criteria + "&dataSetId="
@@ -27,6 +29,8 @@
     {
         hideLoader();
         setTableStyles();
+
+        $( '#reportButton').removeAttr( 'disabled' );
     } );
 }
 

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/orgUnitDistribution.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/orgUnitDistribution.js	2012-07-26 08:12:17 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/orgUnitDistribution.js	2012-07-26 08:23:00 +0000
@@ -8,7 +8,7 @@
         return false;
     }
 
-    $('#reportButton').attr('disabled', true);
+    $( '#reportButton' ).attr( 'disabled', true );
 
     displayDiv( "loaderDiv", distributionDivs );
 
@@ -19,7 +19,7 @@
         displayDiv( "tableDiv", distributionDivs );
         setTableStyles();
 
-        $('#reportButton').removeAttr('disabled');
+        $( '#reportButton' ).removeAttr( 'disabled' );
     } );
 }
 

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm	2012-07-20 07:04:42 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm	2012-07-26 08:23:00 +0000
@@ -53,7 +53,7 @@
             <select id="periodId" name="periodId" style="width:330px" disabled="disabled">
             </select><br><br>
             
-            <input type="button" value="$i18n.getString( 'get_report' )" style="width:135px" onclick="displayCompleteness()"/><br><br>
+            <input id="reportButton" type="button" value="$i18n.getString( 'get_report' )" style="width:135px" onclick="displayCompleteness()"/><br><br>
             
             <!-- Export -->