page.pushstate = page.popstate = function(path) {
$("#content").addClass("overlay-sidebar");
map.invalidateSize();
- $('#sidebar_content').load(path);
+ $('#sidebar_content').load(path, function(a, b, xhr) {
+ if (xhr.getResponseHeader('X-Page-Title')) {
+ document.title = xhr.getResponseHeader('X-Page-Title');
+ }
+ });
};
page.unload = function() {
var page = {};
page.pushstate = page.popstate = function(path, type, id) {
- $('#sidebar_content').load(path, function() {
+ $('#sidebar_content').load(path, function(a, b, xhr) {
+ if (xhr.getResponseHeader('X-Page-Title')) {
+ document.title = xhr.getResponseHeader('X-Page-Title');
+ }
page.load(path, type, id);
});
};