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