summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 03fc689)
raw | patch | inline | side by side (parent: 03fc689)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Apr 2011 12:41:19 +0000 (12:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Apr 2011 12:41:19 +0000 (12:41 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20657 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagementListing.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagementListing.inc
index cc59dc7cf9bcbf6c692a4df852cbdc0c5d7f5107..e02848aebafa1b3a93266e40ec03d7c3383b9c8e 100644 (file)
private $containerSelector = NULL;
private $objectTypeStr = "";
+ public $parent;
+
function __construct($config, $ui, $parent)
{
// Set storage points - We do not have any - We just create a fake list which lists all items
$items = "";
$i = 0;
- foreach($this->parent->addableContainerItems as $item){
- $desc = $this->parent->itemConfig[$item]['description'];
- $img = $images[$i++];
- $items .=
- "<action>".
- " <name>add_{$item}</name>".
- " <type>entry</type>".
- " <image>{$img}</image>".
- " <label>{$desc}</label>".
- "</action>";
+ if($this->parent){
+ foreach($this->parent->addableContainerItems as $item){
+ $desc = $this->parent->itemConfig[$item]['description'];
+ $img = $images[$i++];
+ $items .=
+ "<action>".
+ " <name>add_{$item}</name>".
+ " <type>entry</type>".
+ " <image>{$img}</image>".
+ " <label>{$desc}</label>".
+ "</action>";
+ }
}
-
if(!empty($items)){
$items =
$this->registerAction("cancelItemEdit", "closeDialogs");
$this->registerAction("cancelItemAdd", "closeDialogs");
- $this->registerAction("saveItemAdd", "saveItemAdd");
+ $this->registerAction("saveItemChanges", "saveItemChanges");
+ }
+
+ function saveItemChanges()
+ {
+ $this->parent->saveItemChanges();
}
function removeEntryRequested($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
$this->dialog = TRUE;
}
+ function clearDialogObject()
+ {
+ $this->closeDialogs();
+ }
}
?>
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc
index bf29fc9e9fb2541d033195379ddf098938d0fd97..06ddce55ff5568ca276953f22328ca3c4ea0fd90 100644 (file)
var $cfgTypeMap = NULL;
var $cfgItemMap = NULL;
+ var $addableContainerItems = array();
+ var $currentObject = NULL;
+
+
/*! \brief Initialize the plugin and finally update the data model.
*/
function __construct($config, $dn)
$this->setInstallMethod($method);
$this->TemplateEngine->setValues($item['type'],$item['values']['itemValues']);
$this->listing->setDialogObject($this->TemplateEngine);
+ $this->currentObject = $item;
}
}
-
+ function saveItemChanges()
+ {
+ $this->listing->clearDialogObject();
+ $item = $this->currentObject;
+ $this->TemplateEngine->save_object();
+ foreach($this->TemplateEngine->getWidgets() as $w){
+ $item['values']['itemValues'][$w->getName()] = $w->getValue();
+ }
+ $this->dataModel->setItemValues($item['path'], $item['values']);
+ }
}
?>