X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e7d200c4a6d0904ab1e027518eca7200b0ca9a08..59f1a6d49644143bfe643e0cabaaea72792fa5db:/app/assets/javascripts/index/history.js?ds=sidebyside diff --git a/app/assets/javascripts/index/history.js b/app/assets/javascripts/index/history.js index d27a06943..29a3d1fb9 100644 --- a/app/assets/javascripts/index/history.js +++ b/app/assets/javascripts/index/history.js @@ -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,12 +99,15 @@ OSM.History = function(map) { page.pushstate = page.popstate = function(path) { $("#history_tab").addClass("current"); - map.invalidateSize(); - $("#sidebar_content").load(path, page.load); + $("#sidebar_content").load(path + "?xhr=1", function(a, b, xhr) { + if (xhr.getResponseHeader('X-Page-Title')) { + document.title = xhr.getResponseHeader('X-Page-Title'); + } + page.load(); + }); }; page.load = function() { - $("#sidebar").removeClass("minimized"); map .on("moveend", loadData) .addLayer(group);