Widget:PlaceNamesChoropleths: Difference between revisions
From International Robin Hood Bibliography
(Created page with "<noinclude><div class="no-img">This widget displays the navigation map on country and administrative division landing pages in the place-names section of IRHB. It takes no par...") |
mNo edit summary |
||
Line 1: | Line 1: | ||
<noinclude><div class="no-img">This widget displays the navigation map on country and administrative division landing pages in the place-names section of IRHB. It takes no parameters.</div></noinclude><includeonly | <noinclude><div class="no-img">This widget displays the navigation map on country and administrative division landing pages in the place-names section of IRHB. It takes no parameters.</div></noinclude><includeonly><script> | ||
//Utility | //Utility | ||
( function() { | ( function() { | ||
Line 369: | Line 369: | ||
n.prepareNav = function() { | n.prepareNav = function() { | ||
var d = get("choroMapLegend2"); | var d = get("choroMapLegend2"); | ||
d.onclick = selectChoroVar; | d.onclick = selectChoroVar; | ||
Line 383: | Line 379: | ||
d.style.color = "#4d8375"; | d.style.color = "#4d8375"; | ||
d.style.cursor = "pointer"; | d.style.cursor = "pointer"; | ||
get("choroMap").style.backgroundColor = "#f9fafa"; | get("choroMap").style.backgroundColor = "#f9fafa"; | ||
}; | }; | ||
Line 390: | Line 385: | ||
n.toggleNav = function() { | n.toggleNav = function() { | ||
var t = event.target.id; | var t = event.target.id; | ||
if (t === "nmnChoro") { | |||
get("choroMapLegend1").innerHTML = choroLegend[n.choroVar].s1; | get("choroMapLegend1").innerHTML = choroLegend[n.choroVar].s1; | ||
get("choroMapLegend2").innerHTML = choroLegend[n.choroVar].s2; | get("choroMapLegend2").innerHTML = choroLegend[n.choroVar].s2; | ||
Line 413: | Line 392: | ||
get("choroMapLegend").style.display = "block"; | get("choroMapLegend").style.display = "block"; | ||
} | } | ||
if (t === "nmnChoro") { | |||
m.curMap = "choroMap"; | m.curMap = "choroMap"; | ||
} | } | ||
m.initMap(); | |||
}; | }; | ||
Revision as of 10:34, 2 June 2019
This widget displays the navigation map on country and administrative division landing pages in the place-names section of IRHB. It takes no parameters.