From: cajus Date: Wed, 27 Jan 2010 17:09:45 +0000 (+0000) Subject: Added futur base selector class X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d262f0b8e5bc54bfe76b60970ffe3b86e0c84fe0;p=gosa.git Added futur base selector class git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15390 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/themes/default/style.css b/gosa-core/html/themes/default/style.css index 6e594f18d..42fe28620 100644 --- a/gosa-core/html/themes/default/style.css +++ b/gosa-core/html/themes/default/style.css @@ -2016,6 +2016,7 @@ ul.treeList, ul.treeList ul { list-style-type: none; background: url(../../image ul.treeList ul { margin-left: 10px; } ul.treeList a:hover { background-color: #DDD } a.treeList { font-weight: bold } +a.treeListSelected { font-weight: bold; color: red; } ul.treeList li { margin: 0; padding: 0 12px; line-height: 20px; background: url(../../images/lists/node.png) no-repeat; font-weight: bold; } li.treeListSelected a {color: red} ul.treeList li.last { background: #fff url(../../images/lists/lastnode.png) no-repeat; } diff --git a/gosa-core/include/class_baseSelector.inc b/gosa-core/include/class_baseSelector.inc new file mode 100644 index 000000000..18f363e3f --- /dev/null +++ b/gosa-core/include/class_baseSelector.inc @@ -0,0 +1,139 @@ + [name, description, type] array + // to avoid these tasks be done several times. Skipping for the moment. + #'dc' => 'plugins/departments/images/domain.png', + #'dc' => 'plugins/departments/images/dc.png', + #'l' => 'plugins/departments/images/locality.png', + #'c' => 'plugins/departments/images/country.png', + #'o' => 'plugins/departments/images/organization.png', + #'ou' => 'plugins/departments/images/folder.png', + + function __construct($bases, $base= "") + { + $this->setBases($bases); + $this->setBase($base); + } + + + function setBase($base) + { + if (isset($this->pathMapping[$base])) { + $this->base= $base; + } else { + die("Invalid base selected"); + } + } + + + function setBases($bases) + { + global $config; + + $this->pathMapping= array(); + $selected= $this->base == $config->current['BASE']?"Selected":""; + $this->tree= ""._("Root")."\n"; + } + +echo $this->tree; + + // Save bases to session for autocompletion + session::global_set('pathMapping', $this->pathMapping); + } + + + function render() + { + $result= ""; + return $result; + } + + + function update() + { + echo "update"; + } + + + function getBase() + { + return $this->base; + } + + + function getAction() + { + // Do not do anything if this is not our PID, or there's even no PID available... + #if(!isset($_REQUEST['PID']) || $_REQUEST['PID'] != $this->pid) { + # return; + #} + } + +} + +?>