X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/aff23d4b4bc9e9fecd5c1caa7e4d38087e002396..fa339033e1f00f4f3e2b9c790c5100a863cf91ac:/app/assets/javascripts/edit.js diff --git a/app/assets/javascripts/edit.js b/app/assets/javascripts/edit.js index b9aba25d3..7de65190e 100644 --- a/app/assets/javascripts/edit.js +++ b/app/assets/javascripts/edit.js @@ -7,12 +7,25 @@ function minimiseMap() { } $(document).ready(function () { - $("#search_form").submit(function () { + $("#search_form").submit(function (e) { + e.preventDefault(); + $("#sidebar_title").html(I18n.t('site.sidebar.search_results')); $("#sidebar_content").load($(this).attr("action"), { query: $("#query").val() }, openSidebar); + }); + + $("#describe_location").click(function (e) { + e.preventDefault(); - return false; + var mapParams = OSM.mapParams(); + + $("#sidebar_title").html(I18n.t('site.sidebar.search_results')); + $("#sidebar_content").load($(this).attr("href"), { + lat: mapParams.lat, + lon: mapParams.lon, + zoom: mapParams.zoom + }, openSidebar); }); });