← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 204: Moving GIS application to dhis-web-mapping.

 

------------------------------------------------------------
revno: 204
committer: Jan Henrik Overland janhenrik.overland@xxxxxxxxx
branch nick: trunk
timestamp: Mon 2009-04-20 18:49:17 +0200
message:
  Moving GIS application to dhis-web-mapping.
modified:
  gis/dhis-web-mapping/src/main/webapp/demos/geostat/config.js
  gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js
  gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Choropleth.js
  gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Mapping.js

=== modified file 'gis/dhis-web-mapping/src/main/webapp/demos/geostat/config.js'
--- gis/dhis-web-mapping/src/main/webapp/demos/geostat/config.js	2009-04-17 23:00:32 +0000
+++ gis/dhis-web-mapping/src/main/webapp/demos/geostat/config.js	2009-04-20 16:49:17 +0000
@@ -1,5 +1,7 @@
-// LOCALHOST + TOMCAT
-localhost = 'http://localhost:8180';
+// AJAX REQUESTS
+
+path = '../../dhis-web-mapping/';
+type = '.action';
 
 // MAP
 init_longitude = 0;

=== 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-20 16:24:17 +0000
+++ gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js	2009-04-20 16:49:17 +0000
@@ -51,15 +51,15 @@
         })
     });
 
-    map.addLayers([jpl_wms, vmap0, choroplethLayer, propSymbolLayer]);
+    map.addLayers([jpl_wms, vmap0, choroplethLayer]);
 
