dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42114
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21515: minor
------------------------------------------------------------
revno: 21515
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-12-22 14:24:59 +0100
message:
minor
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.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-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js 2015-12-22 13:18:43 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js 2015-12-22 13:24:59 +0000
@@ -440,8 +440,7 @@
if( !programs || !programs.programIds){
return;
}
-
- //console.log('programs.programIds: ', programs.programIds);
+
filter = filter + programs.programIds;
var def = $.Deferred();
@@ -498,7 +497,7 @@
var _ids = ids.toString();
_ids = '[' + _ids + ']';
filter = filter + '&filter=id:in:' + _ids + '&paging=false';
- promise = promise.then( getAllD2Objects( store, url, filter ) );
+ promise = promise.then( getD2Objects( store, store, url, filter ) );
}
mainDef.resolve( obj.programs, obj.programIds );
@@ -512,22 +511,6 @@
return mainPromise;
}
-
-function getAllD2Objects( store, url, filter )
-{
- return function() {
- return $.ajax( {
- url: url,
- type: 'GET',
- data: filter
- }).done( function( response ){
- if(response[store]){
- dhis2.ec.store.setAll( store, response[store] );
- }
- });
- };
-}
-
function getD2Objects(store, objs, url, filter)
{
var def = $.Deferred();