]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/edit.rhtml
Set the OpenLayers locale when creating a map.
[rails.git] / app / views / site / edit.rhtml
index 49e4e94f09554d9390b1417b6e5ae54f851c004e..d7c47101a6c707369a1e2eff5e777be8c638e9b0 100644 (file)
@@ -64,15 +64,16 @@ zoom='14' if zoom.nil?
   var winie=false; if (document.all && window.print) { winie=true; }
   
   window.onbeforeunload=function() {
-       if (!changesaved && !winie) {
-           return "<%= t 'site.edit.potlatch_unsaved_changes' %>";
-       }
+    if (!changesaved) {
+      return "<%= t 'site.edit.potlatch_unsaved_changes' %>";
+    }
   }
 
   function markChanged(a) { changesaved=a; }
 
   function doSWF(lat,lon,sc) {
     if (sc < 11) sc = 11;
+    fo.addVariable('winie',winie);
     fo.addVariable('scale',sc);
     fo.addVariable('token','<%= session[:token] %>');
     if (lat) { fo.addVariable('lat',lat); }