=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/index.html' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/index.html 2011-05-19 08:26:11 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/index.html 2011-05-26 13:44:26 +0000 @@ -61,7 +61,7 @@ - + === modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js 2011-05-25 12:46:06 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js 2011-05-26 13:44:26 +0000 @@ -37,7 +37,13 @@ window_position_x: 55, window_position_y: 41, - emptytext: '', +// GUI + + feature_data_style_name: 'color:#000', + feature_data_style_value: 'color:#444', + feature_data_style_empty: 'color:#555', + + emptytext: '', labelseparator: '', // DHIS variables @@ -277,9 +283,9 @@ return b.value-a.value; }, - getLegendsJSON: function() { + getLegendsJSON: function() { var json = '{"legends":['; - for(var i = 0; i < this.imageLegend.length; i++) { + for (var i = 0; i < this.imageLegend.length; i++) { json += '{'; json += '"label": "' + this.imageLegend[i].label + '",'; json += '"color": "' + this.imageLegend[i].color + '"'; === modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js 2011-05-25 12:46:06 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js 2011-05-26 13:44:26 +0000 @@ -271,7 +271,7 @@ groupSet: groupSetStore, groupsByGroupSet: groupsByGroupSetStore }; - + /* Thematic layers */ polygonLayer = new OpenLayers.Layer.Vector(G.conf.thematic_layer_1, { 'visibility': false, @@ -2663,7 +2663,7 @@ tooltip: 'Administrator settings', disabled: !G.user.isAdmin, style: 'margin-top:1px', - handler: function() { + handler: function() { if (!adminWindow.hidden) { adminWindow.hide(); } === 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-05-25 12:46:06 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Choropleth.js 2011-05-25 13:20:20 +0000 @@ -63,15 +63,16 @@ createColorInterpolation: function() { var numColors = this.classification.bins.length; var mapLegendType = this.widget.form.findField('maplegendtype').getValue(); + this.widget.imageLegend = []; this.colorInterpolation = mapLegendType == G.conf.map_legend_type_automatic ? mapfish.ColorRgb.getColorsArrayByRgbInterpolation(this.colors[0], this.colors[1], numColors) : this.widget.colorInterpolation; - + for (var i = 0; i < this.classification.bins.length; i++) { - this.widget.imageLegend[i] = { + this.widget.imageLegend.push({ label: this.classification.bins[i].label.replace('  ', ' '), color: this.colorInterpolation[i].toHexString() - }; + }); } }, === modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Point.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Point.js 2011-05-25 12:46:06 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Point.js 2011-05-25 13:20:20 +0000 @@ -63,15 +63,16 @@ createColorInterpolation: function() { var numColors = this.classification.bins.length; var mapLegendType = this.widget.form.findField('maplegendtype').getValue(); + this.widget.imageLegend = []; this.colorInterpolation = mapLegendType == G.conf.map_legend_type_automatic ? mapfish.ColorRgb.getColorsArrayByRgbInterpolation(this.colors[0], this.colors[1], numColors) : this.widget.colorInterpolation; - + for (var i = 0; i < this.classification.bins.length; i++) { - this.widget.imageLegend[i] = { + this.widget.imageLegend.push({ label: this.classification.bins[i].label.replace('  ', ' '), color: this.colorInterpolation[i].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-05-25 12:46:06 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2011-05-26 13:44:26 +0000 @@ -76,7 +76,7 @@ isDrillDown: false, - imageLegend: [], + imageLegend: false, initComponent: function() { @@ -990,9 +990,11 @@ createSelectFeatures: function() { var scope = this; - var onHoverSelect = function onHoverSelect(feature) { + var onHoverSelect = function onHoverSelect(feature) { if (feature.attributes.name) { - document.getElementById('featuredatatext').innerHTML = '
' + feature.attributes.name + '
' + feature.attributes.value + '
'; + document.getElementById('featuredatatext').innerHTML = + '
' + feature.attributes.name + '
' + + '
' + feature.attributes.value + '
'; } else { document.getElementById('featuredatatext').innerHTML = ''; @@ -1001,7 +1003,8 @@ var onHoverUnselect = function onHoverUnselect(feature) { if (feature.attributes.name) { - document.getElementById('featuredatatext').innerHTML = '
' + G.i18n.no_feature_selected + '
'; + document.getElementById('featuredatatext').innerHTML = + '
' + G.i18n.no_feature_selected + '
'; } else { document.getElementById('featuredatatext').innerHTML = ''; === modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js 2011-05-25 12:46:06 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js 2011-05-26 13:44:26 +0000 @@ -76,7 +76,7 @@ isDrillDown: false, - imageLegend: [], + imageLegend: false, initComponent: function() { @@ -961,9 +961,11 @@ createSelectFeatures: function() { var scope = this; - var onHoverSelect = function onHoverSelect(feature) { + var onHoverSelect = function onHoverSelect(feature) { if (feature.attributes.name) { - document.getElementById('featuredatatext').innerHTML = '
' + feature.attributes.name + '
' + feature.attributes.value + '
'; + document.getElementById('featuredatatext').innerHTML = + '
' + feature.attributes.name + '
' + + '
' + feature.attributes.value + '
'; } else { document.getElementById('featuredatatext').innerHTML = ''; @@ -972,7 +974,8 @@ var onHoverUnselect = function onHoverUnselect(feature) { if (feature.attributes.name) { - document.getElementById('featuredatatext').innerHTML = '
' + G.i18n.no_feature_selected + '
'; + document.getElementById('featuredatatext').innerHTML = + '
' + G.i18n.no_feature_selected + '
'; } else { document.getElementById('featuredatatext').innerHTML = '';