From 868f556da0e7c0003fb3ae735559e6500e5bc3ed Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 7 Aug 2007 06:57:01 +0000 Subject: [PATCH] Cutted objects will be displayed in light grey in the management lists now. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6975 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/applications/class_divListApplication.inc | 9 ++++++++- plugins/admin/fai/class_divListFai.inc | 10 +++++++--- plugins/admin/groups/class_divListGroup.inc | 8 +++++++- plugins/admin/mimetypes/class_divListMimeTypes.inc | 8 +++++++- plugins/admin/mimetypes/class_mimetypeManagement.inc | 6 +++--- plugins/admin/ogroups/class_divListOGroup.inc | 9 ++++++++- plugins/admin/systems/class_divListSystem.inc | 5 +++++ plugins/admin/users/class_divListUsers.inc | 5 +++++ 8 files changed, 50 insertions(+), 10 deletions(-) diff --git a/plugins/admin/applications/class_divListApplication.inc b/plugins/admin/applications/class_divListApplication.inc index 182044c7e..76961f236 100755 --- a/plugins/admin/applications/class_divListApplication.inc +++ b/plugins/admin/applications/class_divListApplication.inc @@ -172,8 +172,15 @@ class divListApplication extends MultiSelectWindow }else{ $desc = " - [ ".$val['description'][0]." ]"; } + + /* Cutted objects should be displayed in light grey */ + $display = $val['cn']['0'].$desc; + if($this->parent->CopyPasteHandler->cutCurrent && $val['dn'] == $this->parent->CopyPasteHandler->objectdn){ + $display = "".$display.""; + } + $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:80px;border-right:0px;text-align:right;'"); $this->AddElement(array($field1,$field2,$field3)); } diff --git a/plugins/admin/fai/class_divListFai.inc b/plugins/admin/fai/class_divListFai.inc index c474b15e0..fb87be853 100644 --- a/plugins/admin/fai/class_divListFai.inc +++ b/plugins/admin/fai/class_divListFai.inc @@ -233,14 +233,18 @@ class divListFai extends MultiSelectWindow $edi = $editlink; } - + /* Cutted objects should be displayed in light grey */ + $display = $value['cn'].$desc; + if($this->parent->CopyPasteHandler->cutCurrent && $value['dn'] == $this->parent->CopyPasteHandler->objectdn){ + $display = "".$display.""; + } $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:80px;border-right:0px;text-align:right;'"); $this->AddElement(array($field1,$field2,$field3,$field4)); - } + } } function Save() diff --git a/plugins/admin/groups/class_divListGroup.inc b/plugins/admin/groups/class_divListGroup.inc index 2114313da..4bc375b43 100644 --- a/plugins/admin/groups/class_divListGroup.inc +++ b/plugins/admin/groups/class_divListGroup.inc @@ -188,8 +188,14 @@ class divListGroup extends MultiSelectWindow $desc .= " (".$val['FAIrelease'][0].")"; } + /* Cutted objects should be displayed in light grey */ + $display = $val['cn']['0'].$desc; + if($this->parent->CopyPasteHandler->cutCurrent && $val['dn'] == $this->parent->CopyPasteHandler->objectdn){ + $display = "".$display.""; + } + $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:80px;border-right:0px;text-align:right;'"); diff --git a/plugins/admin/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc index 92427c02f..61f7e0d8f 100755 --- a/plugins/admin/mimetypes/class_divListMimeTypes.inc +++ b/plugins/admin/mimetypes/class_divListMimeTypes.inc @@ -157,8 +157,14 @@ 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->cutCurrent && $val['dn'] == $this->parent->CopyPasteHandler->objectdn){ + $display = "".$display.""; + } + $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($field1,$field2,$field3)); } diff --git a/plugins/admin/mimetypes/class_mimetypeManagement.inc b/plugins/admin/mimetypes/class_mimetypeManagement.inc index f9a58748f..f4553fe70 100755 --- a/plugins/admin/mimetypes/class_mimetypeManagement.inc +++ b/plugins/admin/mimetypes/class_mimetypeManagement.inc @@ -534,9 +534,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 7dccc31ac..da2021de3 100755 --- a/plugins/admin/ogroups/class_divListOGroup.inc +++ b/plugins/admin/ogroups/class_divListOGroup.inc @@ -157,8 +157,15 @@ 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->cutCurrent && $val['dn'] == $this->parent->CopyPasteHandler->objectdn){ + $display = "".$display.""; + } + $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:107px;border-right:0px;text-align:right;'"); diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index c98116dd1..7e46fa959 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -189,6 +189,11 @@ class divListSystem extends MultiSelectWindow $display.= " (".$val['message'].")"; } + /* Cutted objects should be displayed in light grey */ + if(isset($this->parent->CopyPasteHandler) && $this->parent->CopyPasteHandler->cutCurrent && $val['dn'] == $this->parent->CopyPasteHandler->objectdn){ + $display = "".$display.""; + } + $img = $this->parent->convert_list($val); $field1 = array("string" => sprintf($img['img'],$val['dn']), "attach" => "style='text-align:center;width:20px;'"); $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"); diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index 7e749f15f..ae49cc080 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -239,6 +239,11 @@ 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->cutCurrent && $val['dn'] == $this->parent->CopyPasteHandler->objectdn){ + $display = "".$display.""; + } + /* Create each field */ $field1 = array("string" => sprintf($tpl,$val['dn']), "attach" => "style='text-align:center;width:20px;'"); $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"); -- 2.30.2