← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3049: Improved code.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 3049 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-03-16 13:31:31 +0100
message:
  Improved code.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/global.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Choropleth.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Symbol.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.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-mapping/src/main/webapp/dhis-web-mapping/mapping/script/global.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/global.js	2011-03-16 08:25:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/global.js	2011-03-16 12:23:26 +0000
@@ -5,6 +5,16 @@
     path_mapping: '../',
     path_commons: '../../dhis-web-commons-ajax-json/',
     type: '.action',
+	
+//	Help strings
+    
+    setup: 'gisSetup',
+	thematicMap: 'gisThematicMap',
+    overlayRegistration: 'gisOverlay',
+	administration: 'gisAdministration',
+	favorites: 'gisFavoriteMapView',
+	legendSets: 'gisLegendSet',
+    imageExport: 'gisImageExport',
 
 //  Layout
 
@@ -20,7 +30,40 @@
     
 	emptytext: '',
 	labelseparator: '',
+	
+//	DHIS variables
+
+	map_source_type_database: 'database',
+	map_source_type_geojson: 'geojson',
+	map_source_type_shapefile: 'shapefile',
+	map_legend_type_automatic: 'automatic',
+	map_legend_type_predefined: 'predefined',
+    map_layer_type_baselayer: 'baselayer',
+    map_layer_type_overlay: 'overlay',
+    map_layer_type_thematic: 'thematic',
+	map_value_type_indicator: 'indicator',
+	map_value_type_dataelement: 'dataelement',
+    map_date_type_fixed: 'fixed',
+    map_date_type_start_end: 'start-end',
+    map_selection_type_parent: 'parent',
+    map_selection_type_level: 'level',
+    map_feature_type_multipolygon: 'MultiPolygon',
+    map_feature_type_multipolygon_class_name: 'OpenLayers.Geometry.MultiPolygon',
+    map_feature_type_polygon: 'Polygon',
+    map_feature_type_polygon_class_name: 'OpenLayers.Geometry.Polygon',
+    map_feature_type_point: 'Point',
+    map_feature_type_point_class_name: 'OpenLayers.Geometry.Point',
+    map_view_access_level_user: 'user',
+    map_view_access_level_system: 'system',
+    aggregation_strategy_real_time: 'real_time',
+    aggregation_strategy_batch: 'batch',
     
+//  MapFish
+
+    classify_with_bounds: 1,
+    classify_by_equal_intervals: 2,
+    classify_by_quantils: 3,
+
 //  Layers
 
     opacityItems: [
@@ -49,7 +92,6 @@
         widget.expand();
     },
     
-    /* Detect mapview parameter in URL */
     getUrlParam: function(strParam) {
         var output = '';
         var strHref = window.location.href;
@@ -67,7 +109,6 @@
         return unescape(output);
     },
 
-    /* Get all properties in an object */
     getKeys: function(obj) {
         var temp = [];
         for (var k in obj) {
@@ -78,7 +119,6 @@
         return temp;
     },
 
-    /* Input validation */
     validateInputNameLength: function(name) {
         return (name.length <= 25);
     },
@@ -97,7 +137,6 @@
                 h <= 1200 ? 600 : 900;
     },
 
-    /* Make map view numbers numeric */
     getNumericMapView: function(mapView) {
         mapView.id = parseFloat(mapView.id);
         mapView.indicatorGroupId = parseFloat(mapView.indicatorGroupId);
@@ -112,14 +151,12 @@
         return mapView;
     },
 
-    /* Get number of decimals */
     getNumberOfDecimals: function(x,dec_sep) {
         var tmp = new String();
         tmp = x;
         return tmp.indexOf(dec_sep) > -1 ? tmp.length-tmp.indexOf(dec_sep) - 1 : 0;
     },
 
