]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/search.js
Fix disabled overlay layers translations
[rails.git] / app / assets / javascripts / index / search.js
index 7f6eac9ca723a3a3b62e262539d96b5d1d741bb8..43142959b074d6c9586c238ea0bafc953e80063b 100644 (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() {
-      if (xhr.getResponseHeader('X-Page-Title')) {
-        document.title = xhr.getResponseHeader('X-Page-Title');
-      }
-      page.load();
-    });
+    OSM.loadSidebarContent(path, page.load);
   };
 
   page.load = function() {