From 211806add95712b18f0d0707909600cd0123da55 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 31 Oct 2007 14:26:00 +0000 Subject: [PATCH] Fixed layer menu posts git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7700 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/themes/default/style.css | 2 +- plugins/admin/systems/class_divListSystem.inc | 3 +- .../admin/systems/class_systemManagement.inc | 48 +++++++++++-------- 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/html/themes/default/style.css b/html/themes/default/style.css index 518684e9f..47a046263 100644 --- a/html/themes/default/style.css +++ b/html/themes/default/style.css @@ -1567,7 +1567,7 @@ td.container_:hover,div.container_:hover { right: 11px; } -.kseparator { +.separator { background-color: #ff0000; border-top: 1px solid #c6c6bf; border-bottom: 1px solid #ffffff; diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index 096c7b1f9..e64d25ba3 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -214,7 +214,6 @@ class divListSystem extends MultiSelectWindow " "._("Copy all")."|"."multiple_copy_systems|\n"; $s.= "..|". " "._("Cut all")."|"."multiple_cut_systems|\n"; - $s.= "..|"._("Cut all")."|"."multiple_cut_systems||editcut.png|\n"; } /* Get copy & paste icon */ @@ -222,7 +221,7 @@ class divListSystem extends MultiSelectWindow if(preg_match("/(c.*w|w.*c)/",$all_module_acls) && $this->parent->CopyPasteHandler){ if($this->parent->CopyPasteHandler->entries_queued()){ $img = ""; - $s.="..|".$img." "._("Paste")."|\n"; + $s.="..|".$img." "._("Paste")."|editPaste|\n"; }else{ $img = ""; $s.="..|".$img." "._("Paste")."\n"; diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index b45f48782..f3b34c7fe 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -85,17 +85,6 @@ class systems extends plugin }elseif(preg_match("/gen_cd_.*/i",$key)){ $s_action="gen_cd"; $s_entry = preg_replace("/gen_cd_/i","",$key); - }elseif(preg_match("/^remove_multiple_systems/i",$key)){ - $s_action="del_multiple"; - }elseif(preg_match("/newsystem_.*/i",$key)){ - $s_action="newsystem"; - $s_entry = preg_replace("/newsystem_/i","",$key); - }elseif(preg_match("/^multiple_copy_systems/",$key)){ - $s_action = "copy_multiple"; - }elseif(preg_match("/^multiple_cut_systems/",$key)){ - $s_action = "cut_multiple"; - }elseif(preg_match("/^editPaste.*/i",$key)){ - $s_action="editPaste"; }elseif(preg_match("/^copy_.*/",$key)){ $s_action="copy"; $s_entry = preg_replace("/^copy_/i","",$key); @@ -130,6 +119,23 @@ class systems extends plugin $s_entry = preg_replace("/^newsystem_/","",$_POST['menu_action']); } + /* handle C&P from layers menu */ + if(isset($_POST['menu_action']) && preg_match("/^multiple_copy_systems/",$_POST['menu_action'])){ + $s_action = "copy_multiple"; + } + if(isset($_POST['menu_action']) && preg_match("/^multiple_cut_systems/",$_POST['menu_action'])){ + $s_action = "cut_multiple"; + } + if(isset($_POST['menu_action']) && preg_match("/^editPaste/",$_POST['menu_action'])){ + $s_action = "editPaste"; + } + + /* handle remove from layers menu */ + if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){ + $s_action = "del_multiple"; + } + + /* Check for exeeded sizelimit */ if (($message= check_sizelimit()) != ""){ return($message); @@ -1209,15 +1215,17 @@ class systems extends plugin $oc = $this->terminals[$id]['objectClass']; $type = $this->get_system_type($this->terminals[$id]); - $tab_o = $tabs[$type]['CLASS']; - $tab_c = $tabs[$type]['TABCLASS']; - $acl = $tabs[$type]['ACL']; - - if($s_action == "copy_multiple"){ - $this->CopyPasteHandler->add_to_queue($dn,"copy",$tab_c,$tab_o,$acl); - } - if($s_action == "cut_multiple"){ - $this->CopyPasteHandler->add_to_queue($dn,"cut",$tab_c,$tab_o,$acl); + if(isset($tabs[$type])){ + $tab_o = $tabs[$type]['CLASS']; + $tab_c = $tabs[$type]['TABCLASS']; + $acl = $tabs[$type]['ACL']; + + if($s_action == "copy_multiple"){ + $this->CopyPasteHandler->add_to_queue($dn,"copy",$tab_c,$tab_o,$acl); + } + if($s_action == "cut_multiple"){ + $this->CopyPasteHandler->add_to_queue($dn,"cut",$tab_c,$tab_o,$acl); + } } } } -- 2.30.2