From: hickert Date: Thu, 25 Oct 2007 11:21:26 +0000 (+0000) Subject: Added multiple priority settings X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6f3e8ce370d12bb1cdccae65c7a4ed719c1f1dd4;p=gosa.git Added multiple priority settings git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7655 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/addons/gotomasses/class_divListMasses.inc b/plugins/addons/gotomasses/class_divListMasses.inc index f504380cc..9a17bffdc 100644 --- a/plugins/addons/gotomasses/class_divListMasses.inc +++ b/plugins/addons/gotomasses/class_divListMasses.inc @@ -62,8 +62,16 @@ class divListMasses extends MultiSelectWindow if($this->parent->acl_is_removeable()){ $header .= " "; } - $header .= ""; + /* Add priority options */ + if(preg_match("/w/",$this->parent->getacl(""))){ + $header .= " "; + $header .= " "; + $header .= " "; + $header .= " "; + } + $header .= ""; + /* Create divlist */ $this->SetListHeader($header); diff --git a/plugins/addons/gotomasses/class_gotomasses.inc b/plugins/addons/gotomasses/class_gotomasses.inc index 1920ea8dd..1f71f7be3 100644 --- a/plugins/addons/gotomasses/class_gotomasses.inc +++ b/plugins/addons/gotomasses/class_gotomasses.inc @@ -42,6 +42,11 @@ class gotomasses extends plugin "/^prio_decrease_/" => "prio_decrease", "/^prio_bottom_/" => "prio_bottom", + "/^multiple_prio_top_/" => "mprio_top", + "/^multiple_prio_increase_/" => "mprio_increase", + "/^multiple_prio_decrease_/" => "mprio_decrease", + "/^multiple_prio_bottom_/" => "mprio_bottom", + "/^edit_task_/"=>"edit","/^remove_task_/"=>"remove", "/^new_task_/"=>"new_task","/^remove_multiple_task_/" => "remove_multiple"); foreach($arr as $regex => $action){ @@ -64,9 +69,25 @@ class gotomasses extends plugin * REMOVE ************/ - if(preg_match("/^prio_/",$s_action)){ + if(preg_match("/^mprio_/",$s_action) || preg_match("/^prio_/",$s_action)){ switch($s_action){ + case 'mprio_top' : foreach($this->list_get_selected_items() as $id ){ + $this->o_queue->max_entry_priority($id); + } + break; + case 'mprio_increase' : foreach($this->list_get_selected_items() as $id ){ + $this->o_queue->increase_entry_priority($id); + } + break; + case 'mprio_decrease' : foreach($this->list_get_selected_items() as $id ){ + $this->o_queue->decrease_entry_priority($id); + } + break; + case 'mprio_bottom' : foreach($this->list_get_selected_items() as $id ){ + $this->o_queue->min_entry_priority($id); + } + break; case 'prio_top' : $this->o_queue->max_entry_priority($s_entry);break; case 'prio_increase' : $this->o_queue->increase_entry_priority($s_entry);break; case 'prio_decrease' : $this->o_queue->decrease_entry_priority($s_entry);break;