-    selectFeatureChoropleth = new OpenLayers.Control.newSelectFeature(
+    var selectFeatureChoropleth = new OpenLayers.Control.newSelectFeature(
         choroplethLayer,
         {onClickSelect: onClickSelectChoropleth, onClickUnselect: onClickUnselectChoropleth,
         onHoverSelect: onHoverSelectChoropleth, onHoverUnselect: onHoverUnselectChoropleth}
     );
 
-    selectFeaturePoint = new OpenLayers.Control.newSelectFeature( propSymbolLayer,
+    var selectFeaturePoint = new OpenLayers.Control.newSelectFeature( propSymbolLayer,
         {onClickSelect: onClickSelectPoint, onClickUnselect: onClickUnselectPoint,
         onHoverSelect: onHoverSelectPoint, onHoverUnselect: onHoverUnselectPoint }
     );
@@ -71,36 +71,36 @@
 
     map.setCenter(new OpenLayers.LonLat(init_longitude, init_latitude), init_zoom); // config.js
     
-    organisationUnitLevelStore = new Ext.data.JsonStore({
-        url: 'dhis-web-mapping/getOrganisationUnitLevels.action',
+    var organisationUnitLevelStore = new Ext.data.JsonStore({
+        url: path + 'getOrganisationUnitLevels' + type,
         baseParams: { format: 'json' },
         root: 'organisationUnitLevels',
         fields: ['id', 'level', 'name'],
         autoLoad: true
     });
 
-    organisationUnitStore = new Ext.data.JsonStore({
-        url: 'getOrganisationUnitsAtLevel.action',
+    var organisationUnitStore = new Ext.data.JsonStore({
+        url: path + 'getOrganisationUnitsAtLevel' + type,
         root: 'organisationUnits',
         fields: ['id', 'name'],
         sortInfo: { field: 'name', direction: 'ASC' },
         autoLoad: false
     });
     
-    existingMapsStore = new Ext.data.JsonStore({
-            url: 'getAllMaps.action',
+    var existingMapsStore = new Ext.data.JsonStore({
+            url: path + 'getAllMaps' + type,
             baseParams: { format: 'jsonmin' },
             root: 'maps',
             fields: ['id', 'mapLayerPath', 'organisationUnitLevel'],
             autoLoad: true
     });
 
-    var organisationUnitCombo = new Ext.form.ComboBox({
+    var organisationUnitComboBox = new Ext.form.ComboBox({
         id: 'organisationunit_cb',
         fieldLabel: 'Organisation unit',
         typeAhead: true,
         editable: false,
-        valueField: 'name',
+        valueField: 'id',
         displayField: 'name',
         emptyText: 'Required',
         mode: 'remote',
@@ -112,7 +112,7 @@
         store: organisationUnitStore
     });
     
-    var organisationUnitLevelCombo = new Ext.form.ComboBox({
+    var organisationUnitLevelComboBox = new Ext.form.ComboBox({
         id: 'organisationunitlevel_cb',
         fieldLabel: 'Level',
         typeAhead: true,
@@ -136,11 +136,11 @@
                     
                     if (level1 >= level2)
                     {
-                        organisationUnitLevelCombo2.reset();
+                        organisationUnitLevelComboBox.reset();
                         
                         Ext.Msg.show({
                         title:'Register shapefiles',
-                        msg: '<p style="padding-top:8px">Level must be lower than ' + orgunit + '!</p>',
+                        msg: '<p style="padding-top:8px">' + orgunit + ' must be devided into a lower level than itself!</p>',
                         buttons: Ext.Msg.OK,
                         animEl: 'elId',
                         maxWidth: 300,
@@ -162,32 +162,73 @@
         width: combo_width
     });
     
-    var uniqueColumnTextField = new Ext.form.TextField({
-        id: 'uniquecolumn_tf',
-        emptyText: 'Required',
-        width: combo_width
-    });
-    
-    var nameColumnTextField = new Ext.form.TextField({
-        id: 'namecolumn_tf',
-        emptyText: 'Required',
-        width: combo_width
-    });
-    
-    var longitudeTextField = new Ext.form.TextField({
-        id: 'longitude_tf',
-        emptyText: 'Required',
-        width: combo_width
-    });
-    
-    var latitudeTextField = new Ext.form.TextField({
-        id: 'latitude_tf',
-        emptyText: 'Required',
-        width: combo_width
-    });
-    
-    var zoomComboBox = new Ext.form.ComboBox({
-        id: 'zoom_cb',
+    var newUniqueColumnTextField = new Ext.form.TextField({
+        id: 'newuniquecolumn_tf',
+        emptyText: 'Required',
+        width: combo_width
+    });
+    
+    var editUniqueColumnTextField = new Ext.form.TextField({
+        id: 'edituniquecolumn_tf',
+        emptyText: 'Required',
+        width: combo_width
+    });
+    
+    var newNameColumnTextField = new Ext.form.TextField({
+        id: 'newnamecolumn_tf',
+        emptyText: 'Required',
+        width: combo_width
+    });
+    
+    var editNameColumnTextField = new Ext.form.TextField({
+        id: 'editcolumn_tf',
+        emptyText: 'Required',
+        width: combo_width
+    });
+    
+    var newLongitudeTextField = new Ext.form.TextField({
+        id: 'newlongitude_tf',
+        emptyText: 'Required',
+        width: combo_width
+    });
+    
+    var editLongitudeTextField = new Ext.form.TextField({
+        id: 'editlongitude_tf',
+        emptyText: 'Required',
+        width: combo_width
+    });
+    
+    var newLatitudeTextField = new Ext.form.TextField({
+        id: 'newlatitude_tf',
+        emptyText: 'Required',
+        width: combo_width
+    });
+    
+    var editLatitudeTextField = new Ext.form.TextField({
+        id: 'editlatitude_tf',
+        emptyText: 'Required',
+        width: combo_width
+    });
+    
+    var newZoomComboBox = new Ext.form.ComboBox({
+        id: 'newzoom_cb',
+        editable: false,
+        emptyText: 'Required',
+        displayField: 'value',
+        valueField: 'value',
+        width: combo_width,
+        minListWidth: combo_width + 26,
+        triggerAction: 'all',
+        mode: 'local',
+        value: 5,
+        store: new Ext.data.SimpleStore({
+            fields: ['value'],
+            data: [[3], [4], [5], [6], [7], [8]]
+        })
+    });
+    
+    var editZoomComboBox = new Ext.form.ComboBox({
+        id: 'editzoom_cb',
         editable: false,
         emptyText: 'Required',
         displayField: 'value',
@@ -205,18 +246,18 @@
     
     var newMapButton = new Ext.Button({
         id: 'newmap_b',
-        text: 'Register map',
+        text: 'Register new map',
         handler: function()
         {
             var nm = Ext.getCmp('newmap_cb').getValue();
             var oui = Ext.getCmp('organisationunit_cb').getValue();
             var ouli = Ext.getCmp('organisationunitlevel_cb').getValue();
             var mlp = Ext.getCmp('maplayerpath_tf').getValue();
-            var uc = Ext.getCmp('uniquecolumn_tf').getValue();
-            var nc = Ext.getCmp('namecolumn_tf').getValue();
-            var lon = Ext.getCmp('longitude_tf').getValue();
-            var lat = Ext.getCmp('latitude_tf').getValue();
-            var zoom = Ext.getCmp('zoom_cb').getValue();
+            var uc = Ext.getCmp('newuniquecolumn_tf').getValue();
+            var nc = Ext.getCmp('newnamecolumn_tf').getValue();
+            var lon = Ext.getCmp('newlongitude_tf').getValue();
+            var lat = Ext.getCmp('newlatitude_tf').getValue();
+            var zoom = Ext.getCmp('newzoom_cb').getValue();
             
             if (!nm || !mlp || !oui || !ouli || !uc || !nc || !lon || !lat)
             {
@@ -226,7 +267,7 @@
             
             Ext.Ajax.request(
             {
-                url: 'addOrUpdateMap.action',
+                url: path + 'addOrUpdateMap' + type,
                 method: 'GET',
                 params: { mapLayerPath: mlp, organisationUnitId: oui, organisationUnitLevelId: ouli, uniqueColumn: uc, nameColumn: nc,
                           longitude: lon, latitude: lat, zoom: zoom},
@@ -259,11 +300,11 @@
         handler: function()
         {
             var em = Ext.getCmp('editmap_cb').getValue();
-            var uc = Ext.getCmp('uniquecolumn_tf').getValue();
-            var nc = Ext.getCmp('namecolumn_tf').getValue();
-            var lon = Ext.getCmp('longitude_tf').getValue();
-            var lat = Ext.getCmp('latitude_tf').getValue();
-            var zoom = Ext.getCmp('zoom_cb').getValue();
+            var uc = Ext.getCmp('edituniquecolumn_tf').getValue();
+            var nc = Ext.getCmp('editnamecolumn_tf').getValue();
+            var lon = Ext.getCmp('editlongitude_tf').getValue();
+            var lat = Ext.getCmp('editlatitude_tf').getValue();
+            var zoom = Ext.getCmp('editzoom_cb').getValue();
             
             if (!em || !uc || !nc || !lon || !lat)
             {
@@ -273,7 +314,7 @@
             
             Ext.Ajax.request(
             {
-                url: 'addOrUpdateMap.action',
+                url: path + 'addOrUpdateMap' + type,
                 method: 'GET',
                 params: { mapLayerPath: mlp, organisationUnitId: oui, organisationUnitLevelId: ouli, uniqueColumn: uc, nameColumn: nc,
                           longitude: lon, latitude: lat, zoom: zoom},
@@ -315,7 +356,7 @@
             
             Ext.Ajax.request(
             {
-                url: 'deleteMapByMapLayerPath.action',
+                url: path + 'deleteMapByMapLayerPath' + type,
                 method: 'GET',
                 params: { mapLayerPath: mlp },
 
@@ -340,6 +381,142 @@
             });
         }
     });
+    
+    var newMapComboBox = new Ext.form.ComboBox(
+    {
+        id: 'newmap_cb',
+        typeAhead: true,
+        editable: false,
+        valueField: 'level',
+        displayField: 'name',
+        emptyText: 'Required',
+        mode: 'remote',
+        forceSelection: true,
+        triggerAction: 'all',
+        selectOnFocus: true,
+        width: combo_width,
+        minListWidth: combo_width + 26,
+        store: organisationUnitLevelStore,
+        listeners: {
+            'select': {
+                fn: function() {
+                    var level = Ext.getCmp('newmap_cb').getValue();
+                    organisationUnitStore.baseParams = { level: level, format: 'json' };
+                    organisationUnitStore.reload();
+                },
+                scope: this
+            }
+        }
+    });
+    
+    var editMapComboBox = new Ext.form.ComboBox(
+    {
+        id: 'editmap_cb',
+        typeAhead: true,
+        editable: false,
+        valueField: 'mapLayerPath',
+        displayField: 'mapLayerPath',
+        emptyText: 'Required',
+        mode: 'remote',
+        forceSelection: true,
+        triggerAction: 'all',
+        selectOnFocus: true,
+        width: combo_width,
+        minListWidth: combo_width + 26,
+        store: existingMapsStore,
+        listeners:
+        {
+            'select':
+            {
+                fn: function()
+                {
+                    var mlp = Ext.getCmp('editmap_cb').getValue();
+                    
+                    Ext.Ajax.request( 
+                    {
+                        url: path + 'getMapByMapLayerPath' + type,
+                        method: 'GET',
+                        params: { mapLayerPath: mlp, format: 'json' },
+
+                        success: function( responseObject )
+                        {
+                            var map = Ext.util.JSON.decode( responseObject.responseText ).map;
+                            
+                            Ext.getCmp('edituniquecolumn_tf').setValue(map.uniqueColumn);
+                            Ext.getCmp('editnamecolumn_tf').setValue(map.nameColumn);
+                            Ext.getCmp('editlongitude_tf').setValue(map.longitude);
+                            Ext.getCmp('editlatitude_tf').setValue(map.latitude);
+                            Ext.getCmp('editzoom_cb').setValue(map.zoom);
+                            
+                        },
+                        failure: function()
+                        {
+                            alert( 'Error while retrieving data: getAssignOrganisationUnitData' );
+                        } 
+                    });
+                },
+                scope: this
+            }
+        }
+    });
+    
+    var deleteMapComboBox = new Ext.form.ComboBox(
+    {
+        xtype: 'combo',
+        id: 'deletemap_cb',
+        typeAhead: true,
+        editable: false,
+        valueField: 'mapLayerPath',
+        displayField: 'mapLayerPath',
+        emptyText: 'Required',
+        mode: 'remote',
+        forceSelection: true,
+        triggerAction: 'all',
+        selectOnFocus: true,
+        width: combo_width,
+        minListWidth: combo_width + 26,
+        store: existingMapsStore
+    });
+    
+    var newMapPanel = new Ext.Panel(
+    {   
+        id: 'newmap_p',
+        items:
+        [   
+            { html: '<p style="padding-bottom:4px">Organisation unit level:</p>' }, newMapComboBox, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Organisation unit:</p>' }, organisationUnitComboBox, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Devided into level:</p>' }, organisationUnitLevelComboBox, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Geoserver map layer path:</p>' }, mapLayerPathTextField, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Unique column:</p>' }, newUniqueColumnTextField, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Name column:</p>' }, newNameColumnTextField, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Longitude:</p>' }, newLongitudeTextField, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Latitude:</p>' }, newLatitudeTextField, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Zoom:</p>' }, newZoomComboBox
+        ]
+    });
+    
+    var editMapPanel = new Ext.Panel(
+    {
+        id: 'editmap_p',
+        items:
+        [
+            { html: '<p style="padding-bottom:4px">Choose a map:</p>' }, editMapComboBox, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Unique column:</p>' }, editUniqueColumnTextField, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Name column:</p>' }, editNameColumnTextField, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Longitude:</p>' }, editLongitudeTextField, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Latitude:</p>' }, editLatitudeTextField, { html: '<br>' },
+            { html: '<p style="padding-bottom:4px">Zoom:</p>' }, editZoomComboBox
+        ]
+    });
+    
+    var deleteMapPanel = new Ext.Panel(
+    {
+        id: 'deletemap_p',
+        items:
+        [
+            { html: '<p style="padding-bottom:4px">Choose a map:</p>' }, deleteMapComboBox
+        ]
+    });
 
     rootmap = new Ext.Panel({
         id: 'rootmap',
@@ -353,32 +530,31 @@
                 plain: true,
                 defaults: {layout: 'fit', bodyStyle: 'padding:8px'},
                 listeners: {
-                    tabchange: function(panel, tab) {
+                    tabchange: function(panel, tab)
+                    {
+                        var nm_b = Ext.getCmp('newmap_b');
+                        var em_b = Ext.getCmp('editmap_b');
+                        var dm_b = Ext.getCmp('deletemap_b');
+                        
                         if (tab.id == 0)
-                        {
-                            Ext.getCmp('panel1_p').setVisible(true);
-                            Ext.getCmp('panel2_p').setVisible(true);
-                            Ext.getCmp('newmap_b').setVisible(true);
-                            Ext.getCmp('editmap_b').setVisible(false);
-                            Ext.getCmp('deletemap_b').setVisible(false);
+                        { 
+                            nm_b.setVisible(true);
+                            em_b.setVisible(false);
+                            dm_b.setVisible(false);
                         }
                         
                         else if (tab.id == 1)
                         {
-                            Ext.getCmp('panel1_p').setVisible(false);
-                            Ext.getCmp('panel2_p').setVisible(true);
-                            Ext.getCmp('newmap_b').setVisible(false);
-                            Ext.getCmp('editmap_b').setVisible(true);
-                            Ext.getCmp('deletemap_b').setVisible(false);
+                            nm_b.setVisible(false);
+                            em_b.setVisible(true);
+                            dm_b.setVisible(false);
                         }
                         
                         else if (tab.id == 2)
                         {
-                            Ext.getCmp('panel1_p').setVisible(false);
-                            Ext.getCmp('panel2_p').setVisible(false);
-                            Ext.getCmp('newmap_b').setVisible(false);
-                            Ext.getCmp('editmap_b').setVisible(false);
-                            Ext.getCmp('deletemap_b').setVisible(true);
+                            nm_b.setVisible(false);
+                            em_b.setVisible(false);
+                            dm_b.setVisible(true);
                         }
                     }
                 },
@@ -389,114 +565,27 @@
                         id: '0',
                         items:
                         [
-                            {
-                                xtype: 'combo',
-                                id: 'newmap_cb',
-                                typeAhead: true,
-                                editable: false,
-                                valueField: 'level',
-                                displayField: 'name',
-                                emptyText: 'Select organisation unit level',
-                                mode: 'remote',
-                                forceSelection: true,
-                                triggerAction: 'all',
-                                selectOnFocus: true,
-                                width: combo_width,
-                                store: organisationUnitLevelStore,
-                                listeners: {
-                                    'select': {
-                                        fn: function() {
-                                            var level = Ext.getCmp('newmap_cb').getValue();
-                                            organisationUnitStore.baseParams = { level: level, format: 'json' };
-                                            organisationUnitStore.reload();
-                                        },
-                                        scope: this
-                                    }
-                                }
-                            }
+                            newMapPanel
                         ]
                     },
                     
                     {
                         title:'Edit map',
                         id: '1',
+                        deferredRender: false,
                         items:
                         [
-                            {
-                                xtype: 'combo',
-                                id: 'editmap_cb',
-                                typeAhead: true,
-                                editable: false,
-                                valueField: 'mapLayerPath',
-                                displayField: 'mapLayerPath',
-                                emptyText: 'Select map',
-                                mode: 'remote',
-                                forceSelection: true,
-                                triggerAction: 'all',
-                                selectOnFocus: true,
-                                width: combo_width,
-                                store: existingMapsStore,
-                                listeners:
-                                {
-                                    'select':
-                                    {
-                                        fn: function()
-                                        {
-                                            var mlp = Ext.getCmp('editmap_cb').getValue();
-                                            
-                                            Ext.Ajax.request( 
-                                            {
-                                                url: 'getMapByMapLayerPath.action',
-                                                method: 'GET',
-                                                params: { mapLayerPath: mlp, format: 'json' },
-
-                                                success: function( responseObject )
-                                                {
-                                                    var map = Ext.util.JSON.decode( responseObject.responseText ).map;
-                                                    
-                                                    Ext.getCmp('uniquecolumn_tf').setValue(map.uniqueColumn);
-                                                    Ext.getCmp('namecolumn_tf').setValue(map.nameColumn);
-                                                    Ext.getCmp('longitude_tf').setValue(map.longitude);
-                                                    Ext.getCmp('latitude_tf').setValue(map.latitude);
-                                                    Ext.getCmp('zoom_cb').setValue(map.zoom);
-                                                    
-                                                },
-                                                failure: function()
-                                                {
-                                                    alert( 'Error while retrieving data: getAssignOrganisationUnitData' );
-                                                } 
-                                            });
-                                                                                
-                                            
-                                            
-                                        },
-                                        scope: this
-                                    }
-                                }
-                            }
+                            editMapPanel
                         ]
                     },
                     
                     {
                         title:'Delete map',
                         id: '2',
+                        deferredRender: false,
                         items:
                         [
-                            {
-                                xtype: 'combo',
-                                id: 'deletemap_cb',
-                                typeAhead: true,
-                                editable: false,
-                                valueField: 'mapLayerPath',
-                                displayField: 'mapLayerPath',
-                                emptyText: 'Select map',
-                                mode: 'remote',
-                                forceSelection: true,
-                                triggerAction: 'all',
-                                selectOnFocus: true,
-                                width: combo_width,
-                                store: existingMapsStore
-                            }
+                            deleteMapPanel
                         ]
                     }
                 ]
@@ -504,30 +593,6 @@
             
             { html: '<br>' },
             
-            {
-                xtype: 'panel',
-                id: 'panel1_p',
-                items:
-                [
-                    { html: '<p style="padding-bottom:4px">Register map for this organisation unit:</p>' }, organisationUnitCombo, { html: '<br>' },
-                    { html: '<p style="padding-bottom:4px">Organisation unit level:</p>' }, organisationUnitLevelCombo, { html: '<br>' },
-                    { html: '<p style="padding-bottom:4px">Geoserver map layer path:</p>' }, mapLayerPathTextField, { html: '<br>' }
-                ]
-            },
-            
-            {
-                xtype: 'panel',
-                id: 'panel2_p',
-                items:
-                [
-                    { html: '<p style="padding-bottom:4px">Unique column:</p>' }, uniqueColumnTextField, { html: '<br>' },
-                    { html: '<p style="padding-bottom:4px">Name column:</p>' }, nameColumnTextField, { html: '<br>' },
-                    { html: '<p style="padding-bottom:4px">Longitude:</p>' }, longitudeTextField, { html: '<br>' },
-                    { html: '<p style="padding-bottom:4px">Latitude:</p>' }, latitudeTextField, { html: '<br>' },
-                    { html: '<p style="padding-bottom:4px">Zoom:</p>' }, zoomComboBox, { html: '<br>' }
-                ]
-            },
-
             newMapButton,
             
             editMapButton,
@@ -790,7 +855,7 @@
 
     Ext.Ajax.request( 
     {
-        url: 'addOrUpdateMapOrganisationUnitRelation.action',
+        url: path + 'addOrUpdateMapOrganisationUnitRelation' + type,
         method: 'GET',
         params: { mapLayerPath: mlp, organisationUnitId: organisationUnitId, featureId: featureId },
 
@@ -877,7 +942,7 @@
 {
     Ext.Ajax.request( 
     {
-        url: 'getMapByMapLayerPath.action',
+        url: path + 'getMapByMapLayerPath' + type,
         method: 'GET',
         params: { mapLayerPath: 'who:Indian_state', format: 'json' },
 
@@ -910,7 +975,7 @@
 
     Ext.Ajax.request( 
     {
-        url: 'getMapValues.action',
+        url: path + 'getMapValues' + type,
         method: 'GET',
         params: { indicatorId: indicatorId, periodId: periodId, level: level, format: 'json' },
 
@@ -932,7 +997,7 @@
     var periodId = Ext.getCmp('period_cb').getValue();
     var level = pointLayer;
 
-    var url = 'getMapValues.action';
+    var url = 'getMapValues' + type;
     format = 'json';
 
     Ext.Ajax.request( 
@@ -959,7 +1024,7 @@
     
     Ext.Ajax.request( 
     {
-        url: 'getAvailableMapOrganisationUnitRelations.action',
+        url: path + 'getAvailableMapOrganisationUnitRelations' + type,
         method: 'GET',
         params: { mapLayerPath: mlp, format: 'json' },
 
@@ -986,7 +1051,7 @@
     
     Ext.Ajax.request( 
     {
-        url: 'getAvailableMapOrganisationUnitRelations.action',
+        url: path + 'getAvailableMapOrganisationUnitRelations' + type,
         method: 'GET',
         params: { mapLayerPath: mlp, format: 'json' },
 

=== 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-17 23:00:32 +0000
+++ gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Choropleth.js	2009-04-20 16:49:17 +0000
@@ -142,7 +142,7 @@
     initComponent : function() {
     
         indicatorGroupStore = new Ext.data.JsonStore({
-            url: localhost + '/dhis-webservice/getAllIndicatorGroups.service',
+            url: path + 'getAllIndicatorGroups' + type,
             baseParams: { format: 'json' },
             root: 'indicatorGroups',
             fields: ['id', 'name'],
@@ -150,14 +150,14 @@
         });
         
         indicatorStore = new Ext.data.JsonStore({
-            url: localhost + '/dhis-webservice/getIndicatorsByIndicatorGroup.service',
+            url: path + 'getIndicatorsByIndicatorGroup' + type,
             root: 'indicators',
             fields: ['id', 'name'],
             autoLoad: false
         });
         
         periodTypeStore = new Ext.data.JsonStore({
-            url: localhost + '/dhis-webservice/getAllPeriodTypes.service',
+            url: path + 'getAllPeriodTypes' + type,
             baseParams: { format: 'json' },
             root: 'periodTypes',
             fields: ['id', 'name'],
@@ -165,7 +165,7 @@
         });
             
         periodStore = new Ext.data.JsonStore({
-            url: localhost + '/dhis-webservice/getPeriodsByPeriodType.service',
+            url: path + 'getPeriodsByPeriodType' + type,
             baseParams: { periodTypeId: '9', format: 'json' },
             root: 'periods',
             fields: ['id', 'startDate'],
@@ -173,7 +173,7 @@
         });
             
         mapStore = new Ext.data.JsonStore({
-            url: localhost + '/dhis-webservice/getAllMaps.service',
+            url: path + 'getAllMaps' + type,
             baseParams: { format: 'jsonmin' },
             root: 'maps',
             fields: ['id', 'mapLayerPath', 'organisationUnitLevel'],
@@ -181,7 +181,7 @@
         }); 
             
         levelStore = new Ext.data.JsonStore({
-            url: localhost + '/dhis-webservice/getOrganisationUnitLevels.service',
+            url: path + 'getOrganisationUnitLevels' + type,
             baseParams: { format: 'json' },
             root: 'organisationUnitLevels',
             fields: ['level', 'name'],
@@ -189,7 +189,7 @@
         });
 
         legendStore = new Ext.data.JsonStore({
-            url: localhost + '/dhis-webservice/getLegendMinAndMaxOfIndicator.service',
+            url: path + 'getLegendMinAndMaxOfIndicator' + type,
             root: 'legendSet',
             fields: ['id', 'name'],
             autoLoad: false
@@ -208,7 +208,7 @@
             mode: 'remote',
             forceSelection: true,
             triggerAction: 'all',
-            emptyText: 'Select group',
+            emptyText: 'Required',
             selectOnFocus: true,
             width: combo_width,
             store: indicatorGroupStore,
@@ -250,8 +250,6 @@
                         var iId = Ext.getCmp('indicator_cb').getValue();
                         legendStore.baseParams = { indicatorId: iId, format: 'json' };
                         legendStore.reload();
-                        
-                        this.classify(false);
                     }
                 }
             }
@@ -299,15 +297,7 @@
             emptyText: 'Select period',
             selectOnFocus: true,
             width: combo_width,
-            store: periodStore,
-            listeners: {
-                'select': {
-                    fn: function()
-                    {
-                        this.classify(false);
-                    }
-                }
-            }
+            store: periodStore
         },
         
         {
@@ -375,7 +365,7 @@
                     fn: function()
                     {
                         var iId = Ext.getCmp('indicator_cb').getValue();
-                        var url = localhost + '/dhis-webservice/getLegendMinAndMaxOfIndicator.service';
+                        var url = path + 'getLegendMinAndMaxOfIndicator' + type;
                         var format = 'json';
                         
                         Ext.Ajax.request({

=== modified file 'gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Mapping.js'
--- gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Mapping.js	2009-04-17 23:00:32 +0000
+++ gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Mapping.js	2009-04-20 16:49:17 +0000
@@ -142,7 +142,7 @@
     initComponent : function() {
     
         mapStore = new Ext.data.JsonStore({
-            url: localhost + '/dhis-webservice/getAllMaps.service',
+            url: path + 'getAllMaps' + type,
             baseParams: { format: 'jsonmin' },
             root: 'maps',
             fields: ['id', 'mapLayerPath', 'organisationUnitLevel'],
@@ -150,7 +150,7 @@
         });    
             
         gridStore = new Ext.data.JsonStore({
-            url: localhost + '/dhis-webservice/getAvailableMapOrganisationUnitRelations.service',
+            url: path + 'getAvailableMapOrganisationUnitRelations' + type,
             root: 'mapOrganisationUnitRelations',
             fields: ['id', 'organisationUnit', 'organisationUnitId', 'featureId'],
             autoLoad: false



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