From: Tom Hughes Date: Wed, 13 Jun 2007 10:02:37 +0000 (+0000) Subject: Make sure we always put a valid URL on the edit tab, and allow switching X-Git-Tag: live~8430 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/7b9272ffa64c33b2b58f4019bdeffa855d280d10 Make sure we always put a valid URL on the edit tab, and allow switching to the editor to work from z11 instead of z14 as that is what Potlatch supports. Also fix default zooms for Potlatch when no position is given. --- diff --git a/app/views/site/edit.rhtml b/app/views/site/edit.rhtml index 40be2d7dc..a1b0a4925 100644 --- a/app/views/site/edit.rhtml +++ b/app/views/site/edit.rhtml @@ -7,11 +7,11 @@ <% elsif @user and params['lon'].nil? and params['lat'].nil? %> <% lon = @user.home_lon %> <% lat = @user.home_lat %> -<% zoom = '10' %> +<% zoom = '12' %> <%else%> <% lon = params['lon'] || '-0.1' %> <% lat = params['lat'] || '51.5' %> -<% zoom = params['zoom'] || '4' %> +<% zoom = params['zoom'] || '12' %> <% end %>
You need a Flash player to use Potlatch, the diff --git a/public/javascripts/site.js b/public/javascripts/site.js index 0d37d99cc..b610f3728 100644 --- a/public/javascripts/site.js +++ b/public/javascripts/site.js @@ -21,12 +21,12 @@ function updatelinks(lon,lat,zoom) { node = document.getElementById("editanchor"); if (node) { - if ( zoom >= 14) { - var args = getArgs(node.href); + if (zoom >= 11) { + var args = new Object(); args.lat = lat; args.lon = lon; args.zoom = zoom; - node.href = setArgs(node.href, args); + node.href = setArgs("/edit.html", args); node.style.fontStyle = 'normal'; } else { node.href = 'javascript:alert("zoom in to edit map");';