dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11010
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3047: Improved code.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 3047 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-03-16 09:26:11 +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-14 15:30:53 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/global.js 2011-03-16 08:25:23 +0000
@@ -5,16 +5,6 @@
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
@@ -30,40 +20,7 @@
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: [
@@ -343,8 +300,8 @@
getVectorLayers: function() {
var layers = [];
for (var i = 0; i < G.vars.map.layers.length; i++) {
- 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) {
+ 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) {
layers.push(G.vars.map.layers[i]);
}
}
@@ -412,6 +369,44 @@
}
};
+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,
@@ -420,32 +415,32 @@
mapDateType: {
value: null,
setFixed: function() {
- this.value = G.conf.map_date_type_fixed;
+ this.value = G.fnl.map_date_type_fixed;
},
setStartEnd: function() {
- this.value = G.conf.map_date_type_start_end;
+ this.value = G.fnl.map_date_type_start_end;
},
isFixed: function() {
- return this.value === G.conf.map_date_type_fixed;
+ return this.value === G.fnl.map_date_type_fixed;
},
isStartEnd: function() {
- return this.value === G.conf.map_date_type_start_end;
+ return this.value === G.fnl.map_date_type_start_end;
}
},
activePanel: {
- value: G.conf.thematicMap,
+ value: G.help.thematicMap,
setPolygon: function() {
- this.value = G.conf.thematicMap;
+ this.value = G.help.thematicMap;
},
setPoint: function() {
- this.value = G.conf.thematicMap2;
+ this.value = G.help.thematicMap2;
},
isPolygon: function() {
- return this.value === G.conf.thematicMap;
+ return this.value === G.help.thematicMap;
},
isPoint: function() {
- return this.value === G.conf.thematicMap2;
+ return this.value === G.help.thematicMap2;
}
},
=== 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-09 14:25:39 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2011-03-16 08:25:23 +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.conf.aggregation_strategy_batch ?
- G.conf.map_date_type_fixed : init.userSettings.mapDateType;
+ G.vars.mapDateType.value = G.system.aggregationStrategy == G.fnl.aggregation_strategy_batch ?
+ G.fnl.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.conf.map_feature_type_multipolygon},
+ baseParams: {featureType: G.fnl.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.conf.map_feature_type_point},
+ baseParams: {featureType: G.fnl.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.conf.map_legend_type_predefined},
+ baseParams: {type: G.fnl.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.conf.map_feature_type_multipolygon},
+ baseParams: {featureType: G.fnl.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.conf.map_layer_type_baselayer},
+ baseParams: {type: G.fnl.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.conf.map_layer_type_overlay},
+ baseParams: {type: G.fnl.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.conf.map_layer_type_thematic;
+ polygonLayer.layerType = G.fnl.map_layer_type_thematic;
G.vars.map.addLayer(polygonLayer);
pointLayer = new OpenLayers.Layer.Vector('Point layer', {
@@ -375,7 +375,7 @@
})
});
- pointLayer.layerType = G.conf.map_layer_type_thematic;
+ pointLayer.layerType = G.fnl.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.conf.map_layer_type_baselayer;
+ gm_normal.layerType = G.fnl.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.conf.map_layer_type_baselayer;
+ gm_hybrid.layerType = G.fnl.map_layer_type_baselayer;
G.vars.map.addLayer(gm_hybrid);
var osm = new OpenLayers.Layer.OSM.Osmarender("OpenStreetMap");
- osm.layerType = G.conf.map_layer_type_baselayer;
+ osm.layerType = G.fnl.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.conf.map_layer_type_overlay;
+ overlay.layerType = G.fnl.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.conf.map_feature_type_multipolygon) {
+ if (params.featureType == G.fnl.map_feature_type_multipolygon) {
G.stores.polygonMapView.load();
}
- else if (params.featureType == G.conf.map_feature_type_multipolygon) {
+ else if (params.featureType == G.fnl.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.conf.map_feature_type_multipolygon) {
+ if (featureType == G.fnl.map_feature_type_multipolygon) {
G.stores.polygonMapView.load();
}
- else if (featureType == G.conf.map_feature_type_point) {
+ else if (featureType == G.fnl.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.conf.map_layer_type_overlay));
+ var overlays = G.util.getVisibleLayers(G.util.getLayersByType(G.fnl.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.conf.map_legend_type_predefined},
+ params: {name: mlsv, type: G.fnl.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.conf.thematicMap, tab);
+ setHelpText(G.help.thematicMap, tab);
helpWindow.setHeight(290);
}
else if (tab.id == 'help1') {
- setHelpText(G.conf.favorites, tab);
+ setHelpText(G.help.favorites, tab);
helpWindow.setHeight(290);
}
else if (tab.id == 'help2') {
- setHelpText(G.conf.legendSets, tab);
+ setHelpText(G.help.legendSets, tab);
helpWindow.setHeight(290);
}
if (tab.id == 'help3') {
- setHelpText(G.conf.imageExport, tab);
+ setHelpText(G.help.imageExport, tab);
helpWindow.setHeight(290);
}
else if (tab.id == 'help4') {
- setHelpText(G.conf.administration, tab);
+ setHelpText(G.help.administration, tab);
helpWindow.setHeight(290);
}
else if (tab.id == 'help5') {
- setHelpText(G.conf.overlayRegistration, tab);
+ setHelpText(G.help.overlayRegistration, tab);
helpWindow.setHeight(530);
}
else if (tab.id == 'help6') {
- setHelpText(G.conf.setup, tab);
+ setHelpText(G.help.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.conf.map_layer_type_overlay;
+ overlay.layerType = G.fnl.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.conf.map_layer_type_overlay, G.conf.defaultLayerZIndex);
+ G.util.setZIndexByLayerType(G.fnl.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.conf.map_layer_type_baselayer, mapSource: mlbu, layer: mlbl, fillColor: '', fillOpacity: 0, strokeColor: '', strokeWidth: 0},
+ params: {name: mlbn, type: G.fnl.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.conf.aggregation_strategy_batch,
+ disabled: G.system.aggregationStrategy === G.fnl.aggregation_strategy_batch,
editable: false,
valueField: 'value',
displayField: 'text',
mode: 'local',
- value: G.conf.map_date_type_fixed,
+ value: G.fnl.map_date_type_fixed,
triggerAction: 'all',
width: G.conf.combo_width_fieldset,
minListWidth: G.conf.combo_width_fieldset,
@@ -1858,8 +1858,8 @@
xtype: 'arraystore',
fields: ['value', 'text'],
data: [
- [G.conf.map_date_type_fixed, G.i18n.fixed_periods],
- [G.conf.map_date_type_start_end, G.i18n.start_end_dates]
+ [G.fnl.map_date_type_fixed, G.i18n.fixed_periods],
+ [G.fnl.map_date_type_start_end, G.i18n.start_end_dates]
]
},
listeners: {
@@ -2127,14 +2127,14 @@
var color = Ext.getCmp('highlightcolor_cf').getValue();
var symbolizer;
- 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) {
+ 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) {
symbolizer = new OpenLayers.Symbolizer.Polygon({
'strokeColor': color,
'fillColor': color
});
}
- else if (feature.geometry.CLASS_NAME == G.conf.map_feature_type_point_class_name) {
+ else if (feature.geometry.CLASS_NAME == G.fnl.map_feature_type_point_class_name) {
symbolizer = new OpenLayers.Symbolizer.Point({
'pointRadius': 7,
'fillColor': color
@@ -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.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;
+ 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;
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.conf.map_layer_type_overlay, G.conf.defaultLayerOpacity);
- G.util.setOpacityByLayerType(G.conf.map_layer_type_thematic, G.conf.defaultLayerOpacity);
+ G.util.setOpacityByLayerType(G.fnl.map_layer_type_overlay, G.conf.defaultLayerOpacity);
+ G.util.setOpacityByLayerType(G.fnl.map_layer_type_thematic, G.conf.defaultLayerOpacity);
var svg = document.getElementsByTagName('svg');
@@ -2630,7 +2630,7 @@
}
for (var i = 0, j = 2; i < G.vars.map.layers.length; i++) {
- if (G.vars.map.layers[i].layerType == G.conf.map_layer_type_overlay) {
+ if (G.vars.map.layers[i].layerType == G.fnl.map_layer_type_overlay) {
G.vars.map.layers[i].svgId = svg[j++].id;
}
}
=== 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-01-21 13:49:39 +0000
+++ 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
@@ -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.conf.map_legend_type_automatic;
+ symbol.legend.value : G.fnl.map_legend_type_automatic;
- if (mlt == G.conf.map_legend_type_automatic) {
+ if (mlt == G.fnl.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.conf.map_legend_type_predefined) {
+ else if (mlt == G.fnl.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-01-07 10:58:35 +0000
+++ 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
@@ -55,13 +55,13 @@
var numColors = this.classification.bins.length;
var mapLegendType = choropleth.form.findField('maplegendtype').getValue();
- if (mapLegendType == G.conf.map_legend_type_automatic) {
+ if (mapLegendType == G.fnl.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.conf.map_legend_type_predefined) {
+ else if (mapLegendType == G.fnl.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-01-27 15:16:58 +0000
+++ 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
@@ -63,13 +63,13 @@
var numColors = this.classification.bins.length;
var mapLegendType = symbol.form.findField('maplegendtype').getValue();
- if (mapLegendType == G.conf.map_legend_type_automatic) {
+ if (mapLegendType == G.fnl.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.conf.map_legend_type_predefined) {
+ else if (mapLegendType == G.fnl.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-14 15:30:53 +0000
+++ 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
@@ -87,7 +87,7 @@
this.createSelectFeatures();
if (G.vars.parameter.id) {
- if (G.vars.parameter.mapView.featureType == G.conf.map_feature_type_multipolygon) {
+ if (G.vars.parameter.mapView.featureType == G.fnl.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.conf.map_legend_type_automatic,
- method: G.conf.classify_by_equal_intervals,
+ value: G.fnl.map_legend_type_automatic,
+ method: G.fnl.classify_by_equal_intervals,
classes: 5
};
@@ -195,18 +195,18 @@
};
this.valueType = {
- value: G.conf.map_value_type_indicator,
+ value: G.fnl.map_value_type_indicator,
setIndicator: function() {
- this.value = G.conf.map_value_type_indicator;
+ this.value = G.fnl.map_value_type_indicator;
},
setDatElement: function() {
- this.value = G.conf.map_value_type_dataelement;
+ this.value = G.fnl.map_value_type_dataelement;
},
isIndicator: function() {
- return this.value == G.conf.map_value_type_indicator;
+ return this.value == G.fnl.map_value_type_indicator;
},
isDataElement: function() {
- return this.value == G.conf.map_value_type_dataelement;
+ return this.value == G.fnl.map_value_type_dataelement;
}
};
},
@@ -265,12 +265,12 @@
mode: 'local',
triggerAction: 'all',
width: G.conf.combo_width,
- value: G.conf.map_value_type_indicator,
+ value: G.fnl.map_value_type_indicator,
store: new Ext.data.ArrayStore({
fields: ['id', 'name'],
data: [
- [G.conf.map_value_type_indicator, 'Indicator'],
- [G.conf.map_value_type_dataelement, 'Data element']
+ [G.fnl.map_value_type_indicator, 'Indicator'],
+ [G.fnl.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.conf.map_legend_type_predefined;
+ this.legend.value = G.fnl.map_legend_type_predefined;
this.prepareMapViewLegend();
function load() {
@@ -366,7 +366,7 @@
}
}
else {
- this.legend.value = G.conf.map_legend_type_automatic;
+ this.legend.value = G.fnl.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.conf.map_legend_type_predefined;
+ this.legend.value = G.fnl.map_legend_type_predefined;
this.prepareMapViewLegend();
function load() {
@@ -458,7 +458,7 @@
}
}
else {
- this.legend.value = G.conf.map_legend_type_automatic;
+ this.legend.value = G.fnl.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.conf.map_legend_type_automatic, G.i18n.automatic],
- [G.conf.map_legend_type_predefined, G.i18n.predefined]
+ [G.fnl.map_legend_type_automatic, G.i18n.automatic],
+ [G.fnl.map_legend_type_predefined, G.i18n.predefined]
]
}),
listeners: {
'select': {
scope: this,
fn: function(cb) {
- if (cb.getValue() == G.conf.map_legend_type_predefined && cb.getValue() != this.legend.value) {
- this.legend.value = G.conf.map_legend_type_predefined;
+ if (cb.getValue() == G.fnl.map_legend_type_predefined && cb.getValue() != this.legend.value) {
+ this.legend.value = G.fnl.map_legend_type_predefined;
this.prepareMapViewLegend();
if (this.form.findField('maplegendset').getValue()) {
this.applyPredefinedLegend();
}
}
- else if (cb.getValue() == G.conf.map_legend_type_automatic && cb.getValue() != this.legend.value) {
- this.legend.value = G.conf.map_legend_type_automatic;
+ else if (cb.getValue() == G.fnl.map_legend_type_automatic && cb.getValue() != this.legend.value) {
+ this.legend.value = G.fnl.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.conf.classify_with_bounds && cb.getValue() != this.legend.method) {
- this.legend.method = G.conf.classify_with_bounds;
+ if (cb.getValue() == G.fnl.classify_with_bounds && cb.getValue() != this.legend.method) {
+ this.legend.method = G.fnl.classify_with_bounds;
this.prepareMapViewLegend();
}
else if (cb.getValue() != this.legend.method) {
@@ -1113,13 +1113,13 @@
prepareMapViewLegend: function() {
this.form.findField('maplegendtype').setValue(this.legend.value);
- if (this.legend.value == G.conf.map_legend_type_automatic) {
+ if (this.legend.value == G.fnl.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.conf.classify_with_bounds) {
+ if (this.legend.method == G.fnl.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.conf.map_legend_type_predefined) {
+ else if (this.legend.value == G.fnl.map_legend_type_predefined) {
this.form.findField('method').hideField();
this.form.findField('classes').hideField();
this.form.findField('bounds').hideField();
@@ -1199,12 +1199,12 @@
this.applyPredefinedLegend(true);
}
- if (this.legend.value == G.conf.map_legend_type_automatic) {
+ if (this.legend.value == G.fnl.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.conf.classify_with_bounds) {
+ if (this.legend.method == G.fnl.classify_with_bounds) {
this.form.findField('bounds').setValue(this.mapView.bounds);
}
else {
@@ -1213,7 +1213,7 @@
this.setMapViewMap();
}
- else if (this.legend.value == G.conf.map_legend_type_predefined) {
+ else if (this.legend.value == G.fnl.map_legend_type_predefined) {
if (G.stores.predefinedMapLegendSet.isLoaded) {
predefinedMapLegendSetStoreCallback.call(this);
}
@@ -1238,7 +1238,7 @@
},
applyPredefinedLegend: function(isMapView) {
- this.legend.value = G.conf.map_legend_type_predefined;
+ this.legend.value = G.fnl.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.conf.map_value_type_indicator) {
+ if (scope.form.findField('mapvaluetype').getValue() == G.fnl.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.conf.map_value_type_dataelement) {
+ else if (scope.form.findField('mapvaluetype').getValue() == G.fnl.map_value_type_dataelement) {
if (!scope.form.findField('dataelement').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.conf.map_legend_type_automatic) {
- if (scope.form.findField('method').getValue() == G.conf.classify_with_bounds) {
+ 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('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.conf.map_legend_type_predefined) {
+ else if (scope.form.findField('maplegendtype').getValue() == G.fnl.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.conf.map_feature_type_multipolygon,
+ featureType: G.fnl.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,
@@ -1387,12 +1387,12 @@
organisationUnitLevel: this.organisationUnitSelection.level.level,
organisationUnitLevelName: this.organisationUnitSelection.level.name,
mapLegendType: this.form.findField('maplegendtype').getValue(),
- 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,
+ 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,
radiusLow: null,
radiusHigh: null,
longitude: G.vars.map.getCenter().lon,
@@ -1403,7 +1403,7 @@
getImageExportValues: function() {
return {
- mapValueTypeValue: this.form.findField('mapvaluetype').getValue() == G.conf.map_value_type_indicator ?
+ mapValueTypeValue: this.form.findField('mapvaluetype').getValue() == G.fnl.map_value_type_indicator ?
this.form.findField('indicator').getRawValue() : this.form.findField('dataelement').getRawValue(),
dateValue: G.vars.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')
=== 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-14 15:30:53 +0000
+++ 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
@@ -87,7 +87,7 @@
this.createSelectFeatures();
if (G.vars.parameter.id) {
- if (G.vars.parameter.mapView.featureType == G.conf.map_feature_type_point) {
+ if (G.vars.parameter.mapView.featureType == G.fnl.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.conf.map_legend_type_automatic,
- method: G.conf.classify_by_equal_intervals,
+ value: G.fnl.map_legend_type_automatic,
+ method: G.fnl.classify_by_equal_intervals,
classes: 5
};
@@ -194,18 +194,18 @@
};
this.valueType = {
- value: G.conf.map_value_type_indicator,
+ value: G.fnl.map_value_type_indicator,
setIndicator: function() {
- this.value = G.conf.map_value_type_indicator;
+ this.value = G.fnl.map_value_type_indicator;
},
setDatElement: function() {
- this.value = G.conf.map_value_type_dataelement;
+ this.value = G.fnl.map_value_type_dataelement;
},
isIndicator: function() {
- return this.value == G.conf.map_value_type_indicator;
+ return this.value == G.fnl.map_value_type_indicator;
},
isDataElement: function() {
- return this.value == G.conf.map_value_type_dataelement;
+ return this.value == G.fnl.map_value_type_dataelement;
}
};
},
@@ -264,12 +264,12 @@
mode: 'local',
triggerAction: 'all',
width: G.conf.combo_width,
- value: G.conf.map_value_type_indicator,
+ value: G.fnl.map_value_type_indicator,
store: new Ext.data.ArrayStore({
fields: ['id', 'name'],
data: [
- [G.conf.map_value_type_indicator, 'Indicator'],
- [G.conf.map_value_type_dataelement, 'Data element']
+ [G.fnl.map_value_type_indicator, 'Indicator'],
+ [G.fnl.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.conf.map_legend_type_predefined;
+ this.legend.value = G.fnl.map_legend_type_predefined;
this.prepareMapViewLegend();
function load() {
@@ -365,7 +365,7 @@
}
}
else {
- this.legend.value = G.conf.map_legend_type_automatic;
+ this.legend.value = G.fnl.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.conf.map_legend_type_predefined;
+ this.legend.value = G.fnl.map_legend_type_predefined;
this.prepareMapViewLegend();
function load() {
@@ -457,7 +457,7 @@
}
}
else {
- this.legend.value = G.conf.map_legend_type_automatic;
+ this.legend.value = G.fnl.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.conf.map_legend_type_automatic, G.i18n.automatic],
- [G.conf.map_legend_type_predefined, G.i18n.predefined]
+ [G.fnl.map_legend_type_automatic, G.i18n.automatic],
+ [G.fnl.map_legend_type_predefined, G.i18n.predefined]
]
}),
listeners: {
'select': {
scope: this,
fn: function(cb) {
- if (cb.getValue() == G.conf.map_legend_type_predefined && cb.getValue() != this.legend.value) {
- this.legend.value = G.conf.map_legend_type_predefined;
+ if (cb.getValue() == G.fnl.map_legend_type_predefined && cb.getValue() != this.legend.value) {
+ this.legend.value = G.fnl.map_legend_type_predefined;
this.prepareMapViewLegend();
if (this.form.findField('maplegendset').getValue()) {
this.applyPredefinedLegend();
}
}
- else if (cb.getValue() == G.conf.map_legend_type_automatic && cb.getValue() != this.legend.value) {
- this.legend.value = G.conf.map_legend_type_automatic;
+ else if (cb.getValue() == G.fnl.map_legend_type_automatic && cb.getValue() != this.legend.value) {
+ this.legend.value = G.fnl.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.conf.classify_with_bounds && cb.getValue() != this.legend.method) {
- this.legend.method = G.conf.classify_with_bounds;
+ if (cb.getValue() == G.fnl.classify_with_bounds && cb.getValue() != this.legend.method) {
+ this.legend.method = G.fnl.classify_with_bounds;
this.prepareMapViewLegend();
}
else if (cb.getValue() != this.legend.method) {
@@ -1092,13 +1092,13 @@
prepareMapViewLegend: function() {
this.form.findField('maplegendtype').setValue(this.legend.value);
- if (this.legend.value == G.conf.map_legend_type_automatic) {
+ if (this.legend.value == G.fnl.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.conf.classify_with_bounds) {
+ if (this.legend.method == G.fnl.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.conf.map_legend_type_predefined) {
+ else if (this.legend.value == G.fnl.map_legend_type_predefined) {
this.form.findField('method').hideField();
this.form.findField('classes').hideField();
this.form.findField('bounds').hideField();
@@ -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.conf.map_legend_type_automatic) {
+ if (this.legend.value == G.fnl.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.conf.classify_with_bounds) {
+ if (this.legend.method == G.fnl.classify_with_bounds) {
this.form.findField('bounds').setValue(this.mapView.bounds);
}
else {
@@ -1196,7 +1196,7 @@
this.setMapViewMap();
}
- else if (this.legend.value == G.conf.map_legend_type_predefined) {
+ else if (this.legend.value == G.fnl.map_legend_type_predefined) {
if (G.stores.predefinedMapLegendSet.isLoaded) {
predefinedMapLegendSetStoreCallback.call(this);
}
@@ -1220,7 +1220,7 @@
},
applyPredefinedLegend: function(isMapView) {
- this.legend.value = G.conf.map_legend_type_predefined;
+ this.legend.value = G.fnl.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.conf.map_value_type_indicator) {
+ if (scope.form.findField('mapvaluetype').getValue() == G.fnl.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.conf.map_value_type_dataelement) {
+ else if (scope.form.findField('mapvaluetype').getValue() == G.fnl.map_value_type_dataelement) {
if (!scope.form.findField('dataelement').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.conf.map_legend_type_automatic) {
- if (scope.form.findField('method').getValue() == G.conf.classify_with_bounds) {
+ 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('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.conf.map_legend_type_predefined) {
+ else if (scope.form.findField('maplegendtype').getValue() == G.fnl.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.conf.map_feature_type_point,
+ featureType: G.fnl.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,
@@ -1376,12 +1376,12 @@
organisationUnitLevel: this.organisationUnitSelection.level.level,
organisationUnitLevelName: this.organisationUnitSelection.level.name,
mapLegendType: this.form.findField('maplegendtype').getValue(),
- 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,
+ 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,
radiusLow: this.form.findField('radiuslow').getValue(),
radiusHigh: this.form.findField('radiushigh').getValue(),
longitude: G.vars.map.getCenter().lon,
@@ -1392,7 +1392,7 @@
getImageExportValues: function() {
return {
- mapValueTypeValue: this.form.findField('mapvaluetype').getValue() == G.conf.map_value_type_indicator ?
+ mapValueTypeValue: this.form.findField('mapvaluetype').getValue() == G.fnl.map_value_type_indicator ?
this.form.findField('indicator').getRawValue() : this.form.findField('dataelement').getRawValue(),
dateValue: G.vars.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')