]> git.openstreetmap.org Git - rails.git/blob - app/assets/javascripts/edit.js
Make sure we always read the body of a PUT or POST request
[rails.git] / app / assets / javascripts / edit.js
1 function maximiseMap() {
2   $("#left").hide();
3   $("#greeting").hide();
4   $("#tabnav").hide();
5
6   $("#content").css("top", "0px");
7   if ($("html").attr("dir") == "ltr") {
8     $("#content").css("left", "0px");
9   } else {
10     $("#content").css("right", "0px");
11   }
12
13   handleResize();
14 }
15
16 function minimiseMap() {
17   $("#left").show();
18   $("#greeting").show();
19   $("#tabnav").show();
20
21   $("#content").css("top", "30px");
22   if ($("html").attr("dir") == "ltr") {
23     $("#content").css("left", "185px");
24   } else {
25     $("#content").css("right", "185px");
26   }
27
28   handleResize();
29 }
30
31 $(document).ready(function () {
32   $(window).resize(handleResize);
33   handleResize();
34
35   $("#search_form").submit(function () {
36     $("#sidebar_title").html(I18n.t('site.sidebar.search_results'));
37     $("#sidebar_content").load($(this).attr("action"), {
38       query: $("#query").val()
39     }, openSidebar);
40
41     return false;
42   });
43 });