X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=public%2Fjs%2Fsyj.js;h=e33ea4e306cfef58018c21641c4a1b98e9595748;hb=ad8cda652fe828281e96e5349cab640bcd29cbf4;hp=54677a27fb09992e40fdfb09f53e4d5078651622;hpb=f0cec87e660f4c34740d6a8c6256f534c67bb8b1;p=syj.git diff --git a/public/js/syj.js b/public/js/syj.js index 54677a2..e33ea4e 100644 --- a/public/js/syj.js +++ b/public/js/syj.js @@ -1090,13 +1090,12 @@ var Nominatim = (function() { }); anchor.observe('click', clickhandler(item.boundingbox)); + Element.text(anchor, item.display_name); - var text = document.createTextNode(item.display_name); var icon = new Element("img", { className: "nominatim-suggestions-icon", src: item.icon || 'icons/world.png' }); - anchor.appendChild(text); // insert does not work; see prototype #1125 li.insert(icon).insert(anchor); $("nominatim-suggestions-list").insert(li); if ($("nominatim-suggestions-list").childNodes.length >= 6) { @@ -1108,7 +1107,7 @@ var Nominatim = (function() { if ($("nominatim-suggestions-list").childNodes.length > 1) { var bottomOffset = $('data_controls').measure('height') + 3; $("nominatim-suggestions").setStyle({ - bottom: bottomOffset.toString() + 'px' + bottom: (document.viewport.getHeight() - $('data_controls').cumulativeOffset().top + 3).toString() + 'px' }).show(); $("nominatim-suggestions-list").select("li:first-child")[0].addClassName('current'); } else {