]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/_potlatch2.html.erb
Improve the unsaved edits warning for Potlatch 2
[rails.git] / app / views / site / _potlatch2.html.erb
index d2358f05e0afd291632060032836d8e695c17e47..cda423e29caa2f2e04098ecfb7940d1c8d12f6dd 100644 (file)
@@ -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')) %>';
     }
   }
 
@@ -43,6 +43,6 @@
   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));
   }
 </script>