Code

Added option to divlist.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Sep 2007 07:39:45 +0000 (07:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Sep 2007 07:39:45 +0000 (07:39 +0000)
Divlist was over-sized in plugins when height was given

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7194 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_divlist.inc
plugins/admin/systems/class_servRepository.inc

index 17176b217b9ce96ffbe8d5f2b743a2a0ecc61291..25517de97fd1881ea21aa35b7d7caabc5cd32be7 100644 (file)
@@ -18,7 +18,8 @@ class divlist {
 
   var $force_height = false;
   var $list_footer = "";
-  
+  var $fix_list_for_plugins = FALSE; 
        // Added php 4 constructor
        function divlist($pageid){
 
@@ -38,6 +39,11 @@ class divlist {
        
        }
 
+  function SetPluginMode($val = TRUE)
+  {
+    $this->fix_list_for_plugins = $val;
+  }
+
   function SetFooter($str)
   {
     $this->list_footer = $str;
@@ -73,7 +79,7 @@ class divlist {
        
        function DrawList(){
                $s_return = "";
-    if(!$this->force_height){
+    if(!$this->force_height || $this->fix_list_for_plugins){
                  $s_return.= "<table summary='".$this->s_summary."' style='width:".
                   $this->s_width.";height:".$this->s_height.
                   "px;' cellspacing='0' id='t_scrolltable'>";
index 8b9329b12c5510d698347343b3b5badaee01a7d9..c46d64d28498c89c42c65b81d4176965cbf8c06e 100644 (file)
@@ -276,6 +276,7 @@ class servrepository extends plugin
     $divlist = new divList("repositories");
     $divlist->SetEntriesPerPage(0);
     $divlist->setHeight(400);
+    $divlist->SetPluginMode();
 
     $divlist->setHeader(array(array("string"=>_("Release"),"attach"=>"style='width:80px;'"),
                               array("string"=>_("Sections")),