=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2014-10-27 14:40:23 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2014-10-28 11:13:01 +0000 @@ -7446,25 +7446,12 @@ url = '', callbacks = 0, checkOptionSet, - updateStore, - createStorage; - - createStorage = function() { - store.getAll('optionSets').done( function(array) { - for (var i = 0, optionSet; i < array.length; i++) { - optionSet = array[i]; - - init.optionSetStorage[optionSet.id] = optionSet; - } - - fn(); - }); - }; + updateStore; updateStore = function() { if (++callbacks === optionSets.length) { if (!ids.length) { - createStorage(); + fn(); return; } @@ -7477,7 +7464,7 @@ success: function(r) { var sets = Ext.decode(r.responseText).optionSets; - store.setAll('optionSets', sets).done(createStorage); + store.setAll('optionSets', sets).done(fn); } }); } === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js 2014-10-27 15:13:59 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js 2014-10-28 11:13:01 +0000 @@ -1754,6 +1754,7 @@ ouHierarchy = response.metaData.ouHierarchy, names = response.metaData.names; names[emptyId] = emptyId; + response.metaData.optionNames = {}; response.nameHeaderMap = {}; response.idValueMap = {};