Code

Fixed automatic height adjusting for the IE(6). IE7 needs to be tested.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 20 Dec 2006 10:19:21 +0000 (10:19 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 20 Dec 2006 10:19:21 +0000 (10:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5449 594d385d-05f5-0310-b6e9-bd551577e9d8

html/include/focus.js
include/class_divlist.inc

index 2c49901216b4d0ba905e39dcff35d85c991246ab..874b3ff28cb139f9f89131fd68fd827303344631 100644 (file)
@@ -248,14 +248,24 @@ function adjust_height(e) {
                                suggested= inner_height-230;
                        }
        
-               } else if(px_height >= 450) {
-                               suggested= px_height-230;
+               // IE uses other height specifications
+               } else if (browserType == "ie") {
+                       suggested= document.all.menucell.offsetHeight;
+                       offset= absTop(d_scrollbody);
+                       suggested-= offset;
+                       if((inner_height-230)-suggested>0) {
+                               suggested= inner_height-230;
+                       }
                }
                document.getElementById("d_scrollbody").style.height=suggested+"px";
        }
        return true;
 }
 
+function absTop(e) {
+       return (e.offsetParent)?e.offsetTop+absTop(e.offsetParent) : e.offsetTop;
+}
+
 // Automatic resize (width) of divlists
 function adjust_width(e) {
        if (!e) e=window.event;
index ea7e65872ec5842edbbbb8884ba9e235f03ef7e2..cd12a5ebdf206bce265b25f4900e6dc206bd33eb 100644 (file)
@@ -196,7 +196,7 @@ class divlist {
                                                        
                                $s_value = $this->a_entries[$i];
                                
-                               
+                   // Alternation of background color          
                                if($i_alternate) $i_alternate=0; else $i_alternate=1;
                                
                                $s_return .= "\n<tr>";