------------------------------------------------------------ revno: 10510 committer: Morten Olav Hansen <morte...@gmail.com> 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 ) {
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp