← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17618: Data entry, starting availibility check after all meta-data is loaded

 

------------------------------------------------------------
revno: 17618
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-11-29 14:55:43 +0100
message:
  Data entry, starting availibility check after all meta-data is loaded
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.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-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2014-11-26 09:25:49 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2014-11-29 13:55:43 +0000
@@ -218,9 +218,7 @@
     $( '#orgUnitTree' ).one( 'ouwtLoaded', function( event, ids, names )
     {
         console.log( 'Ouwt loaded' );
-        
-        dhis2.availability.startAvailabilityCheck();
-        
+                
         $.when( dhis2.de.loadMetaData(), dhis2.de.loadDataSetAssociations() ).done( function() {
         	dhis2.de.setMetaDataLoaded();
         	organisationUnitSelected( ids, names );
@@ -2157,7 +2155,11 @@
         .then(purgeLocalForms)
         .then(updateExistingLocalForms)
         .then(downloadRemoteForms)
-        .then(dhis2.de.loadOptionSets);
+        .then(dhis2.de.loadOptionSets)
+        .done( function() {
+        	dhis2.availability.startAvailabilityCheck();
+        	console.log( 'Started availability check' );
+        } );
 }
 
 function purgeLocalForms()