From d0d981d0cf63075c5f2f9832815acc1620bd8617 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 7 Aug 2007 08:39:12 +0000 Subject: [PATCH] Added grey out to currently queued objects for copy&paste. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6979 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/acl/class_divListACL.inc | 13 ++++++++++++- .../applications/class_divListApplication.inc | 13 ++++++++++++- plugins/admin/fai/class_divListFai.inc | 13 ++++++++++++- plugins/admin/groups/class_divListGroup.inc | 13 ++++++++++++- plugins/admin/mimetypes/class_divListMimeTypes.inc | 14 +++++++++++++- .../admin/mimetypes/class_mimetypeManagement.inc | 6 +++--- plugins/admin/ogroups/class_divListOGroup.inc | 14 +++++++++++++- plugins/admin/systems/class_divListSystem.inc | 10 ++++++++++ plugins/admin/users/class_divListUsers.inc | 10 ++++++++++ .../gofax/blocklists/class_blocklistManagement.inc | 1 + .../gofax/blocklists/class_divListBlocklists.inc | 10 ++++++++++ .../gofon/conference/class_divListConferences.inc | 13 ++++++++++++- plugins/gofon/macro/class_divListMacros.inc | 10 ++++++++++ 13 files changed, 130 insertions(+), 10 deletions(-) diff --git a/plugins/admin/acl/class_divListACL.inc b/plugins/admin/acl/class_divListACL.inc index 8fb3fb810..56d0d2662 100644 --- a/plugins/admin/acl/class_divListACL.inc +++ b/plugins/admin/acl/class_divListACL.inc @@ -244,9 +244,20 @@ class divListACL extends MultiSelectWindow }else{ $field0 = array("string" => "", "attach" => "style='width:20px;'"); } + + /* Cutted objects should be displayed in light grey */ + $display = $cn; + if($this->parent->CopyPasteHandler){ + foreach($this->parent->CopyPasteHandler->queue as $queue_key => $queue_data){ + if($queue_data['dn'] == $acl_entry['dn']) { + $display = "".$display.""; + break; + } + } + } $field1 = array("string" => $list_left_icon, "attach"=> "style='text-align:center;width:20px;'"); - $field2 = array("string" => sprintf($editlink,$key,$cn)." ","attach" => ""); + $field2 = array("string" => sprintf($editlink,$key,$display)." ","attach" => ""); $field3 = array("string" => preg_replace("/%KEY%/",$key,$action), "attach"=> "style='text-align:right;width:".$this->action_col_size."px;border-right:0px;'"); $this->AddElement(array($field0,$field1,$field2,$field3)); } diff --git a/plugins/admin/applications/class_divListApplication.inc b/plugins/admin/applications/class_divListApplication.inc index 6b18fe6ca..ab467d57b 100755 --- a/plugins/admin/applications/class_divListApplication.inc +++ b/plugins/admin/applications/class_divListApplication.inc @@ -269,11 +269,22 @@ class divListApplication extends MultiSelectWindow $desc = " - [ ".$val['description'][0]." ]"; } + /* Cutted objects should be displayed in light grey */ + $display = $val['cn'][0].$desc; + if($this->parent->CopyPasteHandler){ + foreach($this->parent->CopyPasteHandler->queue as $queue_key => $queue_data){ + if($queue_data['dn'] == $val['dn']) { + $display = "".$display.""; + break; + } + } + } + /* Create each field */ $field0 = array("string" => "" , "attach" => "style='width:20px;'"); $field1 = array("string" => sprintf($applimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'"); - $field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)), "attach" => "style='' ".$title); + $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' ".$title); $field3 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"); $this->AddElement(array($field0,$field1,$field2,$field3)); } diff --git a/plugins/admin/fai/class_divListFai.inc b/plugins/admin/fai/class_divListFai.inc index b6fc3e399..0e875b081 100644 --- a/plugins/admin/fai/class_divListFai.inc +++ b/plugins/admin/fai/class_divListFai.inc @@ -315,11 +315,22 @@ class divListFai extends MultiSelectWindow $edi = $editlink; $acti = $action; + /* Cutted objects should be displayed in light grey */ + $display = $value['cn'].$desc; + if($this->parent->CopyPasteHandler){ + foreach($this->parent->CopyPasteHandler->queue as $queue_key => $queue_data){ + if($queue_data['dn'] == $value['dn']) { + $display = "".$display.""; + break; + } + } + } + /* Create each field */ $field0 = array("string" => "" , "attach" => "style='width:20px;'"); $field1 = array("string" => $img , "attach" => "style='text-align:center;width:20px;'"); - $field2 = array("string" => preg_replace(array("/%KEY%/","/%NAME%/","/%TITLE%/"),array($key,$value['cn'].$desc,preg_replace('/ /', ' ', @LDAP::fix($value['dn']))),$edi) , "attach" => "style=''"); + $field2 = array("string" => preg_replace(array("/%KEY%/","/%NAME%/","/%TITLE%/"),array($key,$display,preg_replace('/ /', ' ', @LDAP::fix($value['dn']))),$edi) , "attach" => "style=''"); $field3 = array("string" => $info, "attach" => "style='width:200px;'"); $field4 = array("string" => preg_replace("/%KEY%/",$key,$acti) , "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"); $this->AddElement(array($field0,$field1,$field2,$field3,$field4)); diff --git a/plugins/admin/groups/class_divListGroup.inc b/plugins/admin/groups/class_divListGroup.inc index b135b8bab..3ae13ce89 100644 --- a/plugins/admin/groups/class_divListGroup.inc +++ b/plugins/admin/groups/class_divListGroup.inc @@ -297,8 +297,19 @@ class divListGroup extends MultiSelectWindow $field0 = array("string" => "" , "attach" => "style='width:20px;'"); + /* Cutted objects should be displayed in light grey */ + $display = $val['cn'][0].$desc; + if($this->parent->CopyPasteHandler){ + foreach($this->parent->CopyPasteHandler->queue as $queue_key => $queue_data){ + if($queue_data['dn'] == $val['dn']) { + $display = "".$display.""; + break; + } + } + } + $field1 = array("string" => sprintf($userimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'"); - $field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)), "attach" => "style='' ".$title); + $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' ".$title); $field3 = array("string" => preg_replace("/%KEY%/", $key, $posix." ".$enviro." ".$mail." ".$samba." ".$appl." ".$phone), "attach" => "style='width:136px;'"); $field4 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"); diff --git a/plugins/admin/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc index c392ccff5..684959a74 100755 --- a/plugins/admin/mimetypes/class_divListMimeTypes.inc +++ b/plugins/admin/mimetypes/class_divListMimeTypes.inc @@ -274,11 +274,23 @@ class divListMimeTypes extends MultiSelectWindow $desc = " - [ ".$val['description'][0]." ]"; } + /* Cutted objects should be displayed in light grey */ + $display = $val['cn'][0].$desc; + if($this->parent->CopyPasteHandler){ + foreach($this->parent->CopyPasteHandler->queue as $queue_key => $queue_data){ + if($queue_data['dn'] == $val['dn']) { + $display = "".$display.""; + break; + } + } + } + + /* Create each field */ $field0 = array("string" => "" , "attach" => "style='width:20px;'"); $field1 = array("string" => sprintf($mimeimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'"); - $field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)), "attach" => "style='' ".$title); + $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' ".$title); $field3 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"); $this->AddElement(array($field0,$field1,$field2,$field3)); } diff --git a/plugins/admin/mimetypes/class_mimetypeManagement.inc b/plugins/admin/mimetypes/class_mimetypeManagement.inc index 56a912034..598027771 100755 --- a/plugins/admin/mimetypes/class_mimetypeManagement.inc +++ b/plugins/admin/mimetypes/class_mimetypeManagement.inc @@ -583,9 +583,9 @@ class mimetypeManagement extends plugin } /* Automatically disable status for pasting */ - if(!$this->CopyPasteHandler->entries_queued()){ - $this->start_pasting_copied_objects = FALSE; - } + #if(!$this->CopyPasteHandler->entries_queued()){ + # $this->start_pasting_copied_objects = FALSE; + #} return(""); } diff --git a/plugins/admin/ogroups/class_divListOGroup.inc b/plugins/admin/ogroups/class_divListOGroup.inc index 42ff98650..cc2900d62 100755 --- a/plugins/admin/ogroups/class_divListOGroup.inc +++ b/plugins/admin/ogroups/class_divListOGroup.inc @@ -263,11 +263,23 @@ class divListOGroup extends MultiSelectWindow }else{ $desc = " - [ ".$val['description'][0]." ]"; } + + /* Cutted objects should be displayed in light grey */ + $display = $val['cn'][0].$desc; + if($this->parent->CopyPasteHandler){ + foreach($this->parent->CopyPasteHandler->queue as $queue_key => $queue_data){ + if($queue_data['dn'] == $val['dn']) { + $display = "".$display.""; + break; + } + } + } + /* Create each field */ $field0 = array("string" => "" , "attach" => "style='width:20px;'"); $field1 = array("string" => ""._("Object group")."", "attach" => "style='text-align:center;width: 20px;'"); - $field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)), "attach" => "style='' ".$title); + $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' ".$title); $field3 = array("string" => preg_replace("/%KEY/", $key, $this->parent->convert_list($val))." ".$mail, "attach" => "style='width:136px;'"); $field4 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"); diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index 8db1bfec8..aaa977dd1 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -392,6 +392,16 @@ class divListSystem extends MultiSelectWindow $img = $this->parent->convert_list($val); + /* Cutted objects should be displayed in light grey */ + if($this->parent->CopyPasteHandler){ + foreach($this->parent->CopyPasteHandler->queue as $queue_key => $queue_data){ + if($queue_data['dn'] == $val['dn']) { + $display = "".$display.""; + break; + } + } + } + /* Create each field */ $field0 = array("string" => "" , "attach" => "style='width:20px;'"); diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index 0188b87e7..263fd4438 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -332,6 +332,16 @@ class divListUsers extends MultiSelectWindow /* Connect all images */ $UseImg = $usrimg2." ".$posix." ".$enviro." ".$maila." ".$fonac." ".$faxac." ".$samba." ".$netatalk; + /* Cutted objects should be displayed in light grey */ + if($this->parent->CopyPasteHandler){ + foreach($this->parent->CopyPasteHandler->queue as $queue_key => $queue_data){ + if($queue_data['dn'] == $val['dn']) { + $display = "".$display.""; + break; + } + } + } + /* Create each field */ $field0 = array("string" => "" , "attach" => "style='width:20px;'"); diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc index 277622633..b0146012f 100644 --- a/plugins/gofax/blocklists/class_blocklistManagement.inc +++ b/plugins/gofax/blocklists/class_blocklistManagement.inc @@ -22,6 +22,7 @@ class blocklist extends plugin var $objectclasses = array(); var $DivListBlocklist = NULL; var $view_logged = FALSE; + var $CopyPasteHandler = NULL; function blocklist ($config, $ui) { diff --git a/plugins/gofax/blocklists/class_divListBlocklists.inc b/plugins/gofax/blocklists/class_divListBlocklists.inc index b8d15f48a..8106f3594 100755 --- a/plugins/gofax/blocklists/class_divListBlocklists.inc +++ b/plugins/gofax/blocklists/class_divListBlocklists.inc @@ -205,6 +205,16 @@ class divListBlocklist extends MultiSelectWindow $display= $val["cn"][0]; } + /* Cutted objects should be displayed in light grey */ + if($this->parent->CopyPasteHandler){ + foreach($this->parent->CopyPasteHandler->queue as $queue_key => $queue_data){ + if($queue_data['dn'] == $acl_entry['dn']) { + $display = "".$display.""; + break; + } + } + } + /* Create each field */ $field0 = array("string" => "" , diff --git a/plugins/gofon/conference/class_divListConferences.inc b/plugins/gofon/conference/class_divListConferences.inc index f09412298..e249bed85 100755 --- a/plugins/gofon/conference/class_divListConferences.inc +++ b/plugins/gofon/conference/class_divListConferences.inc @@ -257,11 +257,22 @@ class divListConference extends MultiSelectWindow /* Create title */ $title = " title='".preg_replace("/ /"," ",@LDAP::fix($data['dn']))."' "; + /* Cutted objects should be displayed in light grey */ + $display = $conference['cn'][0].$number; + if($this->parent->CopyPasteHandler){ + foreach($this->parent->CopyPasteHandler->queue as $queue_key => $queue_data){ + if($queue_data['dn'] == $conference['dn']) { + $display = "".$display.""; + break; + } + } + } + /* Create each field */ $field0 = array("string" => "" , "attach" => "style='width:20px;'"); $a_field1 = array("string"=>sprintf($userimg,_("Conference")), "attach" => $title." style='text-align:center;width:20px;'"); - $a_field2 = array("string"=>sprintf($editlink,$conferencekey,$conference['cn'][0].$number), "attach" => $title." style=''"); + $a_field2 = array("string"=>sprintf($editlink,$conferencekey,$display), "attach" => $title." style=''"); $a_field3 = array("string"=> $cn , "attach" => $title." style='width:200px;'"); $a_field4 = array("string"=> $pin, "attach" => $title." style='width:50px;'"); $a_field5 = array("string"=> preg_replace("/%KEY%/",$conferencekey,$actions), diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc index 71cde8614..fa064b65c 100755 --- a/plugins/gofon/macro/class_divListMacros.inc +++ b/plugins/gofon/macro/class_divListMacros.inc @@ -233,6 +233,16 @@ class divListMacro extends MultiSelectWindow $display .= " [".$desc."]"; } + /* Cutted objects should be displayed in light grey */ + if($this->parent->CopyPasteHandler){ + foreach($this->parent->CopyPasteHandler->queue as $queue_key => $queue_data){ + if($queue_data['dn'] == $val['dn']) { + $display = "".$display.""; + break; + } + } + } + /* Create each field */ $field0 = array("string" => "" , "attach" => "style='width:20px;'"); -- 2.30.2