Code

Updated listing
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Jan 2010 10:18:59 +0000 (10:18 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Jan 2010 10:18:59 +0000 (10:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15443 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_baseSelector.inc
gosa-core/include/class_listing.inc

index 0de55ac3293bfe7fe1bdaba67dfa349568d1375f..fbb04a79c468ded8049c7768fca913f25492e2e4 100644 (file)
@@ -25,6 +25,7 @@ class baseSelector {
   private $base;
   private $pid;
   private $action;
+  private $height= 500;
   private $submitButton= true;
   protected $tree;
   protected $pathMapping;
@@ -55,6 +56,12 @@ class baseSelector {
   }
 
 
+  function setHeight($value)
+  {
+    $this->height= $value;
+  }
+
+
   function setBase($base)
   {
     if (isset($this->pathMapping[$base])) {
@@ -101,7 +108,7 @@ class baseSelector {
           $this->base= $new_base;
           $this->action= 'rebase';
         } else {
-          die ("Base mismatch!");
+          return false;
         }
       }
     } elseif (isset($_POST['bs_input_'.$this->pid])) {
@@ -118,7 +125,7 @@ class baseSelector {
 
     /* Skip if there's no change */
     if (($this->tree && $this->base == $last_base) && !$force) {
-      return;
+      return true;
     }
 
     $link= "href='?plug=".$_GET['plug']."&amp;PID=".$this->pid."&amp;REBASE=".base64_encode($config->current['BASE'])."'";
@@ -133,7 +140,7 @@ class baseSelector {
                   "</script>";
 
     $selected= $this->base == $config->current['BASE']?"Selected":"";
-    $this->tree.= "<div class='treeList' style='display:none' id='bs_".$this->pid."' onmouseover=\"window.clearTimeout(rtimer);\" onmouseout=\"rtimer= Element.hide.delay(0.25, 'bs_".$this->pid."')\"><a class='treeList$selected' $link>/ ["._("Root")."]</a><ul class='treeList'>\n";
+    $this->tree.= "<div class='treeList' style='display:none;max-height:".$this->height."px' id='bs_".$this->pid."' onmouseover=\"window.clearTimeout(rtimer);\" onmouseout=\"rtimer= Element.hide.delay(0.25, 'bs_".$this->pid."')\"><a class='treeList$selected' $link>/ ["._("Root")."]</a><ul class='treeList'>\n";
     $first= true;
     $last_indent= 2;
 
@@ -179,6 +186,7 @@ class baseSelector {
       $this->tree.= "&nbsp;<input class='center' type='image' src='images/lists/submit.png' align='middle' title='"._("Submit")."' name='submit_base_".$this->pid."' id='submit_base_".$this->pid."' alt='"._("Submit")."'>";
     }
 
+    return true;
   }
 
   function render()
index 887e3cbf1cbec4513549a6c1f768f602f5c63069..20fcf22d62eea24eafb366640e8c5cb77e57f11f 100644 (file)
@@ -1556,6 +1556,12 @@ class listing {
   }
 
 
+  function getEntries()
+  {
+    return $this->entries;
+  }
+
+
   function getType($dn)
   {
     if (isset($this->objectDnMapping[$dn])) {