]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Add node version pages
[rails.git] / app / assets / javascripts / index.js
index 706647ef51ff4415694c1f035cc58febaec42f6a..621054caf6a01c312fc9b6ae3e6402671cb13b90 100644 (file)
@@ -355,6 +355,16 @@ $(document).ready(function () {
     return page;
   };
 
     return page;
   };
 
+  OSM.OldBrowse = function () {
+    var page = {};
+
+    page.pushstate = page.popstate = function (path) {
+      OSM.loadSidebarContent(path);
+    };
+
+    return page;
+  };
+
   var history = OSM.History(map);
 
   OSM.router = OSM.Router(map, {
   var history = OSM.History(map);
 
   OSM.router = OSM.Router(map, {
@@ -369,6 +379,7 @@ $(document).ready(function () {
     "/user/:display_name/history": history,
     "/note/:id": OSM.Note(map),
     "/node/:id(/history)": OSM.Browse(map, "node"),
     "/user/:display_name/history": history,
     "/note/:id": OSM.Note(map),
     "/node/:id(/history)": OSM.Browse(map, "node"),
+    "/node/:id/history/:version": OSM.OldBrowse(),
     "/way/:id(/history)": OSM.Browse(map, "way"),
     "/relation/:id(/history)": OSM.Browse(map, "relation"),
     "/changeset/:id": OSM.Changeset(map),
     "/way/:id(/history)": OSM.Browse(map, "way"),
     "/relation/:id(/history)": OSM.Browse(map, "relation"),
     "/changeset/:id": OSM.Changeset(map),