Code

Updated ItemSelector
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Oct 2010 14:56:07 +0000 (14:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Oct 2010 14:56:07 +0000 (14:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20116 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_ItemSelector.inc

index 9223a73cdbd1f9bdbc81f23f979bf6ca8bd34fc3..266ddc42d626bf2cc6f18b7552a0984b2670c29f 100644 (file)
@@ -175,6 +175,11 @@ class ItemSelector {
         $link= "onclick=\"\$('bs_rebase_".$this->pid."').value='".base64_encode($this->releaseBase)."';  
             $('submit_tree_base_".$this->pid."').click();\"";
 
+        $initialValue = "";
+        if(isset($this->pathMapping[$this->base])){
+            $initialValue = $this->pathMapping[$this->base];
+        }
+
         $this->tree= "<input style='width:160px' type='text' size='35' 
             name='bs_input_{$this->pid}' id='bs_input_{$this->pid}'
 
@@ -195,7 +200,7 @@ class ItemSelector {
             onmouseout=\"   mouseIsStillOver=false; 
             rtimer=Element.hide.delay(0.25,'bs_".$this->pid."')\"
 
-            value=\"".preg_replace('/"/','&quot;',$this->pathMapping[$this->base])."\">";
+            value=\"".preg_replace('/"/','&quot;',$initialValue)."\">";
 
         // Autocompleter
         $this->tree.= "<div id='autocomplete_".$this->pid."' class='autocomplete'></div>".