X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/42822a8b89443d5fa6ec815d82684698d2d80b07..4b17b92da09820dd7bf61a640fd37458b82b06fe:/app/views/site/index.html.erb diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index 9f99b0bc8..9098c1a88 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -20,7 +20,7 @@ @@ -126,6 +126,11 @@ end OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>"); + function createBugCallBack() { + map.osbControl.deactivate(); + document.getElementById("map_OpenLayers_Container").style.cursor = "default"; + } + function mapInit(){ map = createMap("map"); @@ -135,7 +140,7 @@ end map.addLayer(map.dataLayer); map.osbLayer = new OpenLayers.Layer.OpenStreetBugs("OpenStreetBugs", { - serverURL : "/api/0.6/bugs/", + serverURL : "/api/0.6/", iconOpen : new OpenLayers.Icon("http://openstreetbugs.schokokeks.org/client/open_bug_marker.png", new OpenLayers.Size(22, 22), new OpenLayers.Pixel(-11, -11)), iconClosed : new OpenLayers.Icon("http://openstreetbugs.schokokeks.org/client/closed_bug_marker.png", new OpenLayers.Size(22, 22), new OpenLayers.Pixel(-11, -11)), readonly : false, @@ -150,6 +155,11 @@ end map.osbControl = new OpenLayers.Control.OpenStreetBugs(map.osbLayer); 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 %>