Code

Updated filter Editor
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 6 Sep 2010 12:29:06 +0000 (12:29 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 6 Sep 2010 12:29:06 +0000 (12:29 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19526 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/personal/groupware/class_filterEditor.inc

index 6ba43f3900ef8320ec664c66e7a3bcbb021dbd75..1c4284e61ccee4ec34e55895a8012029c51c0575 100644 (file)
@@ -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";
+            }
+        }
+    }
 }
 
 ?>