From: hickert Date: Mon, 6 Sep 2010 12:29:06 +0000 (+0000) Subject: Updated filter Editor X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=72175ff82c442691999a80edbc406586a59fbdbe;p=gosa.git Updated filter Editor git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19526 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc b/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc index 6ba43f390..1c4284e61 100644 --- a/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc +++ b/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc @@ -19,10 +19,6 @@ class filterEditor extends plugin{ $this->filterListing->setWidth("100%"); $this->filterListing->setHeight("200px;"); $this->filterListing->setAcl($this->parent->getacl('mailFilter')); - } - - function execute() - { $this->filter = array(); @@ -66,6 +62,10 @@ class filterEditor extends plugin{ ) ); + } + + function execute() + { $smarty = get_smarty(); @@ -84,6 +84,31 @@ class filterEditor extends plugin{ return($smarty->fetch(get_template_path('filterEditor.tpl',TRUE,dirname(__FILE__)))); } + function save_object() + { + $this->filterListing->save_object(); + $action = $this->filterListing->getAction(); + + // Remove filter was requested. + if($action['action'] == 'delete'){ + $key = $action['targets'][0]; + $key = $this->filterListing->getKey($key); + if(isset($this->filter[$key])){ + unset($this->filter[$key]); + $this->filter = array_values($this->filter); + } + } + + // Edit filter was requested. + if($action['action'] == 'edit'){ + $key = $action['targets'][0]; + $key = $this->filterListing->getKey($key); + if(isset($this->filter[$key])){ + + echo "edit"; + } + } + } } ?>