-    /* Feature labels */
     labels: {    
         getActivatedOpenLayersStyleMap: function() {
             return new OpenLayers.StyleMap({
@@ -181,28 +218,10 @@
         widget.applyValues();
     },
 
-    /* Sort values */
     sortByValue: function(a,b) {
         return b.value-a.value;
     },
 
-    /* Create JSON for map export */
-    getExportDataValueJSON: function(mapValues) {
-        var json = '{';
-        json += '"datavalues": ';
-        json += '[';
-        mapValues.sort(this.sortByValue);
-        for (var i = 0; i < mapValues.length; i++) {
-            json += '{';
-            json += '"organisation": "' + mapValues[i].orgUnitId + '",';
-            json += '"value": "' + mapValues[i].value + '"';
-            json += i < mapValues.length - 1 ? '},' : '}';
-        }
-        json += ']';
-        json += '}';
-        return json;
-    },
-
     getLegendsJSON: function() {
         var json = '{';
         json += '"legends":';
@@ -300,8 +319,8 @@
     getVectorLayers: function() {
         var layers = [];
         for (var i = 0; i < G.vars.map.layers.length; i++) {
-            if (G.vars.map.layers[i].layerType == G.fnl.map_layer_type_thematic ||
-            G.vars.map.layers[i].layerType == G.fnl.map_layer_type_overlay) {
+            if (G.vars.map.layers[i].layerType == G.conf.map_layer_type_thematic ||
+            G.vars.map.layers[i].layerType == G.conf.map_layer_type_overlay) {
                 layers.push(G.vars.map.layers[i]);
             }
         }
@@ -369,84 +388,28 @@
     }
 };
 
-G.fnl = {
-	map_legend_type_automatic: 'automatic',
-	map_legend_type_predefined: 'predefined',
-    map_layer_type_baselayer: 'baselayer',
-    map_layer_type_overlay: 'overlay',
-    map_layer_type_thematic: 'thematic',
-	map_value_type_indicator: 'indicator',
-	map_value_type_dataelement: 'dataelement',
-    map_date_type_fixed: 'fixed',
-    map_date_type_start_end: 'start-end',
-    map_selection_type_parent: 'parent',
-    map_selection_type_level: 'level',
-    map_feature_type_multipolygon: 'MultiPolygon',
-    map_feature_type_multipolygon_class_name: 'OpenLayers.Geometry.MultiPolygon',
-    map_feature_type_polygon: 'Polygon',
-    map_feature_type_polygon_class_name: 'OpenLayers.Geometry.Polygon',
-    map_feature_type_point: 'Point',
-    map_feature_type_point_class_name: 'OpenLayers.Geometry.Point',
-    map_view_access_level_user: 'user',
-    map_view_access_level_system: 'system',
-    aggregation_strategy_real_time: 'real_time',
-    aggregation_strategy_batch: 'batch',
-
-    classify_with_bounds: 1,
-    classify_by_equal_intervals: 2,
-    classify_by_quantils: 3
-};
-
-G.help = {
-    setup: 'gisSetup',
-	thematicMap: 'gisThematicMap',
-    overlayRegistration: 'gisOverlay',
-	administration: 'gisAdministration',
-	favorites: 'gisFavoriteMapView',
-	legendSets: 'gisLegendSet',
-    imageExport: 'gisImageExport'
-};
-
 G.vars = {
     map: null,
     
     parameter: null,
     
-    mapDateType: {
-        value: null,
-        setFixed: function() {
-            this.value = G.fnl.map_date_type_fixed;
-        },
-        setStartEnd: function() {
-            this.value = G.fnl.map_date_type_start_end;
-        },
-        isFixed: function() {
-            return this.value === G.fnl.map_date_type_fixed;
-        },
-        isStartEnd: function() {
-            return this.value === G.fnl.map_date_type_start_end;
-        }
-    },
+    mask: null,
     
     activePanel: {
-        value: G.help.thematicMap,
+        value: G.conf.thematicMap,
         setPolygon: function() {
-            this.value = G.help.thematicMap;
+            this.value = G.conf.thematicMap;
         },
         setPoint: function() {
-            this.value = G.help.thematicMap2;
+            this.value = G.conf.thematicMap2;
         },
         isPolygon: function() {
-            return this.value === G.help.thematicMap;
+            return this.value === G.conf.thematicMap;
         },
         isPoint: function() {
-            return this.value === G.help.thematicMap2;
+            return this.value === G.conf.thematicMap2;
         }
-    },
-    
-    mask: null,
-    
-    exportValues: null
+    }
 };
 
 G.user = {
@@ -454,7 +417,23 @@
 };
 
 G.system = {
-    aggregationStrategy: null
+    aggregationStrategy: null,
+    
+    mapDateType: {
+        value: null,
+        setFixed: function() {
+            this.value = G.conf.map_date_type_fixed;
+        },
+        setStartEnd: function() {
+            this.value = G.conf.map_date_type_start_end;
+        },
+        isFixed: function() {
+            return this.value === G.conf.map_date_type_fixed;
+        },
+        isStartEnd: function() {
+            return this.value === G.conf.map_date_type_start_end;
+        }
+    }
 };
 
 G.func = {

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2011-03-16 08:25:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2011-03-16 11:49:41 +0000
@@ -22,8 +22,8 @@
             G.user.initOverlays = init.overlays;
             G.user.isAdmin = init.security.isAdmin;
             G.system.aggregationStrategy = init.systemSettings.aggregationStrategy;
-            G.vars.mapDateType.value = G.system.aggregationStrategy == G.fnl.aggregation_strategy_batch ?
-				G.fnl.map_date_type_fixed : init.userSettings.mapDateType;
+            G.system.mapDateType.value = G.system.aggregationStrategy == G.conf.aggregation_strategy_batch ?
+				G.conf.map_date_type_fixed : init.userSettings.mapDateType;
 
     /* Section: stores */
     var mapViewStore = new Ext.data.JsonStore({
@@ -44,7 +44,7 @@
     
     var polygonMapViewStore = new Ext.data.JsonStore({
         url: G.conf.path_mapping + 'getMapViewsByFeatureType' + G.conf.type,
-        baseParams: {featureType: G.fnl.map_feature_type_multipolygon},
+        baseParams: {featureType: G.conf.map_feature_type_multipolygon},
         root: 'mapViews',
         fields: [ 'id', 'name', 'userId', 'featureType', 'mapValueType', 'indicatorGroupId', 'indicatorId', 'dataElementGroupId', 'dataElementId',
             'mapDateType', 'periodTypeId', 'periodId', 'startDate', 'endDate', 'parentOrganisationUnitId', 'parentOrganisationUnitName',
@@ -61,7 +61,7 @@
     
     var pointMapViewStore = new Ext.data.JsonStore({
         url: G.conf.path_mapping + 'getMapViewsByFeatureType' + G.conf.type,
-        baseParams: {featureType: G.fnl.map_feature_type_point},
+        baseParams: {featureType: G.conf.map_feature_type_point},
         root: 'mapViews',
         fields: [ 'id', 'name', 'userId', 'featureType', 'mapValueType', 'indicatorGroupId', 'indicatorId', 'dataElementGroupId', 'dataElementId',
             'mapDateType', 'periodTypeId', 'periodId', 'startDate', 'endDate', 'parentOrganisationUnitId', 'parentOrganisationUnitName',
@@ -203,7 +203,7 @@
     
     var predefinedMapLegendSetStore = new Ext.data.JsonStore({
         url: G.conf.path_mapping + 'getMapLegendSetsByType' + G.conf.type,
-        baseParams: {type: G.fnl.map_legend_type_predefined},
+        baseParams: {type: G.conf.map_legend_type_predefined},
         root: 'mapLegendSets',
         fields: ['id', 'name', 'indicators', 'dataelements'],
         sortInfo: {field:'name', direction:'ASC'},
@@ -237,7 +237,7 @@
     
 	var polygonOrganisationUnitLevelStore = new Ext.data.JsonStore({
         url: G.conf.path_mapping + 'getOrganisationUnitLevelsByFeatureType' + G.conf.type,
-        baseParams: {featureType: G.fnl.map_feature_type_multipolygon},
+        baseParams: {featureType: G.conf.map_feature_type_multipolygon},
         root: 'organisationUnitLevels',
         fields: ['id', 'level', 'name'],
         autoLoad: false,
@@ -282,7 +282,7 @@
     
 	var baseLayerStore = new Ext.data.JsonStore({
         url: G.conf.path_mapping + 'getMapLayersByType' + G.conf.type,
-        baseParams: {type: G.fnl.map_layer_type_baselayer},
+        baseParams: {type: G.conf.map_layer_type_baselayer},
         root: 'mapLayers',
         fields: ['id', 'name', 'type', 'mapSource', 'layer', 'fillColor', 'fillOpacity', 'strokeColor', 'strokeWidth'],
         sortInfo: {field: 'name', direction: 'ASC'},
@@ -295,7 +295,7 @@
     
     var overlayStore = new Ext.data.JsonStore({
         url: G.conf.path_mapping + 'getMapLayersByType' + G.conf.type,
-        baseParams: {type: G.fnl.map_layer_type_overlay},
+        baseParams: {type: G.conf.map_layer_type_overlay},
         root: 'mapLayers',
         fields: ['id', 'name', 'type', 'mapSource', 'layer', 'fillColor', 'fillOpacity', 'strokeColor', 'strokeWidth'],
         sortInfo: {field: 'name', direction: 'ASC'},
@@ -356,7 +356,7 @@
         })
     });
     
-    polygonLayer.layerType = G.fnl.map_layer_type_thematic;
+    polygonLayer.layerType = G.conf.map_layer_type_thematic;
     G.vars.map.addLayer(polygonLayer);
     
     pointLayer = new OpenLayers.Layer.Vector('Point layer', {
@@ -375,7 +375,7 @@
         })
     });
     
-    pointLayer.layerType = G.fnl.map_layer_type_thematic;
+    pointLayer.layerType = G.conf.map_layer_type_thematic;
     G.vars.map.addLayer(pointLayer);
     
     /* Init base layers */
@@ -385,7 +385,7 @@
 		maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
 		numZoomLevels: 21
 	});
-	gm_normal.layerType = G.fnl.map_layer_type_baselayer;
+	gm_normal.layerType = G.conf.map_layer_type_baselayer;
 	G.vars.map.addLayer(gm_normal);
 	
 	var gm_hybrid = new OpenLayers.Layer.Google("Google Hybrid", {
@@ -394,11 +394,11 @@
 		maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
 		numZoomLevels: 21
 	});
-	gm_hybrid.layerType = G.fnl.map_layer_type_baselayer;
+	gm_hybrid.layerType = G.conf.map_layer_type_baselayer;
 	G.vars.map.addLayer(gm_hybrid);
 	
     var osm = new OpenLayers.Layer.OSM.Osmarender("OpenStreetMap");
-    osm.layerType = G.fnl.map_layer_type_baselayer;
+    osm.layerType = G.conf.map_layer_type_baselayer;
     G.vars.map.addLayer(osm);
     
     /* Init overlays */
@@ -411,7 +411,7 @@
                         G.conf.path_mapping + 'getGeoJsonFromFile.action?name=' + r[i].data.mapSource
                     );
                     
-                    overlay.layerType = G.fnl.map_layer_type_overlay;
+                    overlay.layerType = G.conf.map_layer_type_overlay;
                     
                     overlay.events.register('loadstart', null, G.func.loadStart);
                     overlay.events.register('loadend', null, G.func.loadEnd);
@@ -528,10 +528,10 @@
                         success: function(r) {
                             Ext.message.msg(true, G.i18n.favorite + ' <span class="x-msg-hl">' + vn + '</span> ' + G.i18n.registered);
                             G.stores.mapView.load();
-                            if (params.featureType == G.fnl.map_feature_type_multipolygon) {
+                            if (params.featureType == G.conf.map_feature_type_multipolygon) {
 								G.stores.polygonMapView.load();
 							}
-							else if (params.featureType == G.fnl.map_feature_type_multipolygon) {
+							else if (params.featureType == G.conf.map_feature_type_multipolygon) {
 								G.stores.pointMapView.load();
 							}
                             Ext.getCmp('favoritename_tf').reset();
@@ -566,10 +566,10 @@
                                 Ext.getCmp('favorite_cb').clearValue();
                                 
                                 var featureType = G.stores.mapView.getAt(G.stores.mapView.findExact('id', v)).data.featureType;
-                                if (featureType == G.fnl.map_feature_type_multipolygon) {
+                                if (featureType == G.conf.map_feature_type_multipolygon) {
                                     G.stores.polygonMapView.load();
                                 }
-                                else if (featureType == G.fnl.map_feature_type_point) {
+                                else if (featureType == G.conf.map_feature_type_point) {
                                     G.stores.pointMapView.load();
                                 }
                                 
@@ -766,7 +766,7 @@
                         document.getElementById('layerField').value = 0;
                     }
                     
-                    var overlays = G.util.getVisibleLayers(G.util.getLayersByType(G.fnl.map_layer_type_overlay));
+                    var overlays = G.util.getVisibleLayers(G.util.getLayersByType(G.conf.map_layer_type_overlay));
                     svg = G.util.mergeSvg(svg, G.util.getOverlaysSvg(overlays));
                     
                     if (!svg) {
@@ -1076,7 +1076,7 @@
                                             Ext.Ajax.request({
                                                 url: G.conf.path_mapping + 'addOrUpdateMapLegendSet.action' + params,
                                                 method: 'POST',
-                                                params: {name: mlsv, type: G.fnl.map_legend_type_predefined},
+                                                params: {name: mlsv, type: G.conf.map_legend_type_predefined},
                                                 success: function(r) {
                                                     Ext.message.msg(true, G.i18n.new_legend_set+' <span class="x-msg-hl">' + mlsv + '</span> ' + G.i18n.was_registered);
                                                     G.stores.predefinedMapLegendSet.load();
@@ -1423,31 +1423,31 @@
                 listeners: {
                     tabchange: function(panel, tab) {
                         if (tab.id == 'help0') {
-							setHelpText(G.help.thematicMap, tab);
+							setHelpText(G.conf.thematicMap, tab);
                             helpWindow.setHeight(290);
                         }
                         else if (tab.id == 'help1') {
-							setHelpText(G.help.favorites, tab);
+							setHelpText(G.conf.favorites, tab);
                             helpWindow.setHeight(290);
                         }
                         else if (tab.id == 'help2') {
-                            setHelpText(G.help.legendSets, tab);
+                            setHelpText(G.conf.legendSets, tab);
                             helpWindow.setHeight(290);
                         }
 						if (tab.id == 'help3') { 
-                            setHelpText(G.help.imageExport, tab);
+                            setHelpText(G.conf.imageExport, tab);
                             helpWindow.setHeight(290);
                         }
                         else if (tab.id == 'help4') {
-                            setHelpText(G.help.administration, tab);
+                            setHelpText(G.conf.administration, tab);
                             helpWindow.setHeight(290);
                         }
                         else if (tab.id == 'help5') {
-                            setHelpText(G.help.overlayRegistration, tab);
+                            setHelpText(G.conf.overlayRegistration, tab);
                             helpWindow.setHeight(530);
                         }
                         else if (tab.id == 'help6') {
-                            setHelpText(G.help.setup, tab);
+                            setHelpText(G.conf.setup, tab);
                             helpWindow.setHeight(530);
                         }
                     }
@@ -1640,7 +1640,7 @@
                             overlay.events.register('loadstart', null, G.func.loadStart);
                             overlay.events.register('loadend', null, G.func.loadEnd);
                             overlay.setOpacity(mlfo);
-                            overlay.layerType = G.fnl.map_layer_type_overlay;
+                            overlay.layerType = G.conf.map_layer_type_overlay;
                             
                             G.vars.map.addLayer(overlay);
                             G.vars.map.getLayersByName(mln)[0].setZIndex(G.conf.defaultLayerZIndex);
@@ -1678,7 +1678,7 @@
                     
                     G.vars.map.getLayersByName(mln)[0].destroy();
                     
-                    G.util.setZIndexByLayerType(G.fnl.map_layer_type_overlay, G.conf.defaultLayerZIndex);
+                    G.util.setZIndexByLayerType(G.conf.map_layer_type_overlay, G.conf.defaultLayerZIndex);
                 }
             }
         ]
@@ -1768,7 +1768,7 @@
                     Ext.Ajax.request({
                         url: G.conf.path_mapping + 'addOrUpdateMapLayer' + G.conf.type,
                         method: 'POST',
-                        params: {name: mlbn, type: G.fnl.map_layer_type_baselayer, mapSource: mlbu, layer: mlbl, fillColor: '', fillOpacity: 0, strokeColor: '', strokeWidth: 0},
+                        params: {name: mlbn, type: G.conf.map_layer_type_baselayer, mapSource: mlbu, layer: mlbl, fillColor: '', fillOpacity: 0, strokeColor: '', strokeWidth: 0},
                         success: function(r) {
                             Ext.message.msg(true, G.i18n.baselayer + '<span class="x-msg-hl"> ' + mlbn + '</span> ' + G.i18n.registered);                            
                             G.vars.map.addLayers([
@@ -1845,12 +1845,12 @@
                                 id: 'mapdatetype_cb',
                                 fieldLabel: G.i18n.date_type,
                                 labelSeparator: G.conf.labelseparator,
-                                disabled: G.system.aggregationStrategy === G.fnl.aggregation_strategy_batch,
+                                disabled: G.system.aggregationStrategy === G.conf.aggregation_strategy_batch,
                                 editable: false,
                                 valueField: 'value',
                                 displayField: 'text',
                                 mode: 'local',
-                                value: G.fnl.map_date_type_fixed,
+                                value: G.conf.map_date_type_fixed,
                                 triggerAction: 'all',
                                 width: G.conf.combo_width_fieldset,
                                 minListWidth: G.conf.combo_width_fieldset,
@@ -1858,18 +1858,18 @@
                                     xtype: 'arraystore',
                                     fields: ['value', 'text'],
                                     data: [
-                                        [G.fnl.map_date_type_fixed, G.i18n.fixed_periods],
-                                        [G.fnl.map_date_type_start_end, G.i18n.start_end_dates]
+                                        [G.conf.map_date_type_fixed, G.i18n.fixed_periods],
+                                        [G.conf.map_date_type_start_end, G.i18n.start_end_dates]
                                     ]
                                 },
                                 listeners: {
                                     'select': function(cb) {
-                                        if (cb.getValue() !== G.vars.mapDateType.value) {
-                                            G.vars.mapDateType.value = cb.getValue();
+                                        if (cb.getValue() !== G.system.mapDateType.value) {
+                                            G.system.mapDateType.value = cb.getValue();
                                             Ext.Ajax.request({
                                                 url: G.conf.path_mapping + 'setMapUserSettings' + G.conf.type,
                                                 method: 'POST',
-                                                params: {mapDateType: G.vars.mapDateType.value},
+                                                params: {mapDateType: G.system.mapDateType.value},
                                                 success: function() {
                                                     Ext.message.msg(true, '<span class="x-msg-hl">' + cb.getRawValue() + '</span> '+ G.i18n.saved_as_date_type);
                                                     choropleth.prepareMapViewDateType();
@@ -2127,14 +2127,14 @@
                                                     var color = Ext.getCmp('highlightcolor_cf').getValue();
                                                     var symbolizer;
                                                     
-                                                    if (feature.geometry.CLASS_NAME == G.fnl.map_feature_type_multipolygon_class_name ||
-                                                        feature.geometry.CLASS_NAME == G.fnl.map_feature_type_polygon_class_name) {
+                                                    if (feature.geometry.CLASS_NAME == G.conf.map_feature_type_multipolygon_class_name ||
+                                                        feature.geometry.CLASS_NAME == G.conf.map_feature_type_polygon_class_name) {
                                                         symbolizer = new OpenLayers.Symbolizer.Polygon({
                                                             'strokeColor': color,
                                                             'fillColor': color
                                                         });
                                                     }
-                                                    else if (feature.geometry.CLASS_NAME == G.fnl.map_feature_type_point_class_name) {
+                                                    else if (feature.geometry.CLASS_NAME == G.conf.map_feature_type_point_class_name) {
                                                         symbolizer = new OpenLayers.Symbolizer.Point({
                                                             'pointRadius': 7,
                                                             'fillColor': color
@@ -2441,8 +2441,8 @@
                         scope.legend.classes = mapView.classes || scope.legend.classes;
                         
                         G.vars.map.setCenter(new OpenLayers.LonLat(mapView.longitude, mapView.latitude), mapView.zoom);
-                        G.vars.mapDateType.value = mapView.mapDateType;
-                        Ext.getCmp('mapdatetype_cb').setValue(G.vars.mapDateType.value);
+                        G.system.mapDateType.value = mapView.mapDateType;
+                        Ext.getCmp('mapdatetype_cb').setValue(G.system.mapDateType.value);
 
                         scope.valueType.value = mapView.mapValueType;
                         scope.form.findField('mapvaluetype').setValue(scope.valueType.value);
@@ -2466,8 +2466,8 @@
             var spanEnd = '</span>';
             mapView.label = c1 + G.date.getNowHMS(mapView.timestamp) + spanEnd +
                             c2 + mapView.parentOrganisationUnitName + ' ( ' + '<span style="color:#555">' + mapView.organisationUnitLevelName + '</span> )' + spanEnd + 
-                            c2 + (mapView.mapValueType == G.fnl.map_value_type_indicator ? mapView.indicatorName : mapView.dataElementName) + spanEnd +
-                            c1 + (mapView.mapDateType == G.fnl.map_date_type_fixed ? mapView.periodName : (mapView.startDate + ' - ' + mapView.endDate)) + spanEnd;
+                            c2 + (mapView.mapValueType == G.conf.map_value_type_indicator ? mapView.indicatorName : mapView.dataElementName) + spanEnd +
+                            c1 + (mapView.mapDateType == G.conf.map_date_type_fixed ? mapView.periodName : (mapView.startDate + ' - ' + mapView.endDate)) + spanEnd;
             
             for (var i = 0; i < this.menu.items.items.length; i++) {
                 if (G.util.compareObjToObj(mapView, this.menu.items.items[i].mapView, ['longitude','latitude','zoom','widget','timestamp','label'])) {
@@ -2619,8 +2619,8 @@
         ],
         listeners: {
             'afterrender': function() {
-                G.util.setOpacityByLayerType(G.fnl.map_layer_type_overlay, G.conf.defaultLayerOpacity);
-                G.util.setOpacityByLayerType(G.fnl.map_layer_type_thematic, G.conf.defaultLayerOpacity);
+                G.util.setOpacityByLayerType(G.conf.map_layer_type_overlay, G.conf.defaultLayerOpacity);
+                G.util.setOpacityByLayerType(G.conf.map_layer_type_thematic, G.conf.defaultLayerOpacity);
                 
                 var svg = document.getElementsByTagName('svg');
                 
@@ -2630,12 +2630,12 @@
                 }
                 
                 for (var i = 0, j = 2; i < G.vars.map.layers.length; i++) {
-                    if (G.vars.map.layers[i].layerType == G.fnl.map_layer_type_overlay) {
+                    if (G.vars.map.layers[i].layerType == G.conf.map_layer_type_overlay) {
                         G.vars.map.layers[i].svgId = svg[j++].id;
                     }
                 }
             
-                Ext.getCmp('mapdatetype_cb').setValue(G.vars.mapDateType.value);
+                Ext.getCmp('mapdatetype_cb').setValue(G.system.mapDateType.value);
                 
                 choropleth.prepareMapViewValueType();
                 symbol.prepareMapViewValueType();

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js	2011-03-16 08:25:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js	2011-03-16 11:49:41 +0000
@@ -281,9 +281,9 @@
     classify: function(method, nbBins, bounds) {
         var mlt = G.vars.activePanel.isPolygon() ?
             choropleth.legend.value : G.vars.activePanel.isPoint() ?
-                symbol.legend.value : G.fnl.map_legend_type_automatic;
+                symbol.legend.value : G.conf.map_legend_type_automatic;
     
-		if (mlt == G.fnl.map_legend_type_automatic) {
+		if (mlt == G.conf.map_legend_type_automatic) {
 			if (method == mapfish.GeoStat.Distribution.CLASSIFY_WITH_BOUNDS) {
 				var str = G.vars.activePanel.isPolygon() ? choropleth.form.findField('bounds').getValue() : symbol.form.findField('bounds').getValue();
 				
@@ -325,7 +325,7 @@
 				bounds.push(this.maxVal);
 			}
 		}
-		else if (mlt == G.fnl.map_legend_type_predefined) {
+		else if (mlt == G.conf.map_legend_type_predefined) {
 			bounds = G.vars.activePanel.isPolygon() ? choropleth.bounds : symbol.bounds;
 
 			if (bounds[0] > this.minVal) {

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Choropleth.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Choropleth.js	2011-03-16 08:25:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Choropleth.js	2011-03-16 11:49:41 +0000
@@ -55,13 +55,13 @@
         var numColors = this.classification.bins.length;
 		var mapLegendType = choropleth.form.findField('maplegendtype').getValue();
         
-        if (mapLegendType == G.fnl.map_legend_type_automatic) {
+        if (mapLegendType == G.conf.map_legend_type_automatic) {
 			this.colorInterpolation = mapfish.ColorRgb.getColorsArrayByRgbInterpolation(initialColors[0], initialColors[1], numColors);
             for (var i = 0; i < choropleth.imageLegend.length && i < this.colorInterpolation.length; i++) {
                 choropleth.imageLegend[i].color = this.colorInterpolation[i].toHexString();
             }
 		}
-		else if (mapLegendType == G.fnl.map_legend_type_predefined) {
+		else if (mapLegendType == G.conf.map_legend_type_predefined) {
 			this.colorInterpolation = choropleth.colorInterpolation;
             for (var j = 0; j < choropleth.imageLegend.length && j < this.colorInterpolation.length; j++) {
                 choropleth.imageLegend[j].color = this.colorInterpolation[j].toHexString();

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Symbol.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Symbol.js	2011-03-16 08:25:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Symbol.js	2011-03-16 11:49:41 +0000
@@ -63,13 +63,13 @@
         var numColors = this.classification.bins.length;
 		var mapLegendType = symbol.form.findField('maplegendtype').getValue();
 		
-		if (mapLegendType == G.fnl.map_legend_type_automatic) {
+		if (mapLegendType == G.conf.map_legend_type_automatic) {
 			this.colorInterpolation = mapfish.ColorRgb.getColorsArrayByRgbInterpolation(initialColors[0], initialColors[1], numColors);
 			for (var i = 0; i < symbol.imageLegend.length && i < this.colorInterpolation.length; i++) {
 				symbol.imageLegend[i].color = this.colorInterpolation[i].toHexString();
 			}
 		}
-		else if (mapLegendType == G.fnl.map_legend_type_predefined) {
+		else if (mapLegendType == G.conf.map_legend_type_predefined) {
 			this.colorInterpolation = symbol.colorInterpolation;
 			for (var j = 0; j < symbol.imageLegend.length && j < this.colorInterpolation.length; j++) {
 				symbol.imageLegend[j].color = this.colorInterpolation[j].toHexString();

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2011-03-16 08:25:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2011-03-16 12:23:26 +0000
@@ -87,7 +87,7 @@
         this.createSelectFeatures();
 
         if (G.vars.parameter.id) {
-			if (G.vars.parameter.mapView.featureType == G.fnl.map_feature_type_multipolygon) {
+			if (G.vars.parameter.mapView.featureType == G.conf.map_feature_type_multipolygon) {
 				this.mapView = G.vars.parameter.mapView;
 				this.updateValues = true;
 				this.legend = {
@@ -147,8 +147,8 @@
     
     initProperties: function() {
         this.legend = {
-            value: G.fnl.map_legend_type_automatic,
-            method: G.fnl.classify_by_equal_intervals,
+            value: G.conf.map_legend_type_automatic,
+            method: G.conf.classify_by_equal_intervals,
             classes: 5
         };
         
@@ -195,18 +195,18 @@
         };
         
         this.valueType = {
-            value: G.fnl.map_value_type_indicator,
+            value: G.conf.map_value_type_indicator,
             setIndicator: function() {
-                this.value = G.fnl.map_value_type_indicator;
+                this.value = G.conf.map_value_type_indicator;
             },
             setDatElement: function() {
-                this.value = G.fnl.map_value_type_dataelement;
+                this.value = G.conf.map_value_type_dataelement;
             },
             isIndicator: function() {
-                return this.value == G.fnl.map_value_type_indicator;
+                return this.value == G.conf.map_value_type_indicator;
             },
             isDataElement: function() {
-                return this.value == G.fnl.map_value_type_dataelement;
+                return this.value == G.conf.map_value_type_dataelement;
             }
         };
     },
@@ -241,8 +241,8 @@
                         this.legend.classes = this.mapView.classes || this.legend.classes;
 
                         G.vars.map.setCenter(new OpenLayers.LonLat(this.mapView.longitude, this.mapView.latitude), this.mapView.zoom);
-                        G.vars.mapDateType.value = this.mapView.mapDateType;
-                        Ext.getCmp('mapdatetype_cb').setValue(G.vars.mapDateType.value);
+                        G.system.mapDateType.value = this.mapView.mapDateType;
+                        Ext.getCmp('mapdatetype_cb').setValue(G.system.mapDateType.value);
 
                         this.valueType.value = this.mapView.mapValueType;
                         this.form.findField('mapvaluetype').setValue(this.valueType.value);
@@ -265,12 +265,12 @@
             mode: 'local',
             triggerAction: 'all',
             width: G.conf.combo_width,
-			value: G.fnl.map_value_type_indicator,
+			value: G.conf.map_value_type_indicator,
             store: new Ext.data.ArrayStore({
                 fields: ['id', 'name'],
                 data: [
-                    [G.fnl.map_value_type_indicator, 'Indicator'],
-                    [G.fnl.map_value_type_dataelement, 'Data element']
+                    [G.conf.map_value_type_indicator, 'Indicator'],
+                    [G.conf.map_value_type_dataelement, 'Data element']
                 ]
             }),
 			listeners: {
@@ -348,7 +348,7 @@
                             success: function(r) {
                                 var mapLegendSet = Ext.util.JSON.decode(r.responseText).mapLegendSet[0];
                                 if (mapLegendSet.id) {
-                                    this.legend.value = G.fnl.map_legend_type_predefined;
+                                    this.legend.value = G.conf.map_legend_type_predefined;
                                     this.prepareMapViewLegend();
                                     
                                     function load() {
@@ -366,7 +366,7 @@
                                     }
                                 }
                                 else {
-                                    this.legend.value = G.fnl.map_legend_type_automatic;
+                                    this.legend.value = G.conf.map_legend_type_automatic;
                                     this.prepareMapViewLegend();
                                     this.classify(false, cb.keepPosition);
                                     G.util.setKeepPosition(cb);
@@ -440,7 +440,7 @@
                             success: function(r) {
                                 var mapLegendSet = Ext.util.JSON.decode(r.responseText).mapLegendSet[0];
                                 if (mapLegendSet.id) {
-                                    this.legend.value = G.fnl.map_legend_type_predefined;
+                                    this.legend.value = G.conf.map_legend_type_predefined;
                                     this.prepareMapViewLegend();
                                     
                                     function load() {
@@ -458,7 +458,7 @@
                                     }
                                 }
                                 else {
-                                    this.legend.value = G.fnl.map_legend_type_automatic;
+                                    this.legend.value = G.conf.map_legend_type_automatic;
                                     this.prepareMapViewLegend();
                                     this.classify(false, cb.keepPosition);
                                     G.util.setKeepPosition(cb);
@@ -648,24 +648,24 @@
             store: new Ext.data.ArrayStore({
                 fields: ['value', 'text'],
                 data: [
-					[G.fnl.map_legend_type_automatic, G.i18n.automatic],
-					[G.fnl.map_legend_type_predefined, G.i18n.predefined]
+					[G.conf.map_legend_type_automatic, G.i18n.automatic],
+					[G.conf.map_legend_type_predefined, G.i18n.predefined]
 				]
             }),
             listeners: {
                 'select': {
                     scope: this,
                     fn: function(cb) {
-                        if (cb.getValue() == G.fnl.map_legend_type_predefined && cb.getValue() != this.legend.value) {
-							this.legend.value = G.fnl.map_legend_type_predefined;
+                        if (cb.getValue() == G.conf.map_legend_type_predefined && cb.getValue() != this.legend.value) {
+							this.legend.value = G.conf.map_legend_type_predefined;
                             this.prepareMapViewLegend();
 							
 							if (this.form.findField('maplegendset').getValue()) {
                                 this.applyPredefinedLegend();
 							}
                         }
-                        else if (cb.getValue() == G.fnl.map_legend_type_automatic && cb.getValue() != this.legend.value) {
-							this.legend.value = G.fnl.map_legend_type_automatic;
+                        else if (cb.getValue() == G.conf.map_legend_type_automatic && cb.getValue() != this.legend.value) {
+							this.legend.value = G.conf.map_legend_type_automatic;
 							this.prepareMapViewLegend();                            
                             this.classify(false, true);
                         }
@@ -725,8 +725,8 @@
                     scope: this,
                     fn: function(cb) {
                         this.form.findField('mapview').clearValue();
-                        if (cb.getValue() == G.fnl.classify_with_bounds && cb.getValue() != this.legend.method) {
-							this.legend.method = G.fnl.classify_with_bounds;
+                        if (cb.getValue() == G.conf.classify_with_bounds && cb.getValue() != this.legend.method) {
+							this.legend.method = G.conf.classify_with_bounds;
                             this.prepareMapViewLegend();
                         }
                         else if (cb.getValue() != this.legend.method) {
@@ -1075,7 +1075,7 @@
     
     prepareMapViewDateType: function() {
         var obj = {};
-        if (G.vars.mapDateType.isFixed()) {
+        if (G.system.mapDateType.isFixed()) {
             this.form.findField('periodtype').showField();
             this.form.findField('period').showField();
             this.form.findField('startdate').hideField();
@@ -1093,7 +1093,7 @@
                 c2: 'periodId'
             };
         }
-        else if (G.vars.mapDateType.isStartEnd()) {
+        else if (G.system.mapDateType.isStartEnd()) {
             this.form.findField('periodtype').hideField();
             this.form.findField('period').hideField();
             this.form.findField('startdate').showField();
@@ -1113,13 +1113,13 @@
     prepareMapViewLegend: function() {
         this.form.findField('maplegendtype').setValue(this.legend.value);
         
-        if (this.legend.value == G.fnl.map_legend_type_automatic) {
+        if (this.legend.value == G.conf.map_legend_type_automatic) {
             this.form.findField('method').showField();
             this.form.findField('startcolor').showField();
             this.form.findField('endcolor').showField();
             this.form.findField('maplegendset').hideField();
             
-            if (this.legend.method == G.fnl.classify_with_bounds) {
+            if (this.legend.method == G.conf.classify_with_bounds) {
                 this.form.findField('classes').hideField();
                 this.form.findField('bounds').showField();
             }
@@ -1128,7 +1128,7 @@
                 this.form.findField('bounds').hideField();
             }                
         }
-        else if (this.legend.value == G.fnl.map_legend_type_predefined) {
+        else if (this.legend.value == G.conf.map_legend_type_predefined) {
             this.form.findField('method').hideField();
             this.form.findField('classes').hideField();
             this.form.findField('bounds').hideField();
@@ -1149,7 +1149,7 @@
                 obj.components.valueType.currentValue = this.mapView[obj.mapView.valueType];
                 
                 obj = this.prepareMapViewDateType();
-                if (G.vars.mapDateType.isFixed()) {
+                if (G.system.mapDateType.isFixed()) {
                     if (obj.stores.c1.isLoaded) {
                         dateTypeGroupStoreCallback.call(this);
                     }
@@ -1159,7 +1159,7 @@
                         }});
                     }
                 }
-                else if (G.vars.mapDateType.isStartEnd()) {
+                else if (G.system.mapDateType.isStartEnd()) {
                     obj.components.c1.setValue(new Date(this.mapView[obj.mapView.c1]));
                     obj.components.c2.setValue(new Date(this.mapView[obj.mapView.c2]));
                     
@@ -1199,12 +1199,12 @@
             this.applyPredefinedLegend(true);
         }
 
-        if (this.legend.value == G.fnl.map_legend_type_automatic) {
+        if (this.legend.value == G.conf.map_legend_type_automatic) {
             this.form.findField('method').setValue(this.mapView.method);
             this.form.findField('startcolor').setValue(this.mapView.colorLow);
             this.form.findField('endcolor').setValue(this.mapView.colorHigh);
 
-            if (this.legend.method == G.fnl.classify_with_bounds) {
+            if (this.legend.method == G.conf.classify_with_bounds) {
                 this.form.findField('bounds').setValue(this.mapView.bounds);
             }
             else {
@@ -1213,7 +1213,7 @@
 
             this.setMapViewMap();
         }
-        else if (this.legend.value == G.fnl.map_legend_type_predefined) {
+        else if (this.legend.value == G.conf.map_legend_type_predefined) {
             if (G.stores.predefinedMapLegendSet.isLoaded) {
                 predefinedMapLegendSetStoreCallback.call(this);
             }
@@ -1238,7 +1238,7 @@
     },
 	
 	applyPredefinedLegend: function(isMapView) {
-        this.legend.value = G.fnl.map_legend_type_predefined;
+        this.legend.value = G.conf.map_legend_type_predefined;
 		var mls = this.form.findField('maplegendset').getValue();
 		var bounds = [];
 		Ext.Ajax.request({
@@ -1278,7 +1278,7 @@
     formValidation: {
         validateForm: function(exception) {
             var scope = choropleth;
-            if (scope.form.findField('mapvaluetype').getValue() == G.fnl.map_value_type_indicator) {
+            if (scope.form.findField('mapvaluetype').getValue() == G.conf.map_value_type_indicator) {
                 if (!scope.form.findField('indicator').getValue()) {
                     if (exception) {
                         Ext.message.msg(false, G.i18n.form_is_not_complete);
@@ -1286,7 +1286,7 @@
                     return false;
                 }
             }
-            else if (scope.form.findField('mapvaluetype').getValue() == G.fnl.map_value_type_dataelement) {
+            else if (scope.form.findField('mapvaluetype').getValue() == G.conf.map_value_type_dataelement) {
                 if (!scope.form.findField('dataelement').getValue()) {
                     if (exception) {
                         Ext.message.msg(false, G.i18n.form_is_not_complete);
@@ -1295,7 +1295,7 @@
                 }
             }
 
-            if (G.vars.mapDateType.isFixed()) {
+            if (G.system.mapDateType.isFixed()) {
                 if (!scope.form.findField('period').getValue()) {
                     if (exception) {
                         Ext.message.msg(false, G.i18n.form_is_not_complete);
@@ -1319,8 +1319,8 @@
                 return false;
             }
 
-            if (scope.form.findField('maplegendtype').getValue() == G.fnl.map_legend_type_automatic) {
-                if (scope.form.findField('method').getValue() == G.fnl.classify_with_bounds) {
+            if (scope.form.findField('maplegendtype').getValue() == G.conf.map_legend_type_automatic) {
+                if (scope.form.findField('method').getValue() == G.conf.classify_with_bounds) {
                     if (!scope.form.findField('bounds').getValue()) {
                         if (exception) {
                             Ext.message.msg(false, G.i18n.form_is_not_complete);
@@ -1329,7 +1329,7 @@
                     }
                 }
             }
-            else if (scope.form.findField('maplegendtype').getValue() == G.fnl.map_legend_type_predefined) {
+            else if (scope.form.findField('maplegendtype').getValue() == G.conf.map_legend_type_predefined) {
                 if (!scope.form.findField('maplegendset').getValue()) {
                     if (exception) {
                         Ext.message.msg(false, G.i18n.form_is_not_complete);
@@ -1367,7 +1367,7 @@
     formValues: {
 		getAllValues: function() {
 			return {
-                featureType: G.fnl.map_feature_type_multipolygon,
+                featureType: G.conf.map_feature_type_multipolygon,
                 mapValueType: this.form.findField('mapvaluetype').getValue(),
                 indicatorGroupId: this.valueType.isIndicator() ? this.form.findField('indicatorgroup').getValue() : null,
                 indicatorId: this.valueType.isIndicator() ? this.form.findField('indicator').getValue() : null,
@@ -1375,24 +1375,24 @@
                 dataElementGroupId: this.valueType.isDataElement() ? this.form.findField('dataelementgroup').getValue() : null,
                 dataElementId: this.valueType.isDataElement() ? this.form.findField('dataelement').getValue() : null,
 				dataElementName: this.valueType.isDataElement() ? this.form.findField('dataelement').getRawValue() : null,
-                mapDateType: G.vars.mapDateType.value,
-                periodTypeId: G.vars.mapDateType.isFixed() ? this.form.findField('periodtype').getValue() : null,
-                periodId: G.vars.mapDateType.isFixed() ? this.form.findField('period').getValue() : null,
-                periodName: G.vars.mapDateType.isFixed() ? this.form.findField('period').getRawValue() : null,
-                startDate: G.vars.mapDateType.isStartEnd() ? this.form.findField('startdate').getRawValue() : null,
-                endDate: G.vars.mapDateType.isStartEnd() ? this.form.findField('enddate').getRawValue() : null,
+                mapDateType: G.system.mapDateType.value,
+                periodTypeId: G.system.mapDateType.isFixed() ? this.form.findField('periodtype').getValue() : null,
+                periodId: G.system.mapDateType.isFixed() ? this.form.findField('period').getValue() : null,
+                periodName: G.system.mapDateType.isFixed() ? this.form.findField('period').getRawValue() : null,
+                startDate: G.system.mapDateType.isStartEnd() ? this.form.findField('startdate').getRawValue() : null,
+                endDate: G.system.mapDateType.isStartEnd() ? this.form.findField('enddate').getRawValue() : null,
                 parentOrganisationUnitId: this.organisationUnitSelection.parent.id,
                 parentOrganisationUnitLevel: this.organisationUnitSelection.parent.level,
                 parentOrganisationUnitName: this.organisationUnitSelection.parent.name,
                 organisationUnitLevel: this.organisationUnitSelection.level.level,
                 organisationUnitLevelName: this.organisationUnitSelection.level.name,
                 mapLegendType: this.form.findField('maplegendtype').getValue(),
-                method: this.legend.value == G.fnl.map_legend_type_automatic ? this.form.findField('method').getValue() : null,
-                classes: this.legend.value == G.fnl.map_legend_type_automatic ? this.form.findField('classes').getValue() : null,
-                bounds: this.legend.value == G.fnl.map_legend_type_automatic && this.legend.method == G.fnl.classify_with_bounds ? this.form.findField('bounds').getValue() : null,
-                colorLow: this.legend.value == G.fnl.map_legend_type_automatic ? this.form.findField('startcolor').getValue() : null,
-                colorHigh: this.legend.value == G.fnl.map_legend_type_automatic ? this.form.findField('endcolor').getValue() : null,
-                mapLegendSetId: this.legend.value == G.fnl.map_legend_type_predefined ? this.form.findField('maplegendset').getValue() : null,
+                method: this.legend.value == G.conf.map_legend_type_automatic ? this.form.findField('method').getValue() : null,
+                classes: this.legend.value == G.conf.map_legend_type_automatic ? this.form.findField('classes').getValue() : null,
+                bounds: this.legend.value == G.conf.map_legend_type_automatic && this.legend.method == G.conf.classify_with_bounds ? this.form.findField('bounds').getValue() : null,
+                colorLow: this.legend.value == G.conf.map_legend_type_automatic ? this.form.findField('startcolor').getValue() : null,
+                colorHigh: this.legend.value == G.conf.map_legend_type_automatic ? this.form.findField('endcolor').getValue() : null,
+                mapLegendSetId: this.legend.value == G.conf.map_legend_type_predefined ? this.form.findField('maplegendset').getValue() : null,
                 radiusLow: null,
                 radiusHigh: null,
                 longitude: G.vars.map.getCenter().lon,
@@ -1403,9 +1403,9 @@
         
         getImageExportValues: function() {
 			return {
-				mapValueTypeValue: this.form.findField('mapvaluetype').getValue() == G.fnl.map_value_type_indicator ?
+				mapValueTypeValue: this.form.findField('mapvaluetype').getValue() == G.conf.map_value_type_indicator ?
 					this.form.findField('indicator').getRawValue() : this.form.findField('dataelement').getRawValue(),
-				dateValue: G.vars.mapDateType.isFixed() ?
+				dateValue: G.system.mapDateType.isFixed() ?
 					this.form.findField('period').getRawValue() : new Date(this.form.findField('startdate').getRawValue()).format('Y M j') + ' - ' + new Date(this.form.findField('enddate').getRawValue()).format('Y M j')
 			};
 		}
@@ -1445,9 +1445,9 @@
                 var dataUrl = this.valueType.isIndicator() ? 'getIndicatorMapValues' : 'getDataElementMapValues';
                 var params = {
                     id: this.valueType.isIndicator() ? this.form.findField('indicator').getValue() : this.form.findField('dataelement').getValue(),
-                    periodId: G.vars.mapDateType.isFixed() ? this.form.findField('period').getValue() : null,
-                    startDate: G.vars.mapDateType.isStartEnd() ? new Date(this.form.findField('startdate').getValue()).format('Y-m-d') : null,
-                    endDate: G.vars.mapDateType.isStartEnd() ? new Date(this.form.findField('enddate').getValue()).format('Y-m-d') : null,
+                    periodId: G.system.mapDateType.isFixed() ? this.form.findField('period').getValue() : null,
+                    startDate: G.system.mapDateType.isStartEnd() ? new Date(this.form.findField('startdate').getValue()).format('Y-m-d') : null,
+                    endDate: G.system.mapDateType.isStartEnd() ? new Date(this.form.findField('enddate').getValue()).format('Y-m-d') : null,
                     parentId: this.organisationUnitSelection.parent.id,
                     level: this.organisationUnitSelection.level.level
                 };
@@ -1459,7 +1459,6 @@
                     scope: this,
                     success: function(r) {
                         var mapvalues = Ext.util.JSON.decode(r.responseText).mapvalues;
-                        G.vars.exportValues = G.util.getExportDataValueJSON(mapvalues);
                         
                         if (!this.layer.features.length) {
                             Ext.message.msg(false, 'No coordinates found');

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2011-03-16 08:25:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2011-03-16 12:23:26 +0000
@@ -87,7 +87,7 @@
         this.createSelectFeatures();
 
         if (G.vars.parameter.id) {
-			if (G.vars.parameter.mapView.featureType == G.fnl.map_feature_type_point) {
+			if (G.vars.parameter.mapView.featureType == G.conf.map_feature_type_point) {
 				this.mapView = G.vars.parameter.mapView;
 				this.updateValues = true;
 				this.legend = {
@@ -146,8 +146,8 @@
     
     initProperties: function() {
         this.legend = {
-            value: G.fnl.map_legend_type_automatic,
-            method: G.fnl.classify_by_equal_intervals,
+            value: G.conf.map_legend_type_automatic,
+            method: G.conf.classify_by_equal_intervals,
             classes: 5
         };
         
@@ -194,18 +194,18 @@
         };
         
         this.valueType = {
-            value: G.fnl.map_value_type_indicator,
+            value: G.conf.map_value_type_indicator,
             setIndicator: function() {
-                this.value = G.fnl.map_value_type_indicator;
+                this.value = G.conf.map_value_type_indicator;
             },
             setDatElement: function() {
-                this.value = G.fnl.map_value_type_dataelement;
+                this.value = G.conf.map_value_type_dataelement;
             },
             isIndicator: function() {
-                return this.value == G.fnl.map_value_type_indicator;
+                return this.value == G.conf.map_value_type_indicator;
             },
             isDataElement: function() {
-                return this.value == G.fnl.map_value_type_dataelement;
+                return this.value == G.conf.map_value_type_dataelement;
             }
         };
     },
@@ -240,8 +240,8 @@
                         this.legend.classes = this.mapView.classes || this.legend.classes;
 
                         G.vars.map.setCenter(new OpenLayers.LonLat(this.mapView.longitude, this.mapView.latitude), this.mapView.zoom);
-                        G.vars.mapDateType.value = this.mapView.mapDateType;
-                        Ext.getCmp('mapdatetype_cb').setValue(G.vars.mapDateType.value);
+                        G.system.mapDateType.value = this.mapView.mapDateType;
+                        Ext.getCmp('mapdatetype_cb').setValue(G.system.mapDateType.value);
 
                         this.valueType.value = this.mapView.mapValueType;
                         this.form.findField('mapvaluetype').setValue(this.valueType.value);
@@ -264,12 +264,12 @@
             mode: 'local',
             triggerAction: 'all',
             width: G.conf.combo_width,
-			value: G.fnl.map_value_type_indicator,
+			value: G.conf.map_value_type_indicator,
             store: new Ext.data.ArrayStore({
                 fields: ['id', 'name'],
                 data: [
-                    [G.fnl.map_value_type_indicator, 'Indicator'],
-                    [G.fnl.map_value_type_dataelement, 'Data element']
+                    [G.conf.map_value_type_indicator, 'Indicator'],
+                    [G.conf.map_value_type_dataelement, 'Data element']
                 ]
             }),
 			listeners: {
@@ -347,7 +347,7 @@
                             success: function(r) {
                                 var mapLegendSet = Ext.util.JSON.decode(r.responseText).mapLegendSet[0];
                                 if (mapLegendSet.id) {
-                                    this.legend.value = G.fnl.map_legend_type_predefined;
+                                    this.legend.value = G.conf.map_legend_type_predefined;
                                     this.prepareMapViewLegend();
                                     
                                     function load() {
@@ -365,7 +365,7 @@
                                     }
                                 }
                                 else {
-                                    this.legend.value = G.fnl.map_legend_type_automatic;
+                                    this.legend.value = G.conf.map_legend_type_automatic;
                                     this.prepareMapViewLegend();
                                     this.classify(false, cb.keepPosition);
                                     G.util.setKeepPosition(cb);
@@ -439,7 +439,7 @@
                             success: function(r) {
                                 var mapLegendSet = Ext.util.JSON.decode(r.responseText).mapLegendSet[0];
                                 if (mapLegendSet.id) {
-                                    this.legend.value = G.fnl.map_legend_type_predefined;
+                                    this.legend.value = G.conf.map_legend_type_predefined;
                                     this.prepareMapViewLegend();
                                     
                                     function load() {
@@ -457,7 +457,7 @@
                                     }
                                 }
                                 else {
-                                    this.legend.value = G.fnl.map_legend_type_automatic;
+                                    this.legend.value = G.conf.map_legend_type_automatic;
                                     this.prepareMapViewLegend();
                                     this.classify(false, cb.keepPosition);
                                     G.util.setKeepPosition(cb);
@@ -635,24 +635,24 @@
             store: new Ext.data.ArrayStore({
                 fields: ['value', 'text'],
                 data: [
-					[G.fnl.map_legend_type_automatic, G.i18n.automatic],
-					[G.fnl.map_legend_type_predefined, G.i18n.predefined]
+					[G.conf.map_legend_type_automatic, G.i18n.automatic],
+					[G.conf.map_legend_type_predefined, G.i18n.predefined]
 				]
             }),
             listeners: {
                 'select': {
                     scope: this,
                     fn: function(cb) {
-                        if (cb.getValue() == G.fnl.map_legend_type_predefined && cb.getValue() != this.legend.value) {
-							this.legend.value = G.fnl.map_legend_type_predefined;
+                        if (cb.getValue() == G.conf.map_legend_type_predefined && cb.getValue() != this.legend.value) {
+							this.legend.value = G.conf.map_legend_type_predefined;
                             this.prepareMapViewLegend();
 							
 							if (this.form.findField('maplegendset').getValue()) {
                                 this.applyPredefinedLegend();
 							}
                         }
-                        else if (cb.getValue() == G.fnl.map_legend_type_automatic && cb.getValue() != this.legend.value) {
-							this.legend.value = G.fnl.map_legend_type_automatic;
+                        else if (cb.getValue() == G.conf.map_legend_type_automatic && cb.getValue() != this.legend.value) {
+							this.legend.value = G.conf.map_legend_type_automatic;
 							this.prepareMapViewLegend();                            
                             this.classify(false, true);
                         }
@@ -712,8 +712,8 @@
                     scope: this,
                     fn: function(cb) {
                         this.form.findField('mapview').clearValue();
-                        if (cb.getValue() == G.fnl.classify_with_bounds && cb.getValue() != this.legend.method) {
-							this.legend.method = G.fnl.classify_with_bounds;
+                        if (cb.getValue() == G.conf.classify_with_bounds && cb.getValue() != this.legend.method) {
+							this.legend.method = G.conf.classify_with_bounds;
                             this.prepareMapViewLegend();
                         }
                         else if (cb.getValue() != this.legend.method) {
@@ -1054,7 +1054,7 @@
     
     prepareMapViewDateType: function() {
         var obj = {};
-        if (G.vars.mapDateType.isFixed()) {
+        if (G.system.mapDateType.isFixed()) {
             this.form.findField('periodtype').showField();
             this.form.findField('period').showField();
             this.form.findField('startdate').hideField();
@@ -1072,7 +1072,7 @@
                 c2: 'periodId'
             };
         }
-        else if (G.vars.mapDateType.isStartEnd()) {
+        else if (G.system.mapDateType.isStartEnd()) {
             this.form.findField('periodtype').hideField();
             this.form.findField('period').hideField();
             this.form.findField('startdate').showField();
@@ -1092,13 +1092,13 @@
     prepareMapViewLegend: function() {
         this.form.findField('maplegendtype').setValue(this.legend.value);
         
-        if (this.legend.value == G.fnl.map_legend_type_automatic) {
+        if (this.legend.value == G.conf.map_legend_type_automatic) {
             this.form.findField('method').showField();
             this.form.findField('startcolor').showField();
             this.form.findField('endcolor').showField();
             this.form.findField('maplegendset').hideField();
             
-            if (this.legend.method == G.fnl.classify_with_bounds) {
+            if (this.legend.method == G.conf.classify_with_bounds) {
                 this.form.findField('classes').hideField();
                 this.form.findField('bounds').showField();
             }
@@ -1107,7 +1107,7 @@
                 this.form.findField('bounds').hideField();
             }                
         }
-        else if (this.legend.value == G.fnl.map_legend_type_predefined) {
+        else if (this.legend.value == G.conf.map_legend_type_predefined) {
             this.form.findField('method').hideField();
             this.form.findField('classes').hideField();
             this.form.findField('bounds').hideField();
@@ -1129,7 +1129,7 @@
                 obj.components.valueType.currentValue = this.mapView[obj.mapView.valueType];
                 
                 obj = this.prepareMapViewDateType();
-                if (G.vars.mapDateType.isFixed()) {
+                if (G.system.mapDateType.isFixed()) {
                     if (obj.stores.c1.isLoaded) {
                         dateTypeGroupStoreCallback.call(this);
                     }
@@ -1139,7 +1139,7 @@
                         }});
                     }
                 }
-                else if (G.vars.mapDateType.isStartEnd()) {
+                else if (G.system.mapDateType.isStartEnd()) {
                     obj.components.c1.setValue(new Date(this.mapView[obj.mapView.c1]));
                     obj.components.c2.setValue(new Date(this.mapView[obj.mapView.c2]));
                     
@@ -1182,12 +1182,12 @@
         this.form.findField('radiuslow').setValue(this.mapView.radiusLow);
         this.form.findField('radiushigh').setValue(this.mapView.radiusHigh);
 
-        if (this.legend.value == G.fnl.map_legend_type_automatic) {
+        if (this.legend.value == G.conf.map_legend_type_automatic) {
             this.form.findField('method').setValue(this.mapView.method);
             this.form.findField('startcolor').setValue(this.mapView.colorLow);
             this.form.findField('endcolor').setValue(this.mapView.colorHigh);
 
-            if (this.legend.method == G.fnl.classify_with_bounds) {
+            if (this.legend.method == G.conf.classify_with_bounds) {
                 this.form.findField('bounds').setValue(this.mapView.bounds);
             }
             else {
@@ -1196,7 +1196,7 @@
 
             this.setMapViewMap();
         }
-        else if (this.legend.value == G.fnl.map_legend_type_predefined) {
+        else if (this.legend.value == G.conf.map_legend_type_predefined) {
             if (G.stores.predefinedMapLegendSet.isLoaded) {
                 predefinedMapLegendSetStoreCallback.call(this);
             }
@@ -1220,7 +1220,7 @@
     },
 	
 	applyPredefinedLegend: function(isMapView) {
-        this.legend.value = G.fnl.map_legend_type_predefined;
+        this.legend.value = G.conf.map_legend_type_predefined;
 		var mls = this.form.findField('maplegendset').getValue();
 		var bounds = [];
 		Ext.Ajax.request({
@@ -1260,7 +1260,7 @@
     formValidation: {
         validateForm: function(exception) {
             var scope = symbol;
-            if (scope.form.findField('mapvaluetype').getValue() == G.fnl.map_value_type_indicator) {
+            if (scope.form.findField('mapvaluetype').getValue() == G.conf.map_value_type_indicator) {
                 if (!scope.form.findField('indicator').getValue()) {
                     if (exception) {
                         Ext.message.msg(false, G.i18n.form_is_not_complete);
@@ -1268,7 +1268,7 @@
                     return false;
                 }
             }
-            else if (scope.form.findField('mapvaluetype').getValue() == G.fnl.map_value_type_dataelement) {
+            else if (scope.form.findField('mapvaluetype').getValue() == G.conf.map_value_type_dataelement) {
                 if (!scope.form.findField('dataelement').getValue()) {
                     if (exception) {
                         Ext.message.msg(false, G.i18n.form_is_not_complete);
@@ -1277,7 +1277,7 @@
                 }
             }
 
-            if (G.vars.mapDateType.isFixed()) {
+            if (G.system.mapDateType.isFixed()) {
                 if (!scope.form.findField('period').getValue()) {
                     if (exception) {
                         Ext.message.msg(false, G.i18n.form_is_not_complete);
@@ -1301,8 +1301,8 @@
                 return false;
             }
 
-            if (scope.form.findField('maplegendtype').getValue() == G.fnl.map_legend_type_automatic) {
-                if (scope.form.findField('method').getValue() == G.fnl.classify_with_bounds) {
+            if (scope.form.findField('maplegendtype').getValue() == G.conf.map_legend_type_automatic) {
+                if (scope.form.findField('method').getValue() == G.conf.classify_with_bounds) {
                     if (!scope.form.findField('bounds').getValue()) {
                         if (exception) {
                             Ext.message.msg(false, G.i18n.form_is_not_complete);
@@ -1311,7 +1311,7 @@
                     }
                 }
             }
-            else if (scope.form.findField('maplegendtype').getValue() == G.fnl.map_legend_type_predefined) {
+            else if (scope.form.findField('maplegendtype').getValue() == G.conf.map_legend_type_predefined) {
                 if (!scope.form.findField('maplegendset').getValue()) {
                     if (exception) {
                         Ext.message.msg(false, G.i18n.form_is_not_complete);
@@ -1356,7 +1356,7 @@
     formValues: {
 		getAllValues: function() {
 			return {
-				featureType: G.fnl.map_feature_type_point,
+				featureType: G.conf.map_feature_type_point,
 				mapValueType: this.form.findField('mapvaluetype').getValue(),
                 indicatorGroupId: this.valueType.isIndicator() ? this.form.findField('indicatorgroup').getValue() : null,
                 indicatorId: this.valueType.isIndicator() ? this.form.findField('indicator').getValue() : null,
@@ -1364,24 +1364,24 @@
                 dataElementGroupId: this.valueType.isDataElement() ? this.form.findField('dataelementgroup').getValue() : null,
                 dataElementId: this.valueType.isDataElement() ? this.form.findField('dataelement').getValue() : null,
 				dataElementName: this.valueType.isDataElement() ? this.form.findField('dataelement').getRawValue() : null,
-                mapDateType: G.vars.mapDateType.value,
-                periodTypeId: G.vars.mapDateType.isFixed() ? this.form.findField('periodtype').getValue() : null,
-                periodId: G.vars.mapDateType.isFixed() ? this.form.findField('period').getValue() : null,
-                periodName: G.vars.mapDateType.isFixed() ? this.form.findField('period').getRawValue() : null,
-                startDate: G.vars.mapDateType.isStartEnd() ? this.form.findField('startdate').getRawValue() : null,
-                endDate: G.vars.mapDateType.isStartEnd() ? this.form.findField('enddate').getRawValue() : null,
+                mapDateType: G.system.mapDateType.value,
+                periodTypeId: G.system.mapDateType.isFixed() ? this.form.findField('periodtype').getValue() : null,
+                periodId: G.system.mapDateType.isFixed() ? this.form.findField('period').getValue() : null,
+                periodName: G.system.mapDateType.isFixed() ? this.form.findField('period').getRawValue() : null,
+                startDate: G.system.mapDateType.isStartEnd() ? this.form.findField('startdate').getRawValue() : null,
+                endDate: G.system.mapDateType.isStartEnd() ? this.form.findField('enddate').getRawValue() : null,
 				parentOrganisationUnitId: this.organisationUnitSelection.parent.id,
                 parentOrganisationUnitLevel: this.organisationUnitSelection.parent.level,
                 parentOrganisationUnitName: this.organisationUnitSelection.parent.name,
 				organisationUnitLevel: this.organisationUnitSelection.level.level,
                 organisationUnitLevelName: this.organisationUnitSelection.level.name,
 				mapLegendType: this.form.findField('maplegendtype').getValue(),
-				method: this.legend.value == G.fnl.map_legend_type_automatic ? this.form.findField('method').getValue() : null,
-				classes: this.legend.value == G.fnl.map_legend_type_automatic ? this.form.findField('classes').getValue() : null,
-				bounds: this.legend.value == G.fnl.map_legend_type_automatic && this.legend.method == G.fnl.classify_with_bounds ? this.form.findField('bounds').getValue() : null,
-				colorLow: this.legend.value == G.fnl.map_legend_type_automatic ? this.form.findField('startcolor').getValue() : null,
-				colorHigh: this.legend.value == G.fnl.map_legend_type_automatic ? this.form.findField('endcolor').getValue() : null,
-                mapLegendSetId: this.legend.value == G.fnl.map_legend_type_predefined ? this.form.findField('maplegendset').getValue() : null,
+				method: this.legend.value == G.conf.map_legend_type_automatic ? this.form.findField('method').getValue() : null,
+				classes: this.legend.value == G.conf.map_legend_type_automatic ? this.form.findField('classes').getValue() : null,
+				bounds: this.legend.value == G.conf.map_legend_type_automatic && this.legend.method == G.conf.classify_with_bounds ? this.form.findField('bounds').getValue() : null,
+				colorLow: this.legend.value == G.conf.map_legend_type_automatic ? this.form.findField('startcolor').getValue() : null,
+				colorHigh: this.legend.value == G.conf.map_legend_type_automatic ? this.form.findField('endcolor').getValue() : null,
+                mapLegendSetId: this.legend.value == G.conf.map_legend_type_predefined ? this.form.findField('maplegendset').getValue() : null,
 				radiusLow: this.form.findField('radiuslow').getValue(),
 				radiusHigh: this.form.findField('radiushigh').getValue(),
 				longitude: G.vars.map.getCenter().lon,
@@ -1392,9 +1392,9 @@
         
         getImageExportValues: function() {
 			return {
-				mapValueTypeValue: this.form.findField('mapvaluetype').getValue() == G.fnl.map_value_type_indicator ?
+				mapValueTypeValue: this.form.findField('mapvaluetype').getValue() == G.conf.map_value_type_indicator ?
 					this.form.findField('indicator').getRawValue() : this.form.findField('dataelement').getRawValue(),
-				dateValue: G.vars.mapDateType.isFixed() ?
+				dateValue: G.system.mapDateType.isFixed() ?
 					this.form.findField('period').getRawValue() : new Date(this.form.findField('startdate').getRawValue()).format('Y M j') + ' - ' + new Date(this.form.findField('enddate').getRawValue()).format('Y M j')
 			};
 		}
@@ -1434,9 +1434,9 @@
                 var dataUrl = this.valueType.isIndicator() ? 'getIndicatorMapValues' : 'getDataElementMapValues';                
                 var params = {
                     id: this.valueType.isIndicator() ? this.form.findField('indicator').getValue() : this.form.findField('dataelement').getValue(),
-                    periodId: G.vars.mapDateType.isFixed() ? this.form.findField('period').getValue() : null,
-                    startDate: G.vars.mapDateType.isStartEnd() ? new Date(this.form.findField('startdate').getValue()).format('Y-m-d') : null,
-                    endDate: G.vars.mapDateType.isStartEnd() ? new Date(this.form.findField('enddate').getValue()).format('Y-m-d') : null,
+                    periodId: G.system.mapDateType.isFixed() ? this.form.findField('period').getValue() : null,
+                    startDate: G.system.mapDateType.isStartEnd() ? new Date(this.form.findField('startdate').getValue()).format('Y-m-d') : null,
+                    endDate: G.system.mapDateType.isStartEnd() ? new Date(this.form.findField('enddate').getValue()).format('Y-m-d') : null,
                     parentId: this.organisationUnitSelection.parent.id,
                     level: this.organisationUnitSelection.level.level
                 };
@@ -1448,7 +1448,6 @@
                     scope: this,
                     success: function(r) {
                         var mapvalues = Ext.util.JSON.decode(r.responseText).mapvalues;
-                        G.vars.exportValues = G.util.getExportDataValueJSON(mapvalues);
                         
                         if (!this.layer.features.length) {
                             Ext.message.msg(false, 'No coordinates found');