X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e83d43ca822a30b6074834233064613ea6478f88..c0ee3f65bb9cd81f39c13417be5a2e37cba05921:/app/assets/javascripts/edit.js diff --git a/app/assets/javascripts/edit.js b/app/assets/javascripts/edit.js index f5ada1508..0b2b329b5 100644 --- a/app/assets/javascripts/edit.js +++ b/app/assets/javascripts/edit.js @@ -28,5 +28,16 @@ function minimiseMap() { handleResize(); } -$(document).ready(handleResize); -$(window).resize(handleResize); +$(document).ready(function () { + $(window).resize(handleResize); + handleResize(); + + $("#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; + }); +});