From 0e28209ef4096662e03da00134ba7ce0c5fff531 Mon Sep 17 00:00:00 2001 From: janw Date: Tue, 1 Aug 2006 09:20:09 +0000 Subject: [PATCH] ACL toggling now works even with IE (small bug: when switching to relative positioning, the top cell will break on small resolutions). git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4359 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/include/focus.js | 14 ++++++++++++++ include/class_acl.inc | 14 +++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/html/include/focus.js b/html/include/focus.js index a41a6ff05..cc6bc15df 100644 --- a/html/include/focus.js +++ b/html/include/focus.js @@ -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"; + } } } diff --git a/include/class_acl.inc b/include/class_acl.inc index c2ad1d09e..072fdf546 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -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.= ""; + } else if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/ie/i",$_SERVER['HTTP_USER_AGENT'])) { + $display.= "
"._("Object").": $name
"; + } else { + $display.= "
"._("Object").": $name
"; + } } else { $display.= "
"._("Object").": $name
"; } @@ -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.= "
"._("Object").": $name