From 44f20657b61ee8df397ab717db1d7c67936daa2a Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 20 Apr 2010 13:33:31 +0000 Subject: [PATCH] Substract height of any plugin-action divs in order to not hide buttons git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17743 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/include/gosa.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gosa-core/html/include/gosa.js b/gosa-core/html/include/gosa.js index 761bd8c70..c3963b8eb 100644 --- a/gosa-core/html/include/gosa.js +++ b/gosa-core/html/include/gosa.js @@ -276,10 +276,19 @@ function divGOsa_toggle(element) { function resizeHandler (e) { if (!e) e=window.event; if ($("d_scrollbody") && $("t_nscrollbody")) { - var contentHeight= document.viewport.getHeight() - 216; - document.getElementById('d_scrollbody').style.height = contentHeight+23+'px'; - document.getElementById('t_nscrollbody').style.height = contentHeight+'px'; + + var contentHeight= document.viewport.getHeight() - 216; + if ($$('div.plugin-actions').length != 0) { + var height= 0; + $$('div.plugin-actions').each(function(s) { + height+= s.getHeight(); + }); + contentHeight-= height + 5; } + + document.getElementById('d_scrollbody').style.height = contentHeight+23+'px'; + document.getElementById('t_nscrollbody').style.height = contentHeight+'px'; + } return true; } -- 2.30.2