summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 992734d)
raw | patch | inline | side by side (parent: 992734d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Nov 2007 14:26:10 +0000 (14:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Nov 2007 14:26:10 +0000 (14:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7720 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/devices/class_deviceManagement.inc b/plugins/admin/devices/class_deviceManagement.inc
index c63d064a62ca44d586bb8ee916e0517d76ce9ef7..4715ea0f32a146e423645cb80386f87ef5113d3e 100644 (file)
$s_entry = preg_replace("/_.$/","",$s_entry);
+ /* 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'] == "device_new"){
+ $s_action = "new";
+ }
+
+ /* handle remove from layers menu */
+ if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){
+ $s_action = "del_multiple";
+ }
+
/****************
Copy & Paste handling
****************/
return($ret);
}
-
/****************
Create a new device type
****************/
****************/
/* Cancel dialogs */
- if (isset($_POST['edit_cancel'])){
+ if (isset($_POST['edit_cancel']) && is_object($this->devicetabs)){
del_lock ($this->devicetabs->dn);
unset ($this->devicetabs);
$this->devicetabs= NULL;
diff --git a/plugins/admin/devices/class_divListDevices.inc b/plugins/admin/devices/class_divListDevices.inc
index d95c65da61f4b837cf73e132f14c33d90cc25106..e2a8a34a47fc110a8a1e9945e8061a9f9451d9d0 100755 (executable)
/* If this is true we add an additional seperator. Just look a few lines below */
- $add_sep = false;
-
- /* Get copy & paste icon */
- $Copy_Paste ="";
- if(preg_match("/(c.*w|w.*c)/",$acl_all) && $this->parent->CopyPasteHandler){
- $Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon();
- $add_sep = true;
- }
-
- /* Add default header */
$listhead = MultiSelectWindow::get_default_header();
- /* Create snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $listhead .= $this->get_snapshot_header($this->selectedBase);
- $add_sep = true;
- }
-
- /* Add create icon */
- if(preg_match("/c/",$acl)){
- $listhead .= " <input class='center' type='image' align='middle' src='images/list_new_device.png' alt='"._("new").
- "' title='"._("Create new device")."' name='device_new'> ";
- $add_sep = true;
- }
-
- /* Add copy & paste icons */
- $listhead .= $Copy_Paste;
-
- /* Add a seperator ? */
- if($add_sep) {
- $listhead .= " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
- }
-
/* And at least add a department selection box */
$listhead .= _("Base")." <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
" <input class='center' type='image' src='images/list_submit.png' align='middle'
title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'> ";
- /* Multiple options */
- $listhead .= " <input class='center' type='image' align='middle' src='images/edittrash.png'
- title='"._("Remove selected device")."' alt='"._("Remove device")."' name='remove_multiple_devices'> ";
+ /* Create Layers menu */
+ $s = ".|"._("Actions")."|\n";
+ $s .= "..|<img src='images/list_new.png' alt='' border='0' class='center'>".
+ " "._("Create")."|\n";
+
+ /* Append create options */
+ if(preg_match("/c/",$acl)) {
+ $s.= "...|<input class='center' type='image' src='images/list_new_device.png' alt=''>".
+ " "._("Device")."|device_new|\n";
+ }
+
+ /* Multiple options */
+ $s.= "..|---|\n";
+ $s.= "..|<img src='images/edittrash.png' alt='' border='0' class='center'>".
+ " "._("Remove")."|"."remvove_multiple|\n";
/* Add multiple copy & cut icons */
- if(is_object($this->parent->CopyPasteHandler)){
- $listhead .= " <input class='center' type='image' align='middle' src='images/editcopy.png'
- title='"._("Copy selected object")."' alt='"._("Copy object")."' name='multiple_copy_devices'> ";
- $listhead .= " <input class='center' type='image' align='middle' src='images/editcut.png'
- title='"._("cut selected object")."' alt='"._("Cut object")."' name='multiple_cut_devices'> ";
+ if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){
+ $s.= "..|---|\n";
+ $s.= "..|<img src='images/editcopy.png' alt='' border='0' class='center'>".
+ " "._("Copy")."|"."multiple_copy_systems|\n";
+ $s.= "..|<img src='images/editcut.png' alt='' border='0' class='center'>".
+ " "._("Cut")."|"."multiple_cut_systems|\n";
+
+ if($this->parent->CopyPasteHandler->entries_queued()){
+ $img = "<img border='0' class='center' src='images/editpaste.png' alt=''>";
+ $s.="..|".$img." "._("Paste")."|editPaste|\n";
+ }else{
+ $img = "<img border='0' class='center' src='images/cant_editpaste.png' alt=''>";
+ $s.="..|".$img." "._("Paste")."\n";
+ }
}
- $listhead .="</div>";;
+ /* 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/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc
index 6a6d7447ef73d99aa24a3ff072cfad5c2a00b9a2..a34c10f786007f5de0528bd5af0c444daa621389 100755 (executable)
/* Add default header */
$listhead = MultiSelectWindow::get_default_header();
- /* Create snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $listhead .= $this->get_snapshot_header($this->selectedBase);
- $add_sep = true;
- }
-
- /* Add create icon */
- if(preg_match("/c/",$acl)){
- $listhead .= " <input class='center' type='image' align='middle' src='images/list_new_mime.png' alt='"._("new").
- "' title='"._("Create new mime type")."' name='mime_new'> ";
- $add_sep = true;
- }
-
- /* Add copy & paste icons */
- $listhead .= $Copy_Paste;
-
- /* Add a seperator ? */
- if($add_sep) {
- $listhead .= " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
- }
-
/* And at least add a department selection box */
$listhead .= _("Base")." <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
" <input class='center' type='image' src='images/list_submit.png' align='middle'
title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'> ";
- /* Multiple options */
- $listhead .= " <input class='center' type='image' align='middle' src='images/edittrash.png'
- title='"._("Remove selected mimetype")."' alt='"._("Remove mimetype")."' name='remove_multiple_mimetypes'> ";
+ /* Create Layers menu */
+ $s = ".|"._("Actions")."|\n";
+ $s .= "..|<img src='images/list_new.png' alt='' border='0' class='center'>".
+ " "._("Create")."|\n";
+
+ /* Append create options */
+ if(preg_match("/c/",$acl)) {
+ $s.= "...|<input class='center' type='image' src='images/list_new_mime.png' alt=''>".
+ " "._("Mime type")."|mime_new|\n";
+ }
+
+ /* Multiple options */
+ $s.= "..|---|\n";
+ $s.= "..|<img src='images/edittrash.png' alt='' border='0' class='center'>".
+ " "._("Remove")."|"."remvove_multiple|\n";
/* Add multiple copy & cut icons */
- if(is_object($this->parent->CopyPasteHandler)){
- $listhead .= " <input class='center' type='image' align='middle' src='images/editcopy.png'
- title='"._("Copy selected object")."' alt='"._("Copy object")."' name='multiple_copy_mimetypes'> ";
- $listhead .= " <input class='center' type='image' align='middle' src='images/editcut.png'
- title='"._("cut selected object")."' alt='"._("Cut object")."' name='multiple_cut_mimetypes'> ";
+ if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){
+ $s.= "..|---|\n";
+ $s.= "..|<img src='images/editcopy.png' alt='' border='0' class='center'>".
+ " "._("Copy")."|"."multiple_copy_systems|\n";
+ $s.= "..|<img src='images/editcut.png' alt='' border='0' class='center'>".
+ " "._("Cut")."|"."multiple_cut_systems|\n";
+
+ if($this->parent->CopyPasteHandler->entries_queued()){
+ $img = "<img border='0' class='center' src='images/editpaste.png' alt=''>";
+ $s.="..|".$img." "._("Paste")."|editPaste|\n";
+ }else{
+ $img = "<img border='0' class='center' src='images/cant_editpaste.png' alt=''>";
+ $s.="..|".$img." "._("Paste")."\n";
+ }
}
- $listhead .="</div>";;
+ /* 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/mimetypes/class_mimetypeManagement.inc b/plugins/admin/mimetypes/class_mimetypeManagement.inc
index f192eb21d96c892b1c514070bf68c81aa43f077e..caee8ddf1c56ba28ec01843659335b09f18ae7cf 100755 (executable)
$s_entry = preg_replace("/_.$/","",$s_entry);
+
+ /* 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'] == "mime_new"){
+ $s_action = "new";
+ }
+
+ /* handle remove from layers menu */
+ if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){
+ $s_action = "del_multiple";
+ }
+
/****************
Copy & Paste handling
****************/