X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e83d43ca822a30b6074834233064613ea6478f88..53e4d600e712dea988028a12f68927c3400a6901:/app/assets/javascripts/edit.js diff --git a/app/assets/javascripts/edit.js b/app/assets/javascripts/edit.js index f5ada1508..b03b71154 100644 --- a/app/assets/javascripts/edit.js +++ b/app/assets/javascripts/edit.js @@ -1,32 +1,29 @@ function maximiseMap() { - $("#left").hide(); - $("#greeting").hide(); - $("#tabnav").hide(); - - $("#content").css("top", "0px"); - if ($("html").attr("dir") == "ltr") { - $("#content").css("left", "0px"); - } else { - $("#content").css("right", "0px"); - } - - handleResize(); + $("#content").addClass("maximised"); } function minimiseMap() { - $("#left").show(); - $("#greeting").show(); - $("#tabnav").show(); + $("#content").removeClass("maximised"); +} - $("#content").css("top", "30px"); - if ($("html").attr("dir") == "ltr") { - $("#content").css("left", "185px"); - } else { - $("#content").css("right", "185px"); - } +$(document).ready(function () { + $("#search_form").submit(function (e) { + e.preventDefault(); - handleResize(); -} + $("#sidebar_content").load($(this).attr("action"), { + query: $("#query").val() + }); + }); + + $("#describe_location").click(function (e) { + e.preventDefault(); + + var mapParams = OSM.mapParams(); -$(document).ready(handleResize); -$(window).resize(handleResize); + $("#sidebar_content").load($(this).attr("href"), { + lat: mapParams.lat, + lon: mapParams.lon, + zoom: mapParams.zoom + }); + }); +});