X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/e83d43ca822a30b6074834233064613ea6478f88..4a26107560d5115bdebb40c8fc180e421314f977:/app/assets/javascripts/edit.js diff --git a/app/assets/javascripts/edit.js b/app/assets/javascripts/edit.js index f5ada1508..c2129e20c 100644 --- a/app/assets/javascripts/edit.js +++ b/app/assets/javascripts/edit.js @@ -1,13 +1,12 @@ function maximiseMap() { $("#left").hide(); - $("#greeting").hide(); - $("#tabnav").hide(); + $("#top-bar").hide(); - $("#content").css("top", "0px"); + $("#content").css("margin-top", "0px"); if ($("html").attr("dir") == "ltr") { - $("#content").css("left", "0px"); + $("#content").css("margin-left", "0px"); } else { - $("#content").css("right", "0px"); + $("#content").css("margin-right", "0px"); } handleResize(); @@ -15,18 +14,28 @@ function maximiseMap() { function minimiseMap() { $("#left").show(); - $("#greeting").show(); - $("#tabnav").show(); + $("#top-bar").show(); - $("#content").css("top", "30px"); + $("#content").css("margin-top", "30px"); if ($("html").attr("dir") == "ltr") { - $("#content").css("left", "185px"); + $("#content").css("margin-left", "185px"); } else { - $("#content").css("right", "185px"); + $("#content").css("margin-right", "185px"); } 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; + }); +});