X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/409576eea0542c650f3937624bb21a68ac58d6fd..fef620e375faf7a168518d12f670ff26d0890aae:/app/views/site/_potlatch2.html.erb?ds=sidebyside diff --git a/app/views/site/_potlatch2.html.erb b/app/views/site/_potlatch2.html.erb index d2358f05e..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,12 +37,17 @@ 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"); } doSWF(<%= @lat || 'null' %>,<%= @lon || 'null' %>,<%= @zoom %>); function setPosition(lat, lon, zoom) { - doSWF(lat, lon, zoom || 15); + $("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); }