]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/history.js
Add sidebar loading indicator
[rails.git] / app / assets / javascripts / index / history.js
index 70366efbe3e17271cc8a00cb349f86cebea6e175..afae6640f87b566d8ab210bacbe18f3d8ce6b58a 100644 (file)
@@ -29,7 +29,7 @@ OSM.History = function(map) {
   };
 
   function highlightChangeset(id) {
-    group.getLayer(id).setStyle({fillOpacity: 0.5});
+    group.getLayer(id).setStyle({fillOpacity: 0.3});
     $("#changeset_" + id).addClass("selected");
   }
 
@@ -47,7 +47,7 @@ OSM.History = function(map) {
       url: window.location.pathname,
       method: "GET",
       data: {bbox: map.getBounds().toBBoxString()},
-      success: function(html) {
+      success: function(html, status, xhr) {
         $('#sidebar_content .changesets').html(html);
         updateMap();
       }
@@ -99,9 +99,7 @@ OSM.History = function(map) {
 
   page.pushstate = page.popstate = function(path) {
     $("#history_tab").addClass("current");
-    $("#sidebar").removeClass("minimized");
-    map.invalidateSize();
-    $("#sidebar_content").load(path, page.load);
+    OSM.loadSidebarContent(path, page.load);
   };
 
   page.load = function() {