]> git.openstreetmap.org Git - rails.git/blobdiff - public/javascripts/site.js
various skeleton stuff
[rails.git] / public / javascripts / site.js
index 75c3eb539807d4dabd69879f7282accedf57634a..e7ef320bcadaea835f499ee92405d8e372602a1e 100644 (file)
@@ -1,28 +1,28 @@
 function updatelinks(lon,lat,zoom) {
 function updatelinks(lon,lat,zoom) {
-    var links = new Array();
-    links['viewanchor'] = '/index.html';
-    //links['editanchor'] = 'edit.html';
-    links['uploadanchor'] = '/traces';
-    links['loginanchor'] = '/login.html';
-    links['logoutanchor'] = '/logout.html';
-    links['registeranchor'] = '/create-account.html';
-    var node;
-    var anchor;
-    for (anchor in links) {
-       node = document.getElementById(anchor);
-       if (! node) { continue; }
-       node.href = links[anchor] + "?lat=" + lat + "&lon=" + lon + "&zoom=" + zoom;
-    }
+  var links = new Array();
+  links['viewanchor'] = '/index.html';
+  //links['editanchor'] = 'edit.html';
+  links['uploadanchor'] = '/traces';
+  links['loginanchor'] = '/login.html';
+  links['logoutanchor'] = '/logout.html';
+  links['registeranchor'] = '/create-account.html';
+
+  var node;
+  var anchor;
+  for (anchor in links) {
+    node = document.getElementById(anchor);
+    if (! node) { continue; }
+    node.href = links[anchor] + "?lat=" + lat + "&lon=" + lon + "&zoom=" + zoom;
+  }
 
 
-    node = document.getElementById("editanchor");
-    if (node) {
+  node = document.getElementById("editanchor");
+  if (node) {
     if ( zoom >= 14) {
     if ( zoom >= 14) {
-        node.href = '/edit.html?lat=' + lat + '&lon=' + lon + "&zoom=" + zoom;
-       node.style.fontStyle = 'normal';
+      node.href = '/edit.html?lat=' + lat + '&lon=' + lon + "&zoom=" + zoom;
+      node.style.fontStyle = 'normal';
     } else {
     } else {
-        node.href = 'javascript:alert("zoom in to edit map");';
-       node.style.fontStyle = 'italic';
-    }
+      node.href = 'javascript:alert("zoom in to edit map");';
+      node.style.fontStyle = 'italic';
     }
     }
+  }
 }
 }