=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js 2014-02-03 12:57:11 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js 2014-02-04 10:07:24 +0000 @@ -538,32 +538,6 @@ store.groupsByGroupSet = Ext.create('Ext.data.Store', { fields: ['id', 'name', 'symbol'], - proxy: { - type: 'ajax', - url: '', - noCache: false, - reader: { - type: 'json', - root: 'organisationUnitGroups' - } - }, - isLoaded: false, - loadFn: function(fn) { - if (this.isLoaded) { - fn.call(); - } - else { - this.load(fn); - } - }, - listeners: { - load: function() { - if (!this.isLoaded) { - this.isLoaded = true; - } - this.sort('name', 'ASC'); - } - } }); store.organisationUnitGroup = Ext.create('Ext.data.Store', { === modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2014-02-03 12:57:11 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2014-02-04 10:07:24 +0000 @@ -1342,15 +1342,15 @@ loadLegend = function(view) { view = view || layer.core.view; - var store = gis.store.groupsByGroupSet; + Ext.data.JsonP.request({ + url: gis.init.contextPath + '/api/organisationUnitGroupSets/' + view.organisationUnitGroupSet.id + '.jsonp?links=false', + success: function(r) { + var data = r.organisationUnitGroups, + options = { + indicator: view.organisationUnitGroupSet.id + }; - store.proxy.url = gis.init.contextPath + gis.conf.finals.url.path_module + 'getOrganisationUnitGroupsByGroupSet.action?id=' + view.organisationUnitGroupSet.id; - store.load({ - scope: this, - callback: function() { - var options = { - indicator: view.organisationUnitGroupSet.id - }; + gis.store.groupsByGroupSet.loadData(data); layer.core.view = view;