From 036c18be7bad48540d4b17ae9e77377a7fca1445 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Mon, 3 Apr 2017 13:38:07 +0200 Subject: [PATCH] use height: 0 instead of display: none to hide jot sections --- view/theme/frio/css/style.css | 4 ++++ view/theme/frio/templates/jot-header.tpl | 19 +++++++++++-------- view/theme/frio/templates/jot.tpl | 6 +++--- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index b4497b5a6b..d72aa1abaf 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -91,6 +91,10 @@ blockquote { .hidden { display: none !important; } +.minimize { + max-height: 0px !important; + overflow: hidden !important; +} code { white-space: pre-wrap; } diff --git a/view/theme/frio/templates/jot-header.tpl b/view/theme/frio/templates/jot-header.tpl index 27fc608e7c..6aad9889d1 100644 --- a/view/theme/frio/templates/jot-header.tpl +++ b/view/theme/frio/templates/jot-header.tpl @@ -283,19 +283,22 @@ // the following functions show/hide the specific jot content // in dependence of the selected nav function aclActive() { - $(".modal-body #profile-jot-wrapper, .modal-body #jot-preview-content, .modal-body #jot-fbrowser-wrapper").hide(); - $(".modal-body #profile-jot-acl-wrapper").show(); + $(".modal-body #profile-jot-wrapper, .modal-body #jot-preview-content, .modal-body #jot-fbrowser-wrapper").addClass("minimize"); + $(".modal-body #profile-jot-acl-wrapper").removeClass("minimize"); } function previewActive() { - $(".modal-body #profile-jot-wrapper, .modal-body #profile-jot-acl-wrapper,.modal-body #jot-fbrowser-wrapper").hide(); - preview_post(); + $(".modal-body #profile-jot-wrapper, .modal-body #profile-jot-acl-wrapper,.modal-body #jot-fbrowser-wrapper").addClass("minimize"); + var postPreview = preview_post(); + if (postPreview && typeof postPreview !== "undefined") { + $(".modal-body #jot-preview-content").removeClass("minimize"); + } } function jotActive() { - $(".modal-body #profile-jot-acl-wrapper, .modal-body #jot-preview-content, .modal-body #jot-fbrowser-wrapper").hide(); - $(".modal-body #profile-jot-wrapper").show(); + $(".modal-body #profile-jot-acl-wrapper, .modal-body #jot-preview-content, .modal-body #jot-fbrowser-wrapper").addClass("minimize"); + $(".modal-body #profile-jot-wrapper").removeClass("minimize"); //make sure jot text does have really the active class (we do this because there are some // other events which trigger jot text @@ -303,9 +306,9 @@ } function fbrowserActive() { - $(".modal-body #profile-jot-wrapper, .modal-body #jot-preview-content, .modal-body #profile-jot-acl-wrapper").hide(); + $(".modal-body #profile-jot-wrapper, .modal-body #jot-preview-content, .modal-body #profile-jot-acl-wrapper").addClass("minimize"); - $(".modal-body #jot-fbrowser-wrapper").show(); + $(".modal-body #jot-fbrowser-wrapper").removeClass("minimize"); $(function() {Dialog.showJot();}); } diff --git a/view/theme/frio/templates/jot.tpl b/view/theme/frio/templates/jot.tpl index cd54580e36..75a0cbc051 100644 --- a/view/theme/frio/templates/jot.tpl +++ b/view/theme/frio/templates/jot.tpl @@ -112,14 +112,14 @@ - -- 2.39.5