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();
}
page.pushstate = page.popstate = function(path) {
$("#history_tab").addClass("current");
- $("#sidebar").removeClass("minimized");
- 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() {