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