X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/abc5b2d7b4bf08b29074e7bb152d48b904989443..fef620e375faf7a168518d12f670ff26d0890aae:/app/views/site/_potlatch2.html.erb diff --git a/app/views/site/_potlatch2.html.erb b/app/views/site/_potlatch2.html.erb index 825654029..a72975dd7 100644 --- a/app/views/site/_potlatch2.html.erb +++ b/app/views/site/_potlatch2.html.erb @@ -14,7 +14,7 @@ window.onbeforeunload=function() { if (!changesaved) { - return '<%= escape_javascript(t('site.edit.potlatch_unsaved_changes')) %>'; + return '<%= escape_javascript(t('site.edit.potlatch2_unsaved_changes')) %>'; } } @@ -37,6 +37,7 @@ fo.addVariable("oauth_consumer_secret","<%= token.client_application.secret %>"); fo.addVariable("maximise_function","maximiseMap"); fo.addVariable("minimise_function","minimiseMap"); + fo.addVariable("move_function","mapMoved"); fo.write("map"); } @@ -45,4 +46,8 @@ function setPosition(lat, lon, zoom) { $("potlatch").setPosition(lat, lon, Math.max(zoom || 15, 13)); } + + function mapMoved(lon, lat, zoom, minlon, minlat, maxlon, maxlat) { + updatelinks(lon, lat, zoom, null, minlon, minlat, maxlon, maxlat); + }