X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e9cb282712bdd5f0e103a33c35c7ef3961506ab7..fa339033e1f00f4f3e2b9c790c5100a863cf91ac:/app/assets/javascripts/edit.js?ds=sidebyside diff --git a/app/assets/javascripts/edit.js b/app/assets/javascripts/edit.js index f13e2d481..7de65190e 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.lon, + zoom: mapParams.zoom + }, openSidebar); }); });