]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/index.html.erb
Merge branch 'master' of git://git.openstreetmap.org/rails into openstreetbugs2
[rails.git] / app / views / site / index.html.erb
index 27ecf1fa79d6bb7ab610fe5fe11af5b88f300c34..b668627a0bd6be427af77b3747882fd17d0f9157 100644 (file)
@@ -25,7 +25,7 @@
 <div id="permalink">
   <a href="/" id="permalinkanchor"><%= t 'site.index.permalink' %></a><br/>
   <a href="/" id="shortlinkanchor"><%= t 'site.index.shortlink' %></a><br/>
-  <a href="javascript:void();" id="ReportBug">Report a problem</a>     
+  <a href="javascript:void();" id="ReportBug" class="reportProblem">Report a problem</a>       
 </div>
 
 <div id="attribution">
@@ -150,7 +150,8 @@ end
           cookieLifetime : 1000, 
           cookiePath : "/my/map/", 
           permalinkURL : "http://www.openstreetmap.org/", 
-          theme : "/stylesheets/openstreetbugs.css" 
+          theme : "/stylesheets/openstreetbugs.css",
+          visibility : false 
       });
 
       map.addLayer(map.osbLayer);
@@ -163,6 +164,9 @@ end
       lBug.addEventListener('click',function (e) {
                map.osbControl.activate(); document.getElementById("OpenLayers.Map_18_OpenLayers_Container").style.cursor = "crosshair" },false);
 
+     map.events.register("zoomend",map,function () { var zoom = map.getZoom(); var lBug = document.getElementById('ReportBug')
+        if (zoom > 11) { lBug.style.visibility = 'visible';} else {lBug.style.visibility = "hidden";}});
+
 
     <% end %>