dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34297
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17604: GIS legend div issue fixed.
------------------------------------------------------------
revno: 17604
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-11-27 14:16:06 +0100
message:
GIS legend div issue fixed.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/mapfish/core/GeoStat/all.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-apps/src/main/webapp/dhis-web-mapping/scripts/mapfish/core/GeoStat/all.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/mapfish/core/GeoStat/all.js 2014-11-27 12:45:41 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/mapfish/core/GeoStat/all.js 2014-11-27 13:16:06 +0000
@@ -725,37 +725,28 @@
updateLegend: function() {
var element = document.createElement("div"),
child,
- legendNames;
+ id,
+ name;
// data
- child = document.createElement("div");
- child.style.height = "14px";
- child.title = this.view.columns[0].items[0].name;
- child.innerHTML = this.view.columns[0].items[0].name;
- element.appendChild(child);
-
- child = document.createElement("div");
- child.style.clear = "left";
- element.appendChild(child);
+ id = this.view.columns[0].items[0].id;
+ name = this.view.columns[0].items[0].name;
+ child = document.createElement("div");
+ child.style.lineHeight = "14px";
+ child.style.paddingBottom = "3px";
+ child.innerHTML += this.gis.response.metaData.names[id] || name || id;
+ child.innerHTML += "<br/>";
// period
- child = document.createElement("div");
- child.style.height = "14px";
- child.style.overflow = "hidden";
- child.title = this.view.filters[0].items[0].name;
- child.innerHTML = this.view.filters[0].items[0].name;
+ id = this.view.filters[0].items[0].id;
+ name = this.view.filters[0].items[0].name;
+ child.innerHTML += this.gis.response.metaData.names[id] || name || id;
element.appendChild(child);
child = document.createElement("div");
child.style.clear = "left";
element.appendChild(child);
- // separator
- child = document.createElement("div");
- child.style.width = "1px";
- child.style.height = "5px";
- element.appendChild(child);
-
// legends
if (this.view.legendSet) {
for (var i = 0; i < this.classification.bins.length; i++) {