Code

ACL toggles now working (tested) with firefox and konqueror. IE uses the old behavior.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 1 Aug 2006 08:12:36 +0000 (08:12 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 1 Aug 2006 08:12:36 +0000 (08:12 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4358 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index c5bf374908ca183a24ddfd827931d6cc419cba58..a41a6ff0513b858b5a95082234f39d1b08a70fb1 100644 (file)
@@ -205,8 +205,8 @@ function divtoggle(element) {
 
          if (document.poppedLayer.style.visibility == "visible") {
                  hide (element);
+                       cell.style.height="0px";
                        document.poppedLayer.style.height="0px";
-                       cell.style.height="1px";
                } else {
                  show (element);
                        document.poppedLayer.style.height="";
index f3fed5371fa5cb4c5be52d753228c1f99e93d815..c2ad1d09ee948530d6658d520d721ea878935d8c 100644 (file)
@@ -487,12 +487,8 @@ class acl extends plugin
       $currentAcl= $this->aclContents[$key];
 
       /* Object header */
-      if($_SESSION['js']) {
-        if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/firefox/i",$_SERVER['HTTP_USER_AGENT'])) {
+      if($_SESSION['js'] && (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 {
-          $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>";
       }
@@ -525,8 +521,8 @@ class acl extends plugin
       $splist= $plist[preg_replace('%^.*/%', '', $key)]['plProvidedAcls'];
       asort($splist);
       if($_SESSION['js']) {
-        if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/firefox/i",$_SERVER['HTTP_USER_AGENT'])) {
-          $display.= "<tr id='tr_$name' style='vertical-align:top;height:0px;'><td colspan=".$cols."><div id='$name' style='visibility:hidden;height:0px;vertical-align:top;width:100%;'><table style='width:100%;'>";
+        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%;'>";
         }
       }
       foreach($splist as $attr => $dsc){
@@ -566,7 +562,7 @@ class acl extends plugin
       }
 
       if($_SESSION['js']) {
-        if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/firefox/i",$_SERVER['HTTP_USER_AGENT'])) {
+        if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/gecko/i",$_SERVER['HTTP_USER_AGENT'])) {
           $display.= "</table></div></td></tr>";
         }
       }