From e9cb282712bdd5f0e103a33c35c7ef3961506ab7 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 19 Jan 2013 11:29:12 +0000 Subject: [PATCH] Make maximising work properly again in Potlatch --- app/assets/javascripts/edit.js | 20 ++------------------ app/assets/stylesheets/common.css.scss | 9 +++++++++ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/app/assets/javascripts/edit.js b/app/assets/javascripts/edit.js index 30823d49e..f13e2d481 100644 --- a/app/assets/javascripts/edit.js +++ b/app/assets/javascripts/edit.js @@ -1,27 +1,11 @@ function maximiseMap() { - $("#left").hide(); - $("#top-bar").hide(); - - $("#content").css("top", "0px"); - if ($("html").attr("dir") == "ltr") { - $("#content").css("margin-left", "0px"); - } else { - $("#content").css("margin-right", "0px"); - } + $("#content").addClass("maximised"); handleResize(); } function minimiseMap() { - $("#left").show(); - $("#top-bar").show(); - - $("#content").css("top", "30px"); - if ($("html").attr("dir") == "ltr") { - $("#content").css("margin-left", "185px"); - } else { - $("#content").css("margin-right", "185px"); - } + $("#content").removeClass("maximised"); handleResize(); } diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index b29d5a4ad..4ffe49c85 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -777,6 +777,15 @@ ul.results-list li { border-bottom: 1px solid #ccc; } top: 30px; } +#content.maximised { + top: 0; + left: 0; + right: 0; + bottom: 0; + border: 0; + z-index: 1000; +} + #slim_container { width: 100%; } -- 2.39.5