From 7b9272ffa64c33b2b58f4019bdeffa855d280d10 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 13 Jun 2007 10:02:37 +0000 Subject: [PATCH 1/1] 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. --- app/views/site/edit.rhtml | 4 ++-- public/javascripts/site.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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");'; -- 2.45.1