From: hickert Date: Mon, 6 Sep 2010 12:31:23 +0000 (+0000) Subject: Updated dialog names X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ee40a042c705dd31bfe0c8f1e2c9410af934a8e5;p=gosa.git Updated dialog names git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19528 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 deleted file mode 100644 index 5ee686db8..000000000 --- a/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc +++ /dev/null @@ -1,114 +0,0 @@ -parent = &$parent; - - $this->filterRules = $rules; - $this->filterListing= new sortableListing(); - $this->filterListing->setDeleteable(true); - $this->filterListing->setEditable(true); - $this->filterListing->setColspecs(array('*')); - $this->filterListing->setWidth("100%"); - $this->filterListing->setHeight("200px;"); - $this->filterListing->setAcl($this->parent->getacl('mailFilter')); - - - $this->filter = array(); - $this->filter[] = array ( - 'TYPE' => 'AND', - 'NAME' => 'MuellRaus', - 'DESC' => 'Spam loeschen', - 'CONDITIONS' => array ( - array('FIELD' => 'from', - 'COMPARATOR' => 'equals', - 'MATCH' => 'herbert'), - array('FIELD' => 'subject', - 'COMPARATOR' => 'contains', - 'MATCH' => 'advertising'), - ), - 'ACTION' => array ( - array('ACTION'=>'MARK', - 'VALUE' => 'SPAM'), - array('ACTION'=>'MOVE', - 'VALUE' => 'gosa+shared/hickert/trash') - ) - ); - - $this->filter[] = array ( - 'TYPE' => 'OR', - 'NAME' => 'Kunden', - 'DESC' => 'Kunden Mails in Wichtig schieben', - 'CONDITIONS' => array ( - array('FIELD' => 'from', - 'COMPARATOR' => 'contains', - 'MATCH' => 'gonicus'), - array('FIELD' => 'from', - 'COMPARATOR' => 'contains', - 'MATCH' => 'lka'), - ), - 'ACTION' => array ( - array('ACTION'=>'MARK', - 'VALUE' => 'HAM'), - array('ACTION'=>'MOVE', - 'VALUE' => 'gosa+shared/hickert/wichtig') - ) - ); - - } - - function execute() - { - - $smarty = get_smarty(); - - $data = $lData = array(); - foreach($this->filter as $key => $filter){ - $data[$key] = $filter; - $lData[$key] = array('data' => array($filter['NAME'], $filter['DESC'])); - } - $this->filterListing->setListData($data,$lData); - $this->filterListing->update(); - - - - $smarty->assign('list', $this->filterListing->render()); - - return($smarty->fetch(get_template_path('filterManager.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])){ - - - } - } - } -} - -?> diff --git a/gosa-plugins/groupware/personal/groupware/class_filterManager.inc b/gosa-plugins/groupware/personal/groupware/class_filterManager.inc new file mode 100644 index 000000000..5ee686db8 --- /dev/null +++ b/gosa-plugins/groupware/personal/groupware/class_filterManager.inc @@ -0,0 +1,114 @@ +parent = &$parent; + + $this->filterRules = $rules; + $this->filterListing= new sortableListing(); + $this->filterListing->setDeleteable(true); + $this->filterListing->setEditable(true); + $this->filterListing->setColspecs(array('*')); + $this->filterListing->setWidth("100%"); + $this->filterListing->setHeight("200px;"); + $this->filterListing->setAcl($this->parent->getacl('mailFilter')); + + + $this->filter = array(); + $this->filter[] = array ( + 'TYPE' => 'AND', + 'NAME' => 'MuellRaus', + 'DESC' => 'Spam loeschen', + 'CONDITIONS' => array ( + array('FIELD' => 'from', + 'COMPARATOR' => 'equals', + 'MATCH' => 'herbert'), + array('FIELD' => 'subject', + 'COMPARATOR' => 'contains', + 'MATCH' => 'advertising'), + ), + 'ACTION' => array ( + array('ACTION'=>'MARK', + 'VALUE' => 'SPAM'), + array('ACTION'=>'MOVE', + 'VALUE' => 'gosa+shared/hickert/trash') + ) + ); + + $this->filter[] = array ( + 'TYPE' => 'OR', + 'NAME' => 'Kunden', + 'DESC' => 'Kunden Mails in Wichtig schieben', + 'CONDITIONS' => array ( + array('FIELD' => 'from', + 'COMPARATOR' => 'contains', + 'MATCH' => 'gonicus'), + array('FIELD' => 'from', + 'COMPARATOR' => 'contains', + 'MATCH' => 'lka'), + ), + 'ACTION' => array ( + array('ACTION'=>'MARK', + 'VALUE' => 'HAM'), + array('ACTION'=>'MOVE', + 'VALUE' => 'gosa+shared/hickert/wichtig') + ) + ); + + } + + function execute() + { + + $smarty = get_smarty(); + + $data = $lData = array(); + foreach($this->filter as $key => $filter){ + $data[$key] = $filter; + $lData[$key] = array('data' => array($filter['NAME'], $filter['DESC'])); + } + $this->filterListing->setListData($data,$lData); + $this->filterListing->update(); + + + + $smarty->assign('list', $this->filterListing->render()); + + return($smarty->fetch(get_template_path('filterManager.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])){ + + + } + } + } +} + +?>