dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14926
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5202: (GIS) Facility information sheet improved.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 5202 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-11-23 12:57:07 +0100
message:
(GIS) Facility information sheet improved.
modified:
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/resources/mapfish/widgets/geostat/Choropleth.js
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/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/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 =
- '<div style="' + G.conf.feature_data_style_name + '">' + feature.attributes.name + '</div>' +
+ '<div style="' + G.conf.feature_data_style_name + '">' + feature.attributes.fixedName + '</div>' +
'<div style="' + G.conf.feature_data_style_value + '">' + feature.attributes.value + '</div>';
}
else {
@@ -1080,7 +1080,7 @@
}
scope.featureOptions.info = new Ext.Window({
- title: '<span class="window-information-title">' + feature.attributes.name + '</span>',
+ title: '<span class="window-information-title">Facility information sheet</span>',
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: '<div class="window-info">' + G.i18n.name + '<p style="font-weight:normal">' + feature.attributes.name + '</p></div>'},
{html: '<div class="window-info">' + G.i18n.type + '<p style="font-weight:normal">' + feature.attributes.type + '</p></div>'},
{html: '<div class="window-info">' + G.i18n.code + '<p style="font-weight:normal">' + feature.attributes.code + '</p></div>'},
{html: '<div class="window-info">' + G.i18n.address + '<p style="font-weight:normal">' + feature.attributes.ad + '</p></div>'},
@@ -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 =
- '<div style="' + G.conf.feature_data_style_name + '">' + feature.attributes.name + '</div>' +
+ '<div style="' + G.conf.feature_data_style_name + '">' + feature.attributes.fixedName + '</div>' +
'<div style="' + G.conf.feature_data_style_value + '">' + feature.attributes.value + '</div>';
}
else {
@@ -1058,7 +1058,7 @@
}
scope.featureOptions.info = new Ext.Window({
- title: '<span class="window-information-title">' + feature.attributes.name + '</span>',
+ title: '<span class="window-information-title">Facility information sheet</span>',
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: '<div class="window-info">' + G.i18n.name + '<p style="font-weight:normal">' + feature.attributes.name + '</p></div>'},
{html: '<div class="window-info">' + G.i18n.type + '<p style="font-weight:normal">' + feature.attributes.type + '</p></div>'},
{html: '<div class="window-info">' + G.i18n.code + '<p style="font-weight:normal">' + feature.attributes.code + '</p></div>'},
{html: '<div class="window-info">' + G.i18n.address + '<p style="font-weight:normal">' + feature.attributes.ad + '</p></div>'},
@@ -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 = '<div style="color:black">' + feature.attributes.name + '</div><div style="color:#555">' + feature.attributes[scope.cmp.groupSet.getRawValue()] + '</div>';
+ if (feature.attributes.fixedName) {
+ document.getElementById('featuredatatext').innerHTML = '<div style="color:black">' + feature.attributes.fixedName + '</div><div style="color:#555">' + feature.attributes[scope.cmp.groupSet.getRawValue()] + '</div>';
}
else {
document.getElementById('featuredatatext').innerHTML = '';
@@ -527,7 +527,7 @@
}
scope.featureOptions.info = new Ext.Window({
- title: '<span class="window-information-title">' + feature.attributes.name + '</span>',
+ title: '<span class="window-information-title">Facility information sheet</span>',
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: '<div class="window-info">' + G.i18n.type + '<p style="font-weight:normal">' + feature.attributes.type + '</p></div>'},
+ {html: '<div class="window-info">' + G.i18n.name + '<p style="font-weight:normal">' + feature.attributes.name + '</p></div>'},
+ {html: '<div class="window-info">' + G.i18n.type + '<p style="font-weight:normal">' + feature.attributes.Type + '</p></div>'},
{html: '<div class="window-info">' + G.i18n.code + '<p style="font-weight:normal">' + feature.attributes.code + '</p></div>'},
{html: '<div class="window-info">' + G.i18n.address + '<p style="font-weight:normal">' + feature.attributes.ad + '</p></div>'},
{html: '<div class="window-info">' + G.i18n.contact_person + '<p style="font-weight:normal">' + feature.attributes.cp + '</p></div>'},
@@ -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();