From: cajus Date: Tue, 20 Apr 2010 13:33:31 +0000 (+0000) Subject: Substract height of any plugin-action divs in order to not hide buttons X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=44f20657b61ee8df397ab717db1d7c67936daa2a;p=gosa.git 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 --- 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; }