=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/geojsonFacilities.vm' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/geojsonFacilities.vm 2011-11-15 19:22:58 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/geojsonFacilities.vm 2011-11-23 11:55:26 +0000 @@ -1,1 +1,1 @@ -#set($size=$object.size()){"type":"FeatureCollection","features":[#foreach($unit in $object){"geometry":{"type":"Point","coordinates":$!encoder.jsonEncode($!{unit.validCoordinates})},"properties":{"id":"$!{unit.id}","name":"$!encoder.jsonEncode(${unit.name})"#foreach($set in $groupSets)#set($n=$velocityCount - 1),"$!encoder.jsonEncode(${set.getName()})":"$!encoder.jsonEncode(${unit.groupNames[$n]})"#end}}#if($velocityCount<$size),#end#end],"crs":{"type":"EPSG","properties":{"code":"4326"}}} \ No newline at end of file +#set($size=$object.size()){"type":"FeatureCollection","features":[#foreach($unit in $object){"geometry":{"type":"Point","coordinates":$!encoder.jsonEncode($!{unit.validCoordinates})},"properties":{"id":"$!{unit.id}","name":"$!encoder.jsonEncode(${unit.name})","code":"$!encoder.jsonEncode(${unit.code})","cp":"$!encoder.jsonEncode(${unit.contactPerson})","ad":"$!encoder.jsonEncode(${unit.address})","em":"$!encoder.jsonEncode(${unit.email})","pn":"$!encoder.jsonEncode(${unit.phoneNumber})"#foreach($set in $groupSets)#set($n=$velocityCount - 1),"$!encoder.jsonEncode(${set.getName()})":"$!encoder.jsonEncode(${unit.groupNames[$n]})"#end}}#if($velocityCount<$size),#end#end],"crs":{"type":"EPSG","properties":{"code":"4326"}}} \ No newline at end of file === 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-10-24 13:35:32 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2011-11-23 11:55:26 +0000 @@ -1047,9 +1047,9 @@ var scope = this; var onHoverSelect = function onHoverSelect(feature) { - if (feature.attributes.name) { + if (feature.attributes.fixedName) { document.getElementById('featuredatatext').innerHTML = - '
' + feature.attributes.name + '
' + + '
' + feature.attributes.fixedName + '
' + '
' + feature.attributes.value + '
'; } else { @@ -1080,7 +1080,7 @@ } scope.featureOptions.info = new Ext.Window({ - title: '' + feature.attributes.name + '', + title: 'Facility information sheet', layout: 'table', width: G.conf.window_width + 178, height: G.util.getMultiSelectHeight() + 100, @@ -1100,6 +1100,7 @@ bodyStyle: 'padding:8px 4px 8px 8px', width: 160, items: [ + {html: '
' + G.i18n.name + '

' + feature.attributes.name + '

'}, {html: '
' + G.i18n.type + '

' + feature.attributes.type + '

'}, {html: '
' + G.i18n.code + '

' + feature.attributes.code + '

'}, {html: '
' + G.i18n.address + '

' + feature.attributes.ad + '

'}, @@ -1782,7 +1783,7 @@ if (mapvalues[i].orgUnitName == this.layer.features[j].attributes.name) { this.layer.features[j].attributes.value = parseFloat(mapvalues[i].value); this.layer.features[j].attributes.labelString = this.layer.features[j].attributes.name + ' (' + this.layer.features[j].attributes.value + ')'; - this.layer.features[j].attributes.name = G.util.cutString(this.layer.features[j].attributes.name, 30); + this.layer.features[j].attributes.fixedName = G.util.cutString(this.layer.features[j].attributes.name, 30); break; } } === 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-10-24 15:22:51 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js 2011-11-23 11:55:26 +0000 @@ -1025,9 +1025,9 @@ var scope = this; var onHoverSelect = function onHoverSelect(feature) { - if (feature.attributes.name) { + if (feature.attributes.fixedName) { document.getElementById('featuredatatext').innerHTML = - '
' + feature.attributes.name + '
' + + '
' + feature.attributes.fixedName + '
' + '
' + feature.attributes.value + '
'; } else { @@ -1058,7 +1058,7 @@ } scope.featureOptions.info = new Ext.Window({ - title: '' + feature.attributes.name + '', + title: 'Facility information sheet', layout: 'table', width: G.conf.window_width + 178, height: G.util.getMultiSelectHeight() + 100, @@ -1078,6 +1078,7 @@ bodyStyle: 'padding:8px 4px 8px 8px', width: 160, items: [ + {html: '
' + G.i18n.name + '

' + feature.attributes.name + '

'}, {html: '
' + G.i18n.type + '

' + feature.attributes.type + '

'}, {html: '
' + G.i18n.code + '

' + feature.attributes.code + '

'}, {html: '
' + G.i18n.address + '

' + feature.attributes.ad + '

'}, @@ -1760,7 +1761,7 @@ if (mapvalues[i].orgUnitName == this.layer.features[j].attributes.name) { this.layer.features[j].attributes.value = parseFloat(mapvalues[i].value); this.layer.features[j].attributes.labelString = this.layer.features[j].attributes.name + ' (' + this.layer.features[j].attributes.value + ')'; - this.layer.features[j].attributes.name = G.util.cutString(this.layer.features[j].attributes.name, 30); + this.layer.features[j].attributes.fixedName = G.util.cutString(this.layer.features[j].attributes.name, 30); break; } } === 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-11-15 19:22:58 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js 2011-11-23 11:55:26 +0000 @@ -497,8 +497,8 @@ var scope = this; var onHoverSelect = function onHoverSelect(feature) { - if (feature.attributes.name) { - document.getElementById('featuredatatext').innerHTML = '
' + feature.attributes.name + '
' + feature.attributes[scope.cmp.groupSet.getRawValue()] + '
'; + if (feature.attributes.fixedName) { + document.getElementById('featuredatatext').innerHTML = '
' + feature.attributes.fixedName + '
' + feature.attributes[scope.cmp.groupSet.getRawValue()] + '
'; } else { document.getElementById('featuredatatext').innerHTML = ''; @@ -527,7 +527,7 @@ } scope.featureOptions.info = new Ext.Window({ - title: '' + feature.attributes.name + '', + title: 'Facility information sheet', layout: 'table', width: G.conf.window_width + 178, height: G.util.getMultiSelectHeight() + 100, @@ -547,7 +547,8 @@ bodyStyle: 'padding:8px 4px 8px 8px', width: 160, items: [ - {html: '
' + G.i18n.type + '

' + feature.attributes.type + '

'}, + {html: '
' + G.i18n.name + '

' + feature.attributes.name + '

'}, + {html: '
' + G.i18n.type + '

' + feature.attributes.Type + '

'}, {html: '
' + G.i18n.code + '

' + feature.attributes.code + '

'}, {html: '
' + G.i18n.address + '

' + feature.attributes.ad + '

'}, {html: '
' + G.i18n.contact_person + '

' + feature.attributes.cp + '

'}, @@ -798,7 +799,7 @@ for (var i = 0; i < this.layer.features.length; i++) { this.layer.features[i].attributes.labelString = this.layer.features[i].attributes.name; - this.layer.features[i].attributes.name = G.util.cutString(this.layer.features[i].attributes.name, 30); + this.layer.features[i].attributes.fixedName = G.util.cutString(this.layer.features[i].attributes.name, 30); } this.applyValues();