From: hickert Date: Mon, 5 Nov 2007 08:50:05 +0000 (+0000) Subject: Some layer menu fixes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a64ed74ebb1495ab1d1c9ac2ddd9162ab6f0f59d;p=gosa.git Some layer menu fixes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7736 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/acl/class_aclManagement.inc b/plugins/admin/acl/class_aclManagement.inc index a9b9183ea..fd784ed0b 100644 --- a/plugins/admin/acl/class_aclManagement.inc +++ b/plugins/admin/acl/class_aclManagement.inc @@ -108,6 +108,27 @@ class aclManagement extends plugin $s_tab= "generic"; } + + /* 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"; + } + + /* Create options */ + if(isset($_POST['menu_action']) && $_POST['menu_action'] == "new_acl_role"){ + $s_action = "new"; + } + + /* handle remove from layers menu */ + if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){ + $s_action = "del_multiple"; + } /******************** Copy & Paste Handling ... diff --git a/plugins/admin/acl/class_divListACL.inc b/plugins/admin/acl/class_divListACL.inc index 0d76a7af7..2c0374a05 100644 --- a/plugins/admin/acl/class_divListACL.inc +++ b/plugins/admin/acl/class_divListACL.inc @@ -130,42 +130,52 @@ class divListACL extends MultiSelectWindow /* Add default header */ $listhead = MultiSelectWindow::get_default_header(); + $listhead .= + _("Base")." ". + "  "; - /* Get copy & paste icon */ - $Copy_Paste =""; - if(preg_match("/(c.*w|w.*c)/",$acl_all) && $this->parent->CopyPasteHandler){ - $Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon(); - $addsep = true; - } - /* Add snapshot icons */ - if(preg_match("/(c.*w|w.*c)/",$acl_all)){ - $listhead .= $this->get_snapshot_header($this->selectedBase); - $add_sep = true; - } + /* Create Layers menu */ + $s = ".|"._("Actions")."|\n"; + $s .= "..|". + " "._("Create")."|\n"; - if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"acl/acl"))){ - $add_sep = true; - $listhead .= " "; + /* Append create options */ + if(preg_match("/c/",$acl)) { + $s.= "...|". + " "._("Role")."|new_acl_role|\n"; } - $listhead .= $Copy_Paste. - _("Base")." ". - "  "; + /* Multiple options */ + $s.= "..|---|\n"; + $s.= "..|". + " "._("Remove")."|"."remove_multiple|\n"; - /* Add multiple copy & cut icons */ + /* Add multiple copy & cut icons */ if(is_object($this->parent->CopyPasteHandler)){ - $listhead .= "  "; - $listhead .= "  "; - $listhead .= ""; + $s.= "..|---|\n"; + $s.= "..|". + " "._("Copy")."|"."multiple_copy_systems|\n"; + $s.= "..|". + " "._("Cut")."|"."multiple_cut_systems|\n"; + + if($this->parent->CopyPasteHandler->entries_queued()){ + $img = ""; + $s.="..|".$img." "._("Paste")."|editPaste|\n"; + }else{ + $img = ""; + $s.="..|".$img." "._("Paste")."\n"; + } } - $listhead .= ""; + /* Add snapshot icons */ + if(preg_match("/(c.*w|w.*c)/",$acl_all)){ + $s .= "..|---|\n"; + $s .= $this->get_snapshot_header(TRUE); + } + $this->SetDropDownHeaderMenu($s); $this->SetListHeader($listhead); } diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc index 78f76d45f..69a4c0f48 100644 --- a/plugins/admin/applications/class_applicationManagement.inc +++ b/plugins/admin/applications/class_applicationManagement.inc @@ -168,7 +168,7 @@ class applicationManagement extends plugin } /* handle remove from layers menu */ - if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){ + if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){ $s_action = "del_multiple"; } diff --git a/plugins/admin/applications/class_divListApplication.inc b/plugins/admin/applications/class_divListApplication.inc index 5eaa67b73..15b09c6d7 100755 --- a/plugins/admin/applications/class_divListApplication.inc +++ b/plugins/admin/applications/class_divListApplication.inc @@ -158,7 +158,7 @@ class divListApplication extends MultiSelectWindow /* Multiple options */ $s.= "..|---|\n"; $s.= "..|". - " "._("Remove")."|"."remvove_multiple|\n"; + " "._("Remove")."|"."remove_multiple|\n"; /* Add multiple copy & cut icons */ if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){ diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index 2055e6cfa..e2db188d1 100644 --- a/plugins/admin/departments/class_departmentManagement.inc +++ b/plugins/admin/departments/class_departmentManagement.inc @@ -104,7 +104,7 @@ class departmentManagement extends plugin } /* handle remove from layers menu */ - if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){ + if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){ $s_action = "del_multiple"; } diff --git a/plugins/admin/departments/class_divListDepartment.inc b/plugins/admin/departments/class_divListDepartment.inc index 43171c777..b1f642dbf 100755 --- a/plugins/admin/departments/class_divListDepartment.inc +++ b/plugins/admin/departments/class_divListDepartment.inc @@ -121,8 +121,7 @@ class divListDepartment extends MultiSelectWindow /* Add default header */ $listhead = MultiSelectWindow::get_default_header(); - $listhead .= "  ". + $listhead .= " "._("Base")." ". "  "; @@ -139,7 +138,7 @@ class divListDepartment extends MultiSelectWindow } $s.= "..|---|\n"; $s.= "..|". - " "._("Remove")."|"."remvove_multiple|\n"; + " "._("Remove")."|"."remove_multiple|\n"; $this->SetDropDownHeaderMenu($s); diff --git a/plugins/admin/devices/class_deviceManagement.inc b/plugins/admin/devices/class_deviceManagement.inc index 4715ea0f3..dbdfc0fb4 100644 --- a/plugins/admin/devices/class_deviceManagement.inc +++ b/plugins/admin/devices/class_deviceManagement.inc @@ -104,7 +104,7 @@ class deviceManagement extends plugin } /* handle remove from layers menu */ - if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){ + if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){ $s_action = "del_multiple"; } diff --git a/plugins/admin/devices/class_divListDevices.inc b/plugins/admin/devices/class_divListDevices.inc index e2a8a34a4..fb09fe8c8 100755 --- a/plugins/admin/devices/class_divListDevices.inc +++ b/plugins/admin/devices/class_divListDevices.inc @@ -146,7 +146,7 @@ class divListDevices extends MultiSelectWindow /* Multiple options */ $s.= "..|---|\n"; $s.= "..|". - " "._("Remove")."|"."remvove_multiple|\n"; + " "._("Remove")."|"."remove_multiple|\n"; /* Add multiple copy & cut icons */ if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){ diff --git a/plugins/admin/fai/class_divListFai.inc b/plugins/admin/fai/class_divListFai.inc index 317ab9f08..c2ae1b9b5 100644 --- a/plugins/admin/fai/class_divListFai.inc +++ b/plugins/admin/fai/class_divListFai.inc @@ -213,7 +213,7 @@ class divListFai extends MultiSelectWindow /* Multiple options */ $s.= "..|". - " "._("Remove")."|"."remvove_multiple|\n"; + " "._("Remove")."|"."remove_multiple|\n"; /* Add multiple copy & cut icons */ if(is_object($this->parent->CopyPasteHandler)){ diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index 017fa5dbb..a9fc28fcf 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -153,7 +153,7 @@ class faiManagement extends plugin } /* handle remove from layers menu */ - if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){ + if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){ $s_action = "del_multiple"; } diff --git a/plugins/admin/groups/class_divListGroup.inc b/plugins/admin/groups/class_divListGroup.inc index ab0cef777..fcf32f843 100644 --- a/plugins/admin/groups/class_divListGroup.inc +++ b/plugins/admin/groups/class_divListGroup.inc @@ -168,7 +168,7 @@ class divListGroup extends MultiSelectWindow /* Multiple options */ $s.= "..|---|\n"; $s.= "..|". - " "._("Remove")."|"."remvove_multiple|\n"; + " "._("Remove")."|"."remove_multiple|\n"; /* Add multiple copy & cut icons */ if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){ diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc index 664084fd1..f146ad689 100644 --- a/plugins/admin/groups/class_groupManagement.inc +++ b/plugins/admin/groups/class_groupManagement.inc @@ -139,7 +139,7 @@ class groupManagement extends plugin } /* handle remove from layers menu */ - if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){ + if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){ $s_action = "del_multiple"; } diff --git a/plugins/admin/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc index a34c10f78..1c8677f46 100755 --- a/plugins/admin/mimetypes/class_divListMimeTypes.inc +++ b/plugins/admin/mimetypes/class_divListMimeTypes.inc @@ -179,7 +179,7 @@ class divListMimeTypes extends MultiSelectWindow /* Multiple options */ $s.= "..|---|\n"; $s.= "..|". - " "._("Remove")."|"."remvove_multiple|\n"; + " "._("Remove")."|"."remove_multiple|\n"; /* Add multiple copy & cut icons */ if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){ diff --git a/plugins/admin/mimetypes/class_mimetypeManagement.inc b/plugins/admin/mimetypes/class_mimetypeManagement.inc index caee8ddf1..e2dd047e2 100755 --- a/plugins/admin/mimetypes/class_mimetypeManagement.inc +++ b/plugins/admin/mimetypes/class_mimetypeManagement.inc @@ -164,7 +164,7 @@ class mimetypeManagement extends plugin } /* handle remove from layers menu */ - if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){ + if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){ $s_action = "del_multiple"; } diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc index 7ed769ac5..574087740 100644 --- a/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/plugins/admin/ogroups/class_ogroupManagement.inc @@ -126,7 +126,7 @@ class ogroupManagement extends plugin } /* handle remove from layers menu */ - if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){ + if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){ $s_action = "del_multiple"; } diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index 4befca115..61871b7a9 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -199,7 +199,7 @@ class divListSystem extends MultiSelectWindow " "._("Component")."|"."newsystem_component|\n"; } $s.= "..|". - " "._("Remove")."|"."remvove_multiple|\n"; + " "._("Remove")."|"."remove_multiple|\n"; /* Add multiple copy & cut icons */ if(is_object($this->parent->CopyPasteHandler)){ diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index f3b34c7fe..4b8198c4a 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -131,7 +131,7 @@ class systems extends plugin } /* handle remove from layers menu */ - if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){ + if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){ $s_action = "del_multiple"; } diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index a571f5f07..6ba71d714 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -165,7 +165,7 @@ class divListUsers extends MultiSelectWindow $s.= "..|". " "._("Change password")."|"."multiple_password_change|\n"; $s.= "..|". - " "._("Remove")."|"."remvove_multiple|\n"; + " "._("Remove")."|"."remove_multiple|\n"; /* Add multiple copy & cut icons */ if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){ diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 64fbb0707..f8a297c6d 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -142,7 +142,7 @@ class userManagement extends plugin } /* handle remove from layers menu */ - if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){ + if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){ $s_action = "del_multiple"; } diff --git a/plugins/gofon/conference/class_divListConferences.inc b/plugins/gofon/conference/class_divListConferences.inc index e688523ce..cdcdcbc9d 100755 --- a/plugins/gofon/conference/class_divListConferences.inc +++ b/plugins/gofon/conference/class_divListConferences.inc @@ -128,48 +128,51 @@ class divListConference extends MultiSelectWindow /* Add default header */ $listhead = MultiSelectWindow::get_default_header(); - /* Get copy & paste icon */ - $Copy_Paste =""; - if(preg_match("/(c.*w|w.*c)/",$acls) && $this->parent->CopyPasteHandler){ - $Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon(); - $addsep = true; - } - - - /* Only display snapshot settings if we are able to write && create new entries */ - if(preg_match("/(c.*w|w.*c)/",$acl_all)){ - $listhead .= $this->get_snapshot_header($this->selectedBase); - } - $listhead .= $Copy_Paste; - - /* Only display create new conference if we are allowed to create new confe... */ - if(preg_match("/c/",$acls)){ - $listhead .="  ". - "  ". - "  "; - } - /* Add the rest (base select ....)*/ $listhead .= _("Base")." ". "  "; + /* Create Layers menu */ + $s = ".|"._("Actions")."|\n"; + $s .= "..|". + " "._("Create")."|\n"; + + /* Append create options */ + if(preg_match("/(c.*w|w.*c)/",$acl_all)){ + $s.= "...|". + " "._("Conference")."|conference_new|\n"; + } + /* Multiple options */ - $listhead .= "  "; + $s.= "..|---|\n"; + $s.= "..|". + " "._("Remove")."|"."remove_multiple|\n"; /* Add multiple copy & cut icons */ if(is_object($this->parent->CopyPasteHandler)){ - $listhead .= "  "; - $listhead .= "  "; - $listhead .= ""; + $s.= "..|---|\n"; + $s.= "..|". + " "._("Copy")."|"."multiple_copy_systems|\n"; + $s.= "..|". + " "._("Cut")."|"."multiple_cut_systems|\n"; + + if($this->parent->CopyPasteHandler->entries_queued()){ + $img = ""; + $s.="..|".$img." "._("Paste")."|editPaste|\n"; + }else{ + $img = ""; + $s.="..|".$img." "._("Paste")."\n"; + } } - $listhead .=""; + /* Add snapshot icons */ + if(preg_match("/(c.*w|w.*c)/",$acls)){ + $s .= "..|---|\n"; + $s .= $this->get_snapshot_header(TRUE); + } + $this->SetDropDownHeaderMenu($s); $this->SetListHeader($listhead); } diff --git a/plugins/gofon/conference/class_phoneConferenceManagment.inc b/plugins/gofon/conference/class_phoneConferenceManagment.inc index c10b37a08..2dadfabd2 100644 --- a/plugins/gofon/conference/class_phoneConferenceManagment.inc +++ b/plugins/gofon/conference/class_phoneConferenceManagment.inc @@ -117,6 +117,27 @@ class phoneConferenceManagment extends plugin $s_entry = $_GET['id']; } + /* 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"; + } + + /* Create options */ + if(isset($_POST['menu_action']) && $_POST['menu_action'] == "conference_new"){ + $s_action = "new"; + } + + /* handle remove from layers menu */ + if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){ + $s_action = "del_multiple"; + } + /*************** Cancel dialogs diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc index b66f327fd..de822bb54 100755 --- a/plugins/gofon/macro/class_divListMacros.inc +++ b/plugins/gofon/macro/class_divListMacros.inc @@ -143,7 +143,7 @@ class divListMacro extends MultiSelectWindow /* Multiple options */ $s.= "..|---|\n"; $s.= "..|". - " "._("Remove")."|"."remvove_multiple|\n"; + " "._("Remove")."|"."remove_multiple|\n"; /* Add multiple copy & cut icons */ if(preg_match("/(c.*w|w.*c)/",$acls) && is_object( $this->parent->CopyPasteHandler)){ diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc index a2a7858d3..f25f49521 100755 --- a/plugins/gofon/macro/class_gofonMacroManagement.inc +++ b/plugins/gofon/macro/class_gofonMacroManagement.inc @@ -126,7 +126,7 @@ class goFonMacro extends plugin } /* handle remove from layers menu */ - if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){ + if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){ $s_action = "del_multiple"; }