Code

Substract height of any plugin-action divs in order to not hide buttons
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 20 Apr 2010 13:33:31 +0000 (13:33 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 20 Apr 2010 13:33:31 +0000 (13:33 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17743 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/include/gosa.js

index 761bd8c70ca256fc4c1de7dd9813193901b8c781..c3963b8eb2e3f04badc1b3d3e89398ec50763714 100644 (file)
@@ -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;
 }