X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/56db9ca2b7e2475cd8025630049fb4a4b824f2d9..78d6bde4850a09a7cd9cb5774f394fd64680d664:/app/assets/javascripts/edit.js diff --git a/app/assets/javascripts/edit.js b/app/assets/javascripts/edit.js index f13e2d481..642aa9bda 100644 --- a/app/assets/javascripts/edit.js +++ b/app/assets/javascripts/edit.js @@ -1,25 +1,31 @@ function maximiseMap() { $("#content").addClass("maximised"); - - handleResize(); } function minimiseMap() { $("#content").removeClass("maximised"); - - handleResize(); } $(document).ready(function () { - $(window).resize(handleResize); - handleResize(); + $("#search_form").submit(function (e) { + e.preventDefault(); - $("#search_form").submit(function () { $("#sidebar_title").html(I18n.t('site.sidebar.search_results')); $("#sidebar_content").load($(this).attr("action"), { query: $("#query").val() }, openSidebar); + }); - return false; + $("#describe_location").click(function (e) { + e.preventDefault(); + + var mapParams = OSM.mapParams(); + + $("#sidebar_title").html(I18n.t('site.sidebar.search_results')); + $("#sidebar_content").load($(this).attr("href"), { + lat: mapParams.lat, + lon: mapParams.lng, + zoom: mapParams.zoom + }, openSidebar); }); });