From 78b8297448457c718cfaf64d490bb8883eea5c75 Mon Sep 17 00:00:00 2001 From: cajus Date: Sat, 1 May 2010 16:17:16 +0000 Subject: [PATCH] Fix webkit and opera scroll area problem git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18009 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/include/gosa.js | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/gosa-core/html/include/gosa.js b/gosa-core/html/include/gosa.js index d3786ae2e..e0b4f986a 100644 --- a/gosa-core/html/include/gosa.js +++ b/gosa-core/html/include/gosa.js @@ -249,24 +249,30 @@ function divGOsa_toggle(element) { } function resizeHandler (e) { - if (!e) e=window.event; - if ($("d_scrollbody") && $("t_nscrollbody")) { - - 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; - } + if (!e) e= window.event; + + 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'; + if (Prototype.Browser.Gecko){ + if ($("d_scrollbody") && $("t_nscrollbody")) { + document.getElementById('d_scrollbody').style.height = contentHeight+23+'px'; + document.getElementById('t_nscrollbody').style.height = contentHeight+'px'; + } + } else { + document.getElementById('d_scrollbody').style.minHeight = contentHeight+23+'px'; + document.getElementById('t_nscrollbody').style.minHeight = contentHeight+'px'; } return true; } + function absTop(e) { return (e.offsetParent)?e.offsetTop+absTop(e.offsetParent) : e.offsetTop; } -- 2.30.2