Code

Quirks for list display
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Aug 2009 11:13:23 +0000 (11:13 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Aug 2009 11:13:23 +0000 (11:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14157 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_listing.inc

index 0f3a8594e833e8a2a94e6507d5f91b6844c4e72e..28d2165ed565d53d1a6946037754394408e1039f 100644 (file)
@@ -49,6 +49,7 @@ class listing {
   var $snapshotHandler= null;
   var $exporter= array();
   var $exportColumns= array();
+  var $useSpan= false;
 
 
   function listing($filename)
@@ -286,6 +287,7 @@ class listing {
     $deps= 0;
 
     // Draw department browser if configured and we're not in sub mode
+    $this->useSpan= false;
     if ($this->departmentBrowser && $this->filter->scope != "sub") {
       // Fill with department browser if configured this way
       $departmentIterator= new departmentSortIterator($this->departments, $this->sortDirection[$this->sortColumn]);
@@ -303,6 +305,7 @@ class listing {
           $colspan= 1;
           if (isset($config['span'])){
             $colspan= $config['span'];
+            $this->useSpan= true;
           }
           $result.="<td colspan='$colspan' ".$this->colprops[$index]." class='list1'>".$this->renderCell($config['value'], $entry, $row)."</td>";
           $rest-= $colspan;
@@ -356,7 +359,7 @@ class listing {
     }
 
     // Need to fill the list if it's not full (nobody knows why this is 22 ;-))
-    $emptyListStyle= (count($this->entries) + $deps == 0)?"border:0;":"";
+    $emptyListStyle= (count($this->entries) + (($this->useSpan && count($this->entries))?$deps:0) == 0)?"border:0;":"";
     if ((count($this->entries) + $deps) < 22) {
       $result.= "<tr>";
       for ($i= 0; $i<$this->numColumns; $i++) {