From 14cdb0599b74269e8c3fca13c7139f4964b4bcf8 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 28 Aug 2009 13:38:08 +0000 Subject: [PATCH] Height configuration git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14161 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/include/focus.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/gosa-core/html/include/focus.js b/gosa-core/html/include/focus.js index e78e68fc3..aab47d898 100644 --- a/gosa-core/html/include/focus.js +++ b/gosa-core/html/include/focus.js @@ -338,15 +338,20 @@ function adjust_height(e) { // document.defaultView allows access to the rendered size of elements and should be supported by modern browsers if(document.defaultView) { - var menu_height=parseInt(document.defaultView.getComputedStyle(document.getElementById("menucell"),"").getPropertyValue('height')); - - // Minimum height for divlist should be the bottom edge of the menu - min_height= menu_height-197; - suggested= min_height; - if((inner_height-230)-suggested>0) { - suggested= inner_height-230; - } + var menu_height= 0; + if (document.getElementById("d_height")){ + suggested= parseInt(document.getElementById("d_height").value); + } else { + menu_height=parseInt(document.defaultView.getComputedStyle(document.getElementById("menucell"),"").getPropertyValue('height')); + // Minimum height for divlist should be the bottom edge of the menu + min_height= menu_height-197; + suggested= min_height; + if((inner_height-230)-suggested>0) { + suggested= inner_height-230; + } + } + // IE uses other height specifications } else if (browserType == "ie") { suggested= document.all.menucell.offsetHeight; -- 2.30.2