Code

Updated base check
[gosa.git] / gosa-core / include / class_listing.inc
index 20fcf22d62eea24eafb366640e8c5cb77e57f11f..d1a2d3d1361be8ef52ab2c5f1ca849811a8a9329 100644 (file)
@@ -284,13 +284,8 @@ class listing {
       $height= $this->height;
     }
     
-    $result.= "<table cellpadding='0' cellspacing='0' border='0'><tr><td><div class='listContainer' id='d_scrollbody' style='border-top:1px solid #B0B0B0;border-right:1px solid #B0B0B0;width:700px;min-height:".($height+25)."px;'>\n";
-
-    $height= "";
-    if ($switch){
-      $height= "height:100%;";
-    }
-    $result.= "<table summary='$this->headline' style='${height}width:100%; table-layout:fixed;' cellspacing='0' cellpadding='0' id='t_scrolltable'>\n";
+    $result.= "<div class='listContainer' id='d_scrollbody' style='border-top:1px solid #B0B0B0;border-right:1px solid #B0B0B0;width:100%;min-height:".($height+25)."px;'>\n";
+    $result.= "<table summary='$this->headline' style='width:100%; table-layout:fixed' cellspacing='0' cellpadding='0' id='t_scrolltable'>\n";
     $this->numColumns= count($this->colprops) + ($this->multiSelect?1:0);
 
     // Build list header
@@ -410,11 +405,11 @@ class listing {
     }
 
     // Close list body
-    $result.= "</tbody></table></div></td></tr>";
+    $result.= "</tbody></table></div>";
 
     // Add the footer if requested
     if ($this->showFooter) {
-      $result.= "<tr><td class='nlistFooter'>";
+      $result.= "<div class='nlistFooter'><div style='padding:3px'>";
 
       foreach ($this->objectTypes as $objectType) {
         if (isset($this->objectTypeCount[$objectType['label']])) {
@@ -423,11 +418,10 @@ class listing {
         }
       }
 
-      $result.= "</td></tr>";
+      $result.= "</div></div>";
     }
 
     // Close list
-    $result.= "</table>";
     $result.= $switch?"<input type='hidden' id='list_workaround'>":"";
 
     // Add scroll positioner
@@ -562,6 +556,7 @@ class listing {
         $deps= $ui->get_module_departments($this->categories);
         $this->base= $deps[0];
         $this->baseSelector->setBase($this->base);
+        session::global_set("CurrentMainBase", $this->base);
       }
       if ($action == 'BACK') {
         $deps= $ui->get_module_departments($this->categories);
@@ -569,12 +564,14 @@ class listing {
         if(in_array_ics($base, $deps)){
           $this->base= $base;
           $this->baseSelector->setBase($this->base);
+          session::global_set("CurrentMainBase", $this->base);
         }
       }
       if ($action == 'HOME') {
         $ui= get_userinfo();
-        $this->base= $this->filter->getObjectBase($ui->dn);
+        $this->base= get_base_from_people($ui->dn);
         $this->baseSelector->setBase($this->base);
+        session::global_set("CurrentMainBase", $this->base);
       }
     }
 
@@ -977,7 +974,7 @@ class listing {
     $listhead ="";
 
     /* Check if we are in users home  department */
-    if(!count($deps) || $this->filter->base == $this->filter->getObjectBase($ui->dn)){
+    if(!count($deps) || $this->filter->base == get_base_from_people($ui->dn)){
       $enableHome = false;
     }