Code

Added grey out to currently queued objects for copy&paste.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 7 Aug 2007 08:39:12 +0000 (08:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 7 Aug 2007 08:39:12 +0000 (08:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6979 594d385d-05f5-0310-b6e9-bd551577e9d8

13 files changed:
plugins/admin/acl/class_divListACL.inc
plugins/admin/applications/class_divListApplication.inc
plugins/admin/fai/class_divListFai.inc
plugins/admin/groups/class_divListGroup.inc
plugins/admin/mimetypes/class_divListMimeTypes.inc
plugins/admin/mimetypes/class_mimetypeManagement.inc
plugins/admin/ogroups/class_divListOGroup.inc
plugins/admin/systems/class_divListSystem.inc
plugins/admin/users/class_divListUsers.inc
plugins/gofax/blocklists/class_blocklistManagement.inc
plugins/gofax/blocklists/class_divListBlocklists.inc
plugins/gofon/conference/class_divListConferences.inc
plugins/gofon/macro/class_divListMacros.inc

index 8fb3fb81019ead88950733ed988dcfba0f776084..56d0d2662eff47e870427f0c8e2673327139c4ec 100644 (file)
@@ -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 = "<font color='#999999'>".$display."</font>";
+            break;
+          }
+        }
+      }
   
       $field1 = array("string" => $list_left_icon, "attach"=> "style='text-align:center;width:20px;'");
-      $field2 = array("string" => sprintf($editlink,$key,$cn)."&nbsp;","attach" => "");
+      $field2 = array("string" => sprintf($editlink,$key,$display)."&nbsp;","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));
     }
index 6b18fe6ca64c831b6cf84350ad883703e19719a3..ab467d57bc6c2f6385861bd58850c9eac8ccfc13 100755 (executable)
@@ -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 = "<font color='#999999'>".$display."</font>";
+            break;
+          }
+        }
+      }
+
       /* Create each field */
       $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
                       "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));
     }
index b6fc3e3998109230811f1d9c1d9bab9b5311603f..0e875b081a5ab46ff63a9f0bed0e5583bd3594ba 100644 (file)
@@ -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 = "<font color='#999999'>".$display."</font>";
+             break;
+           }
+         }
+       }
+
        /* Create each field */
        $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
            "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('/ /', '&nbsp;', @LDAP::fix($value['dn']))),$edi) , "attach" => "style=''");
+       $field2 = array("string" => preg_replace(array("/%KEY%/","/%NAME%/","/%TITLE%/"),array($key,$display,preg_replace('/ /', '&nbsp;', @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));
index b135b8bab2d186fd758712869ea896681e84a26a..3ae13ce89829180647a3a07f767b302f3ede8243 100644 (file)
@@ -297,8 +297,19 @@ class divListGroup extends MultiSelectWindow
       $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
           "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 = "<font color='#999999'>".$display."</font>";
+            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."&nbsp;".$enviro."&nbsp;".$mail."&nbsp;".$samba."&nbsp;".$appl."&nbsp;".$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;'");
 
index c392ccff53b43c797894782bd99c595e34438330..684959a74a171fac1af64044246f833d8d5ae788 100755 (executable)
@@ -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 = "<font color='#999999'>".$display."</font>";
+            break;
+          }
+        }
+      }
+
+
       /* Create each field */
       $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
                       "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));
     }
index 56a912034851b060cbd9908cf1672b5279044d08..598027771eacd501d0bf3f50db3682a36a20d28e 100755 (executable)
@@ -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("");
   }
 
index 42ff98650c74df759af38594cfc24cd5cde632ce..cc2900d62fe6a4922c7961f4c95ca19c4a614b02 100755 (executable)
@@ -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 = "<font color='#999999'>".$display."</font>";
+            break;
+          }
+        }
+      }
+
       /* Create each field */
       $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
                       "attach" => "style='width:20px;'");
       $field1 = array("string" => "<img src='images/list_ogroup.png' alt='"._("Object group")."' ".$title.">", "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))."&nbsp;".$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;'");
 
index 8db1bfec837189c2a7659d32c4432b7153906936..aaa977dd14ec39767261998ed5f4a9e2c137a983 100644 (file)
@@ -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 = "<font color='#999999'>".$display."</font>";
+            break;
+          }
+        }
+      }
+
       /* Create each field */
       $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
                       "attach" => "style='width:20px;'");
index 0188b87e761a2ddff9503bf60675817a3404380f..263fd4438a34f4f3a817a113d1ee73c3c0d6cce7 100644 (file)
@@ -332,6 +332,16 @@ class divListUsers extends MultiSelectWindow
       /* Connect all images */
       $UseImg = $usrimg2."&nbsp;".$posix."&nbsp;".$enviro."&nbsp;".$maila."&nbsp;".$fonac."&nbsp;".$faxac."&nbsp;".$samba."&nbsp;".$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 = "<font color='#999999'>".$display."</font>";
+            break;
+          }
+        }
+      }
+
       /* Create each field */
       $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
                       "attach" => "style='width:20px;'");
index 2776226330d9193bbddfbb168b9a7f275d60f881..b0146012fe49f11719c3f5aea44272b7e1bb62fd 100644 (file)
@@ -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)
   {
index b8d15f48a55042cd6eed653c8e62458779e6528c..8106f3594d5dae0a924a9dbf581d7eb5811bcdd5 100755 (executable)
@@ -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 = "<font color='#999999'>".$display."</font>";
+            break;
+          }
+        }
+      }
+
       
       /* Create each field */
       $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
index f094122983de744ac4dc9b0f443851274746f746..e249bed8587059fda40567affe34e905e7150702 100755 (executable)
@@ -257,11 +257,22 @@ class divListConference extends MultiSelectWindow
       /* Create title */
       $title = " title='".preg_replace("/ /","&nbsp;",@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 = "<font color='#999999'>".$display."</font>";
+            break;
+          }
+        }
+      }
+
       /* Create each field */
       $field0 = array("string" => "<input type='checkbox' id='item_selected_".$conferencekey."' name='item_selected_".$conferencekey."'>" ,
           "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), 
index 71cde86143a0308e6f883cf461feea139e39cd2e..fa064b65c3878445fa85bcacf4cfb76c49856b4f 100755 (executable)
@@ -233,6 +233,16 @@ class divListMacro extends MultiSelectWindow
         $display .= "&nbsp;[".$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 = "<font color='#999999'>".$display."</font>";
+            break;
+          }
+        }
+      }
+
       /* Create each field */
       $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
                       "attach" => "style='width:20px;'");