← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10510: only load anonymous programs from ss

 

------------------------------------------------------------
revno: 10510
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-04-10 11:58:16 +0700
message:
  only load anonymous programs from ss
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.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-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-04-08 10:13:58 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-04-10 04:58:16 +0000
@@ -91,22 +91,25 @@
     hideById( 'listDiv' );
     hideById( 'dataEntryInfor' );
 
+    DAO.programs.fetchAll( function ( store, arr ) {
+        var programs = [];
+
+        $.each( arr, function ( idx, item ) {
+            if ( item.programAssociations.indexOf( orgUnits[0] ) != -1 ) {
+                programs.push( item );
+            }
+        } );
+
+        updateProgramList( programs );
+    } );
+
+    /*
     // try online first, then fallback to what we have stored in browser
     dhis2.storage.Store.plugins['online-anonymous-programs'].call( {}, function ( arr ) {
         updateProgramList( arr );
     }, function () {
-        DAO.programs.fetchAll( function ( store, arr ) {
-            var programs = [];
-
-            $.each( arr, function ( idx, item ) {
-                if ( item.programAssociations.indexOf( orgUnits[0] ) != -1 ) {
-                    programs.push( item );
-                }
-            } );
-
-            updateProgramList( programs );
-        } );
     } );
+    */
 }
 
 function updateProgramList( arr ) {