Fixed small bug where clicking on the "Report a Problem" link would directly create a bug-report

This commit is contained in:
Kai Krueger 2010-03-06 09:44:54 +00:00
parent d0e291552e
commit be4c4d186b

View file

@ -20,7 +20,7 @@
<div id="permalink"> <div id="permalink">
<a href="/" id="permalinkanchor"><%= t 'site.index.permalink' %></a><br/> <a href="/" id="permalinkanchor"><%= t 'site.index.permalink' %></a><br/>
<a href="/" id="shortlinkanchor"><%= t 'site.index.shortlink' %></a><br/> <a href="/" id="shortlinkanchor"><%= t 'site.index.shortlink' %></a><br/>
<a onClick="map.osbControl.activate(); return false">Report a problem</a> <a id="ReportBug">Report a problem</a>
</div> </div>
</div> </div>
@ -150,6 +150,11 @@ end
map.osbControl = new OpenLayers.Control.OpenStreetBugs(map.osbLayer); map.osbControl = new OpenLayers.Control.OpenStreetBugs(map.osbLayer);
map.addControl(map.osbControl); map.addControl(map.osbControl);
var lBug = document.getElementById('ReportBug');
lBug.addEventListener('click',function (e) {
map.osbControl.activate(); document.getElementById("map_OpenLayers_Container").style.cursor = "crosshair"; if (e.stopPropagation) e.stopPropagation(); },false);
<% end %> <% end %>