Code

Added ogroups acls
[gosa.git] / include / class_divlist.inc
index 69d43a1fb1b97005c0c3ba17f11d575cf1a41168..a3ecfb8d5ed2f5f7ef04e1afe34b04e43a008166 100644 (file)
@@ -16,8 +16,8 @@ class divlist {
        var $i_currentPage;
        var $i_entriesPerPage;
 
-  var $height_forced  = false;
-
+  var $force_height = false;
+  
        // Added php 4 constructor
        function divlist($pageid){
 
@@ -51,7 +51,7 @@ class divlist {
        
   function SetHeight($s_height) {
                $this->s_height= $s_height;
-    $this->height_forced =true;
+    $this->force_height = true;
        }
   
   function SetWidth($s_width) {
@@ -64,9 +64,15 @@ class divlist {
        
        function DrawList(){
                $s_return = "";
-               $s_return.= "<table summary='".$this->s_summary."' style='width:".
-                $this->s_width."px;height:".$this->s_height.
-                "px;' cellspacing='0' id='t_scrolltable'>";
+    if(!$this->force_height){
+                 $s_return.= "<table summary='".$this->s_summary."' style='width:".
+                  $this->s_width."px;height:".$this->s_height.
+                  "px;' cellspacing='0' id='t_scrolltable'>";
+    } else {
+                 $s_return.= "<table summary='".$this->s_summary."' style='width:".
+                  $this->s_width."px;height:".$this->s_height.
+                  "px;' cellspacing='0' id='t_scrolltable_onlywidth'>";
+    }
 
     $s_return.= $this->_generateHeader();
     $s_return.=$this->_generatePage();
@@ -98,7 +104,11 @@ class divlist {
                
     // Using scrolltable?
     if($this->i_entriesPerPage == 0) {
-      $s_return.= "\n<tr><td class='scrollhead'><table summary='' style='width:".$this->s_width."px;' cellspacing='0' id='t_scrollhead'>";
+      if(!$this->force_height) {
+        $s_return.= "\n<tr><td class='scrollhead'><table summary='' style='width:".$this->s_width."px;' cellspacing='0' id='t_scrollhead'>";
+      } else {
+        $s_return.= "\n<tr><td class='scrollhead'><table summary='' style='width:".$this->s_width."px;' cellspacing='0' id='t_scrollhead_onlywidth'>";
+      }
     }
 
                $s_return.= "\n<tr>";
@@ -138,8 +148,13 @@ class divlist {
    
     if($this->i_entriesPerPage == 0) {
       // We need to construct a "body"-table that is width-of-scrollbar thinner than the "head"-table.
-      $s_return .= "\n<tr><td colspan='".$this->cols."' class='scrollbody'><div style='width:".$this->s_width."px;height:".($this->s_height-20)."px;' id='d_scrollbody' class='scrollbody'>";
-      $s_return .= "<table summary='' style='height:100%;width:581px;' cellspacing='0' id='t_scrollbody'>";
+      if(!$this->force_height) {
+        $s_return .= "\n<tr><td colspan='".$this->cols."' class='scrollbody'><div style='width:".$this->s_width."px;height:".($this->s_height-20)."px;' id='d_scrollbody' class='scrollbody'>";
+        $s_return .= "<table summary='' style='height:100%;width:581px;' cellspacing='0' id='t_scrollbody'>";
+      } else {
+        $s_return .= "\n<tr><td colspan='".$this->cols."' class='scrollbody'><div style='width:".$this->s_width."px;height:".($this->s_height-20)."px;' id='d_scrollbody_onlywidth' class='scrollbody'>";
+        $s_return .= "<table summary='' style='height:100%;width:581px;' cellspacing='0' id='t_scrollbody_onlywidth'>";
+      }
        }
  
     $i_alternate=0;
@@ -280,7 +295,7 @@ class divlist {
   
       // if fewer than 22 Entries (list not full), print row to fill empty space
       //FIXME: Why 22? Isn't the size dynamic
-      if($this->_numEntries()<=22){
+#      if($this->_numEntries()<=22){
         $fill= "";
         for ($i= 1; $i <= $this->cols; $i++){
           if ($i == $this->cols){
@@ -288,9 +303,9 @@ class divlist {
           } else {
            $fill.= "<td class='list1nohighlight' style='height:100%;'>&nbsp;</td>";
           }
-        }
+       }
         $s_return.="\n<tr>$fill";
-      }
+#      }
       if($this->i_entriesPerPage == 0) {
         $s_return .= "\n</table></div></td>";
       }