summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 693d3d9)
raw | patch | inline | side by side (parent: 693d3d9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Apr 2011 13:02:51 +0000 (13:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Apr 2011 13:02:51 +0000 (13:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20646 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_ItemSelector.inc | patch | blob | history |
index 0cc79551487c4dad457e52ce235e378a369404b3..3d7bdbf2179092979d311497fbbb5c0a800b1048 100644 (file)
if(isset($_REQUEST["BPID_{$this->pid}"]) && $_REQUEST["BPID_{$this->pid}"] == $this->pid) {
if (isset($_POST['bs_rebase_'.$this->pid])) {
$new_base= base64_decode(get_post('bs_rebase_'.$this->pid));
-
- if (isset($this->pathMapping[$new_base])) {
- $this->base= $new_base;
- $this->action= 'rebase';
- } else {
- $this->lastState= false;
- return false;
+ if($new_base){
+ if (isset($this->pathMapping[$new_base])) {
+ $this->base= $new_base;
+ $this->action= 'rebase';
+ } else {
+ $this->lastState= false;
+ return false;
+ }
}
}else{
// Input field set?
});";
}
$this->tree.= "</script>";
+ $selected= $this->base == $this->releaseBase?"Selected":"";
$this->tree.= "<div class='treeList'
style=' display:none;
max-height:".$this->height."px'
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= 1;
+ $baseDepth = 0;
foreach ($this->pathMapping as $base => $dummy) {
+ // Do not render the base element
+ if($base == $this->releaseBase){
+ $baseDepth = 1;
+ continue;
+ }
+
// Build path style display
$elements= explode('/', substr($base, strlen($this->releaseBase), strlen($base)));
- $indent= count($elements) ;
-
+ $indent= count($elements) - $baseDepth ;
+
if (!$first && ($indent == $last_indent)) {
$this->tree.= "</li>\n";
}