Add sidebar loading indicator

This commit is contained in:
John Firebaugh 2013-11-12 16:58:34 -08:00
parent e8c02b49e4
commit 853dc286b9
8 changed files with 66 additions and 86 deletions

View file

@ -49,13 +49,7 @@ OSM.Search = function(map) {
page.pushstate = page.popstate = function(path) {
var params = querystring.parse(path.substring(path.indexOf('?') + 1));
$(".search_form input[name=query]").val(params.query);
map.invalidateSize();
$("#sidebar_content").load(path, function(a, b, xhr) {
if (xhr.getResponseHeader('X-Page-Title')) {
document.title = xhr.getResponseHeader('X-Page-Title');
}
page.load();
});
OSM.loadSidebarContent(path, page.load);
};
page.load = function() {