Code

ACL toggling now works even with IE (small bug: when switching to relative positionin...
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 1 Aug 2006 09:20:09 +0000 (09:20 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 1 Aug 2006 09:20:09 +0000 (09:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4359 594d385d-05f5-0310-b6e9-bd551577e9d8

html/include/focus.js
include/class_acl.inc

index a41a6ff0513b858b5a95082234f39d1b08a70fb1..cc6bc15dff4cce53bcce59d4d18b70d27c7ff411 100644 (file)
@@ -214,6 +214,20 @@ function divtoggle(element) {
                                cell.style.height=document.defaultView.getComputedStyle(document.poppedLayer,"").getPropertyValue('height');
                        }
                }
+       } else if (browserType == "ie") {
+    document.poppedLayer = document.getElementById(element);
+               cell= document.getElementById(cellname);
+         if (document.poppedLayer.style.visibility == "visible") {
+                 hide (element);
+                       cell.style.height="0px";
+                       document.poppedLayer.style.height="0px";
+                       document.poppedLayer.style.position="absolute";
+               } else {
+                 show (element);
+                       cell.style.height="";
+                       document.poppedLayer.style.height="";
+                       document.poppedLayer.style.position="relative";
+               }
        }
 }
 
index c2ad1d09ee948530d6658d520d721ea878935d8c..072fdf5461216d4d23f736bc700fcc577960c7f1 100644 (file)
@@ -487,8 +487,14 @@ class acl extends plugin
       $currentAcl= $this->aclContents[$key];
 
       /* Object header */
-      if($_SESSION['js'] && (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/gecko/i",$_SERVER['HTTP_USER_AGENT']))) {
+      if($_SESSION['js']) {
+        if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/gecko/i",$_SERVER['HTTP_USER_AGENT'])) {
           $display.= "<table style='width:100%;border:1px solid #A0A0A0' cellspacing=0 cellpadding=2><tr><td style='background-color:#C8C8C8;height:1.8em;' colspan=".($cols-1)."><b>"._("Object").": $name</b></td><td align='right' style='background-color:#C8C8C8;height:1.8em;'><input type='button' onclick='divtoggle(\"$name\");' value='"._("Show/Hide Advanced Settings")."' /></td></tr>";
+        } else if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/ie/i",$_SERVER['HTTP_USER_AGENT'])) {
+          $display.= "<table style='width:100%;border:1px solid #A0A0A0' cellspacing=0 cellpadding=2><tr><td style='background-color:#C8C8C8;height:1.8em;' colspan=".($cols-1)."><b>"._("Object").": $name</b></td><td align='right' style='background-color:#C8C8C8;height:1.8em;'><input type='button' onclick='divtoggle(\"$name\");' value='"._("Show/Hide Advanced Settings")."' /></td></tr>";
+        } else {
+          $display.= "<table style='width:100%;border:1px solid #A0A0A0' cellspacing=0 cellpadding=2><tr><td style='background-color:#C8C8C8;height:1.8em;' colspan=$cols><b>"._("Object").": $name</b></td></tr>";
+        }
       } else {
           $display.= "<table style='width:100%;border:1px solid #A0A0A0' cellspacing=0 cellpadding=2><tr><td style='background-color:#C8C8C8;height:1.8em;' colspan=$cols><b>"._("Object").": $name</b></td></tr>";
       }
@@ -522,7 +528,9 @@ class acl extends plugin
       asort($splist);
       if($_SESSION['js']) {
         if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/gecko/i",$_SERVER['HTTP_USER_AGENT'])) {
-          $display.= "<tr id='tr_$name' style='vertical-align:top;height:1px;'><td colspan=".$cols."><div id='$name' style='overflow:hidden;visibility:hidden;height:0px;vertical-align:top;width:100%;'><table style='width:100%;'>";
+          $display.= "<tr id='tr_$name' style='vertical-align:top;height:0px;'><td colspan=".$cols."><div id='$name' style='overflow:hidden;visibility:hidden;height:0px;vertical-align:top;width:100%;'><table style='width:100%;'>";
+        } else if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/ie/i",$_SERVER['HTTP_USER_AGENT'])) {
+          $display.= "<tr id='tr_$name' style='vertical-align:top;height:0px;'><td colspan=".$cols."><div id='$name' style='position:absolute;overflow:hidden;visibility:hidden;height:0px;vertical-align:top;width:100%;'><table style='width:100%;'>";
         }
       }
       foreach($splist as $attr => $dsc){
@@ -562,7 +570,7 @@ class acl extends plugin
       }
 
       if($_SESSION['js']) {
-        if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/gecko/i",$_SERVER['HTTP_USER_AGENT'])) {
+        if(isset($_SERVER['HTTP_USER_AGENT']) && (preg_match("/gecko/i",$_SERVER['HTTP_USER_AGENT'])) || (preg_match("/ie/i",$_SERVER['HTTP_USER_AGENT']))) {
           $display.= "</table></div></td></tr>";
         }
       }