← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17300: ER minor fixes

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 17300 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-10-28 12:14:06 +0100
message:
  ER minor fixes
modified:
  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/core.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-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 = {};