← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 247: Minor fixes.

 

------------------------------------------------------------
revno: 247
committer: Jan Henrik Overland janhenrik.overland@xxxxxxxxx
branch nick: trunk
timestamp: Thu 2009-04-23 23:07:01 +0200
message:
  Minor fixes.
modified:
  gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js
  gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Choropleth.js

=== modified file 'gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js'
--- gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js	2009-04-23 20:20:36 +0000
+++ gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js	2009-04-23 21:07:01 +0000
@@ -400,7 +400,6 @@
                     Ext.getCmp('editmap_cb').reset();
                     Ext.getCmp('deletemap_cb').getStore().reload();
                     Ext.getCmp('deletemap_cb').reset();
-                    
                 },
                 failure: function()
                 {

=== modified file 'gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Choropleth.js'
--- gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Choropleth.js	2009-04-23 13:08:41 +0000
+++ gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Choropleth.js	2009-04-23 21:07:01 +0000
@@ -194,7 +194,7 @@
         });
 
         legendStore = new Ext.data.JsonStore({
-            url: path + 'getMapLegendSetByIndicator' + type,
+            url: path + 'getMapLegendSet' + type,
             root: 'mapLegendSet',
             fields: ['id', 'name'],
             autoLoad: false
@@ -250,11 +250,12 @@
                 'select': {
                     fn: function()
                     {
-                        Ext.getCmp('legend_cb').reset();
+                        var legend_cb = Ext.getCmp('legend_cb');
+                        var iId = Ext.getCmp('indicator_cb').getValue();
                         
-                        var iId = Ext.getCmp('indicator_cb').getValue();
-                        legendStore.baseParams = { indicatorId: iId, format: 'json' };
-                        legendStore.reload();
+                        legend_cb.reset();
+                        legend_cb.getStore().baseParams = { indicatorId: iId, format: 'json' };
+                        legend_cb.getStore().reload();
                     }
                 }
             }
@@ -280,8 +281,8 @@
                     fn: function()
                     {
                         var ptid = Ext.getCmp('periodtype_cb').getValue();
-                        periodStore.baseParams = { periodTypeId: ptid, format: 'json' };
-                        periodStore.reload();
+                        Ext.getCmp('period_cb').getStore().baseParams = { periodTypeId: ptid, format: 'json' };
+                        Ext.getCmp('period_cb').getStore().reload();
                     },
                     scope: this
                 }
@@ -375,15 +376,15 @@
                        
                         Ext.Ajax.request(
                         {
-                            url: path + 'getMapLegendSetByIndicator' + type,
+                            url: path + 'getMapLegendSet' + type,
                             method: 'GET',
                             params: { indicatorId: iId, format: 'json' },
 
                             success: function( responseObject )
                             {
                               var data = Ext.util.JSON.decode(responseObject.responseText);
-                              var color1 = data.mapLegendSet[0]['colorlow'];
-                              var color2 = data.mapLegendSet[0]['colorhigh'];
+                              var color1 = data.mapLegendSet[0]['colorLow'];
+                              var color2 = data.mapLegendSet[0]['colorHigh'];
 
                               Ext.getCmp('colorA_cf').setValue(color1);
                               Ext.getCmp('colorB_cf').setValue(color2);



--
Trunk
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.