From: cajus Date: Tue, 5 Jan 2010 09:09:27 +0000 (+0000) Subject: Added opera compatibility X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b9cd7840652bf11f271e645b26947c4cffe6e379;p=gosa.git Added opera compatibility git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15037 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/include/focus.js b/gosa-core/html/include/focus.js index 5774946a5..173c7ba17 100644 --- a/gosa-core/html/include/focus.js +++ b/gosa-core/html/include/focus.js @@ -367,9 +367,11 @@ function adjust_height(e) { suggested = suggested -20; } - document.getElementById("d_scrollbody").style.height=suggested+"px"; + if (!document.getElementById("list_workaround")) { + document.getElementById("d_scrollbody").style.height=suggested+20+"px"; + } if (document.getElementById("t_nscrollbody")) { - document.getElementById("t_nscrollbody").style.height=(suggested-24)+"px"; + document.getElementById("t_nscrollbody").style.height=(suggested-22)+"px"; } } return true; diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index 5ebabd659..aac1efd2e 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -264,6 +264,13 @@ class listing { return($message); } + // Some browsers don't have the ability do do scrollable table bodies, filter them + // here. + $switch= false; + if (preg_match('/(Opera|Konqueror|Safari)/i', $_SERVER['HTTP_USER_AGENT'])){ + $switch= true; + } + // Initialize list $result= "\n"; $height= 450; @@ -272,15 +279,23 @@ class listing { $height= $this->height; } - $result.= "
\n"; + $result.= "
\n"; - $result.= "\n"; + $height= ""; + if ($switch){ + $height= "height:100%;"; + } + $result.= "
\n"; $this->numColumns= count($this->colprops) + ($this->multiSelect?1:0); // Build list header $result.= "\n"; if ($this->multiSelect) { - $result.= "\n"; + $width= "24px"; + if (preg_match('/Konqueror/i', $_SERVER['HTTP_USER_AGENT'])){ + $width= "28px"; + } + $result.= "\n"; } foreach ($this->header as $header) { $result.= $header; @@ -309,7 +324,7 @@ class listing { // Render multi select if needed if ($this->multiSelect) { - $result.=""; + $result.=""; } // Render defined department columns, fill the rest with some stuff @@ -414,6 +429,7 @@ class listing { $smarty->assign("FILTER", $this->filter->render()); $smarty->assign("SIZELIMIT", print_sizelimit_warning()); $smarty->assign("LIST", $result); + $smarty->assign("list_workaround", $switch?"":""); // Assign navigation elements $nav= $this->renderNavigation();