From: hickert Date: Mon, 18 Jan 2010 09:53:45 +0000 (+0000) Subject: Updated baseSelectDialog X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c72d892dd0ad234bcd952c4b158f81cfe7d7996c;p=gosa.git Updated baseSelectDialog -We are now able to select entries again -Abort dialog button is still missing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15166 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_baseSelectDialog.inc b/gosa-core/include/class_baseSelectDialog.inc index 1aebc8328..c3b09b6f3 100644 --- a/gosa-core/include/class_baseSelectDialog.inc +++ b/gosa-core/include/class_baseSelectDialog.inc @@ -44,15 +44,24 @@ class baseSelectDialog extends management # if (session::global_is_set(get_class($this)."_filter")){ # $filter= session::global_get(get_class($this)."_filter"); # } else { - $filter = new filter(get_template_path("dep-filter.xml")); + $filter = new filter(get_template_path("dep-filter.xml")); # } - $this->setFilter($filter); + $this->setFilter($filter); - // Build headpage - $headpage = new listing(get_template_path("dep-list.xml")); - $headpage->registerElementFilter("depLabel", "baseSelectDialog::filterDepLabel"); - $headpage->setFilter($filter); - parent::__construct($config, $this->ui, "departments", $headpage); + // Build headpage + $headpage = new listing(get_template_path("dep-list.xml")); + $headpage->registerElementFilter("depLabel", "baseSelectDialog::filterDepLabel"); + $headpage->setFilter($filter); + $this->registerAction("open","openEntry"); + parent::__construct($config, $this->ui, "departments", $headpage); + } + + + // An action handler which enables to switch into deparmtment by clicking the names. + function openEntry($action,$entry) + { + $headpage = $this->getHeadpage(); + $headpage->setBase(array_pop($entry)); } @@ -67,7 +76,7 @@ class baseSelectDialog extends management return("$ou"); } - + function editEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="") { if(count($target) == 1){ @@ -83,21 +92,22 @@ class baseSelectDialog extends management $this->handleActions($this->detectPostActions()); } + function isClosed() { - return(!empty($this->BaseToUse)); + return(FALSE); } - function isSelected() - { - return($this->BaseToUse); - } + function isSelected() + { + return($this->BaseToUse); + } - function setCurrentBase($base) - { - $headpage = $this->getHeadpage(); - $headpage->setBase = $base; - } + function setCurrentBase($base) + { + $headpage = $this->getHeadpage(); + $headpage->setBase = $base; + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>