]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/edit.rhtml
Updated comment to reflect implementation.
[rails.git] / app / views / site / edit.rhtml
index ac54cb5e5f74c101f962b92fdb3c32657e479bd6..7f542bb60404a7db50dbcef3992e4706b1b7298e 100644 (file)
@@ -1,8 +1,8 @@
-<% if API_STATUS == :offline %>
+<% if OSM_STATUS == :database_offline or OSM_STATUS == :api_offline %>
 <p>The OpenStreetMap database is currently offline while
    essential database maintenance work is carried out.
 </p>
-<% elsif API_STATUS == :readonly %>
+<% elsif OSM_STATUS == :api_readonly %>
 <p>The OpenStreetMap database is currently in read-only mode while
    essential database maintenance work is carried out.
 </p>
@@ -48,7 +48,7 @@
 <%= javascript_include_tag 'swfobject.js' %>
 <script type="text/javascript" defer="defer">
   var brokenContentSize = $("content").offsetWidth == 0;
-  var fo = new SWFObject("/potlatch/potlatch.swf?d="+Math.round(Math.random()*1000), "potlatch", "100%", "100%", "6", "#FFFFFF");
+  var fo = new SWFObject("<%= compute_public_path("potlatch.swf", "potlatch") %>", "potlatch", "100%", "100%", "6", "#FFFFFF");
   // 700,600 for fixed size, 100%,100% for resizable
   var changesaved=true;
   var winie=false; if (document.all && window.print) { winie=true; }
@@ -65,9 +65,9 @@
     fo.addVariable('token','<%= session[:token] %>');
     if (lat) { fo.addVariable('lat',lat); }
     if (lon) { fo.addVariable('long',lon); }
-    <% if params['gpx'] %>
-               fo.addVariable('gpx','<%= h(params['gpx']) %>');
-    <% end %>
+    <% if params['gpx']  %>fo.addVariable('gpx' ,'<%= h(params['gpx'] ) %>');<% end %>
+    <% if params['way']  %>fo.addVariable('way' ,'<%= h(params['way'] ) %>');<% end %>
+    <% if params['node'] %>fo.addVariable('node','<%= h(params['node']) %>');<% end %>
     fo.write("map");
   }
 
 
     resizeMap();
   }
+
+  function maximiseMap() {
+    $("left").style.display = "none";
+    $("greeting").style.display = "none";
+    $("tabnav").style.display = "none";
+
+    $("content").style.top = "10px";
+    $("content").style.left = "10px";
+
+    handleResize();
+  }
   
+  function minimiseMap() {
+    $("left").style.display = "";
+    $("greeting").style.display = "";
+    $("tabnav").style.display = "";
+
+    $("content").style.top = "35px";
+    $("content").style.left = "192px";
+
+    handleResize();
+  }
+
   handleResize();
 
   window.onload = handleResize;