X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6db326aa1f084a062a3b658876bc01bf650f5702..cd4ac6ac2dfaea3f2c7419d8b6d5e0a9490e286a:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 6228b2376..935889ace 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -32,6 +32,8 @@ $(document).ready(function () { }); OSM.loadSidebarContent = function (path, callback) { + var content_path = path; + map.setSidebarOverlaid(false); clearTimeout(loaderTimeout); @@ -42,17 +44,17 @@ $(document).ready(function () { // IE<10 doesn't respect Vary: X-Requested-With header, so // prevent caching the XHR response as a full-page URL. - if (path.indexOf("?") >= 0) { - path += "&xhr=1"; + if (content_path.indexOf("?") >= 0) { + content_path += "&xhr=1"; } else { - path += "?xhr=1"; + content_path += "?xhr=1"; } $("#sidebar_content") .empty(); $.ajax({ - url: path, + url: content_path, dataType: "html", complete: function (xhr) { clearTimeout(loaderTimeout); @@ -234,7 +236,7 @@ $(document).ready(function () { e.preventDefault(); var data = $(this).data(), - center = L.latLng(data.lat, data.lon); + center = L.latLng(data.lat, data.lon); map.setView(center, data.zoom); L.marker(center, { icon: OSM.getUserIcon() }).addTo(map); @@ -260,13 +262,13 @@ $(document).ready(function () { if (object) query.select = object.type + object.id; var iframe = $("