* Added "config.doctype = none" support - omits any doctype in the frontend.
[Packages/TYPO3.CMS.git] / typo3 / class.file_list.inc
index 7ee5357..a2e2dd9 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
+*  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
  *
  *
  *
- *   73: class fileList extends t3lib_recordList 
- *  110:     function start($path,$pointer,$sort,$sortRev,$clipBoard=0)        
- *  131:     function generateList()   
- *  144:     function writeTop($path)  
- *  199:     function linkClipboardHeaderIcon($string,$table,$cmd,$warning='') 
- *  213:     function getTable($files,$dirs,$rowlist)  
- *  305:     function formatDirList($items)    
+ *   74: class fileList extends t3lib_recordList 
+ *  111:     function start($path,$pointer,$sort,$sortRev,$clipBoard=0)        
+ *  132:     function generateList()   
+ *  145:     function writeTop($path)  
+ *  204:     function linkClipboardHeaderIcon($string,$table,$cmd,$warning='') 
+ *  218:     function getTable($files,$dirs,$rowlist)  
+ *  306:     function formatDirList($items)    
  *  369:     function linkWrapDir($code,$path) 
- *  379:     function listURL()        
- *  389:     function dirData($theFile)        
- *  414:     function formatFileList($items)   
- *  486:     function isImage($ext)    
- *  498:     function linkWrapSort($code,$path,$col)   
- *  516:     function readDirectory($path,$type,$extList='')   
- *  570:     function makeClip($theData)       
+ *  381:     function linkWrapFile($code,$path)        
+ *  395:     function listURL()        
+ *  405:     function dirData($theFile)        
+ *  430:     function formatFileList($items)   
+ *  504:     function isImage($ext)    
+ *  516:     function linkWrapSort($code,$path,$col)   
+ *  534:     function readDirectory($path,$type,$extList='')   
+ *  588:     function makeClip($theData)       
  *
- * TOTAL FUNCTIONS: 14
+ * TOTAL FUNCTIONS: 15
  * (This index is automatically created/updated by the extension "extdeveval")
  *
  */
@@ -65,7 +66,7 @@
 
 /**
  * Class for rendering of File>Filelist
- * 
+ *
  * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @package TYPO3
  * @subpackage core
@@ -98,14 +99,14 @@ class fileList extends t3lib_recordList {
 
 
        /**
-        * Initialization
-        * 
+        * Initialization of class
+        *
         * @param       string          The path to list
         * @param       integer         Pointer
         * @param       boolean         Sorting column
         * @param       boolean         Sorting direction
         * @param       boolean         Show clipboard flag
-        * @return      void            
+        * @return      void
         */
        function start($path,$pointer,$sort,$sortRev,$clipBoard=0)      {
                $this->counter=0;
@@ -125,11 +126,11 @@ class fileList extends t3lib_recordList {
 
        /**
         * Reading files and directories, counting elements and generating the list in ->HTMLcode
-        * 
-        * @return      void            
+        *
+        * @return      void
         */
        function generateList() {
-               $this->dirs = $this->readDirectory($this->path,'dir');
+               $this->dirs = $this->readDirectory($this->path,'dir,link');
                $this->files = $this->readDirectory($this->path,'file');
                $this->totalItems=count($this->dirs['sorting'])+count($this->files['sorting']);
                $this->HTMLcode.=$this->getTable($this->files, $this->dirs, 'fileext,tstamp,size,rw');
@@ -137,9 +138,9 @@ class fileList extends t3lib_recordList {
 
        /**
         * Make the top of the list
-        * 
+        *
         * @param       string          The path to list.
-        * @return      void            
+        * @return      void
         */
        function writeTop($path)        {
                        // Makes the code for the foldericon in the top
@@ -156,40 +157,44 @@ class fileList extends t3lib_recordList {
                        list($title,$icon,$path) =  $this->dirData($theFile);
        
                                // Start compiling the HTML
-                       $out='<table border="0" cellpadding="0" cellspacing="0">';
-       
                        $theData = Array();
                        $theData[$titleCol] = $this->widthGif;
        
                        $title = $GLOBALS['SOBE']->basicFF->blindPath($path);
                        $theData['up']='<a href="'.htmlspecialchars($this->listURL()).'">'.
-                                       '<img src="'.$this->backPath.'gfx/refresh_n.gif" width="14" hspace="2" height="14" vspace="1" border="0" title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload',1).'" align="top" alt="" />'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/refresh_n.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload',1).'" alt="" />'.
                                        '</a>';
                                
                        if ($root)      {
                                        // The icon with link   
-                               $theIcon = '<img src="'.$this->backPath.$icon.'" width="18" height="16" border="0" title="'.htmlspecialchars($theFile['file']).'" align="top" alt="" />';
+                               $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />';
                                if ($this->clickMenus) $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon,$path);
 
-                               $theData[$titleCol].='<br />'.htmlspecialchars(t3lib_div::fixed_lgd_pre($title,$this->fixedL+20));
-                               $theData['up'].=$this->linkWrapDir('<img src="'.$this->backPath.'gfx/i/folder_up.gif" width="18" height="16" border="0" title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" align="top" alt="" />',$theFile['path']);
+                               $theData[$titleCol].='<br />'.t3lib_div::fixed_lgd_pre($title,$this->fixedL+20);        // No HTML specialchars here - HTML like <b> </b> is allowed
+                               $theData['up'].=$this->linkWrapDir('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/folder_up.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" />',$theFile['path']);
                        } else {        
                                        // root:0
-                               $theIcon='<img src="'.$this->backPath.'gfx/i/_icon_ftp.gif" width="18" height="16" border="0" align="top" alt="" />';
+                               $theIcon='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_ftp.gif','width="18" height="16"').' alt="" />';
                                $theData[$titleCol].='<br />'.htmlspecialchars(t3lib_div::fixed_lgd_pre($title,$this->fixedL+20));
                        }
        
                                // Adding top element
                        $out.=$this->addelement(1,'',$theData,'',$this->leftMargin,$theIcon);
        
-                       $out.='</table>';
-                       $this->HTMLcode.=$out;
+                       $this->HTMLcode.='
+
+               <!--
+                       Page header for file list
+               -->
+                               <table border="0" cellpadding="0" cellspacing="0" id="typo3-filelist-top">
+                                       '.$out.'
+                               </table>';
                }
        }
 
        /**
         * Wrapping input string in a link with clipboard command.
-        * 
+        *
         * @param       string          String to be linked - must be htmlspecialchar'ed / prepared before.
         * @param       string          table - NOT USED
         * @param       string          "cmd" value
@@ -204,9 +209,9 @@ class fileList extends t3lib_recordList {
 
        /**
         * Returns a table with directories and files listed.
-        * 
-        * @param       array           Files
-        * @param       array           Directories
+        *
+        * @param       array           Array of files from path
+        * @param       array           Array of directories from path
         * @param       string          List of rows to display horizontallyh
         * @return      string          HTML-table
         */
@@ -222,10 +227,6 @@ class fileList extends t3lib_recordList {
                if ($this->clipBoard)   $rowlist.=',_CLIPBOARD_';
                $this->fieldArray = explode(',',$rowlist);
                
-                       // Start table:
-               $out.='
-               <table border="0" cellpadding="0" cellspacing="0">';
-
                        // half line is drawn
                $theData = Array();
                $theData[$titleCol] = $this->widthGif;
@@ -259,30 +260,24 @@ class fileList extends t3lib_recordList {
                                $elFromTable = $this->clipObj->elFromTable($table);
                                if (count($elFromTable))        {
                                        $cells[]='<a href="'.htmlspecialchars($this->clipObj->pasteUrl('_FILE',$this->path)).'" onclick="return '.htmlspecialchars($this->clipObj->confirmMsg('_FILE',$this->path,'into',$elFromTable)).'">'.
-                                               '<img src="gfx/clip_pasteafter.gif" width="12" height="12" border="0"'.t3lib_BEfunc::titleAttrib($GLOBALS['LANG']->getLL('clip_paste'),1).' alt="" /></a>'.
-                                               '<img src="clear.gif" width="2" height="1" alt="" />';
+                                               '<img'.t3lib_iconWorks::skinImg('','gfx/clip_pasteafter.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_paste',1).'" alt="" /></a>';
                                }
                                if ($this->clipObj->current!='normal' && $iOut) {
-                                       $cells[]=$this->linkClipboardHeaderIcon('<img src="gfx/clip_copy.gif" width="12" height="12" border="0"'.t3lib_BEfunc::titleAttrib($GLOBALS['LANG']->getLL('clip_selectMarked'),1).' alt="" />',$table,'setCB');
-                                       $cells[]=$this->linkClipboardHeaderIcon('<img src="gfx/garbage.gif" width="11" height="12" border="0"'.t3lib_BEfunc::titleAttrib($GLOBALS['LANG']->getLL('clip_deleteMarked'),1).' alt="" />',$table,'delete',$GLOBALS['LANG']->getLL('clip_deleteMarkedWarning'));
-                                       $cells[]='<img src="clear.gif" width="6" height="1" alt="" />';
+                                       $cells[]=$this->linkClipboardHeaderIcon('<img'.t3lib_iconWorks::skinImg('','gfx/clip_copy.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_selectMarked',1).'" alt="" />',$table,'setCB');
+                                       $cells[]=$this->linkClipboardHeaderIcon('<img'.t3lib_iconWorks::skinImg('','gfx/garbage.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_deleteMarked',1).'" alt="" />',$table,'delete',$GLOBALS['LANG']->getLL('clip_deleteMarkedWarning'));
                                        $onClick = 'checkOffCB(\''.implode(',',$this->CBnames).'\'); return false;';
                                        $cells[]='<a href="#" onclick="'.htmlspecialchars($onClick).'">'.
-                                                       '<img src="gfx/clip_select.gif" width="12" height="12" border="0"'.t3lib_BEfunc::titleAttrib($GLOBALS['LANG']->getLL('clip_markRecords'),1).' alt="" />'.
+                                                       '<img'.t3lib_iconWorks::skinImg('','gfx/clip_select.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_markRecords',1).'" alt="" />'.
                                                        '</a>';
                                }
 
-                               $theData[$v] = implode('',$cells).'&nbsp;';
+                               $theData[$v] = implode('',$cells);
                        } else {        // Normal row:
                                $theT = $this->linkWrapSort($GLOBALS['LANG']->getLL('c_'.$v,1), $this->path,$v);
-                               if ($v==$titleCol)      {
-                                       $theData[$v] = '&nbsp;<b>'.$theT.'</b>&nbsp;<br /><img src="clear.gif" width="180" height="1" alt="" />';
-                               } else {
-                                       $theData[$v] = '&nbsp;<b>'.$theT.'</b>&nbsp;';
-                               }
+                               $theData[$v] = $theT;
                        }
                }
-               $out.=$this->addelement(1,'',$theData,' bgcolor="'.$this->headLineCol.'"','');
+               $out.=$this->addelement(1,'',$theData,' class="c-headLine"','');
                $out.=$iOut;
                
                        // half line is drawn
@@ -291,15 +286,21 @@ class fileList extends t3lib_recordList {
                $out.=$this->addelement(1,'',$theData);
                
                        // finish
-               $out.='
-               </table>';      
-               return $out;
+               return '
+
+
+               <!--
+                       File list table:
+               -->
+                       <table border="0" cellpadding="0" cellspacing="0" id="typo3-filelist">
+                               '.$out.'
+                       </table>';
        }
 
        /**
         * This returns tablerows for the directories in the array $items['sorting'].
-        * 
-        * @param       array           Items
+        *
+        * @param       array           Directory items
         * @return      string          HTML table rows.
         */
        function formatDirList($items)  {
@@ -319,7 +320,7 @@ class fileList extends t3lib_recordList {
                                        list($title,$icon,$path) =  $this->dirData($theFile);
        
                                                // The icon with link   
-                                       $theIcon = '<img src="'.$this->backPath.$icon.'" width="18" height="16" border="0" title="'.htmlspecialchars($theFile['file']).'">';
+                                       $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />';
                                        if ($this->clickMenus) $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon,$path);
        
                                                //      Preparing and getting the data-array
@@ -340,7 +341,7 @@ class fileList extends t3lib_recordList {
                                                                $theData[$field]=Date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $theFile['tstamp']);
                                                        break;
                                                        case 'file':
-                                                               $theData[$field]= $this->linkWrapDir(htmlspecialchars(t3lib_div::fixed_lgd($title,$this->fixedL)),$path);
+                                                               $theData[$field]= $this->linkWrapDir(t3lib_div::fixed_lgd($title,$this->fixedL),$path);
                                                        break;
                                                        case '_CLIPBOARD_':
                                                                $theData[$field]=$this->makeClip($theFile);
@@ -349,7 +350,6 @@ class fileList extends t3lib_recordList {
                                                                $theData[$field]=t3lib_div::fixed_lgd($theFile[$field],$this->fixedL);
                                                        break;
                                                }
-                                               if ($field!='_CLIPBOARD_')      $theData[$field]='&nbsp;'.$theData[$field].'&nbsp;';
                                        }
                                        $out.=$this->addelement(1,$theIcon,$theData);
                                }
@@ -361,7 +361,7 @@ class fileList extends t3lib_recordList {
 
        /**
         * Wraps the directory-titles
-        * 
+        *
         * @param       string          String to be wrapped in links
         * @param       string          ID (path)
         * @return      string          HTML
@@ -372,8 +372,24 @@ class fileList extends t3lib_recordList {
        }
 
        /**
-        * Returns list URL
-        * 
+        * Wraps filenames in links which opens them in a window IF they are in web-path.
+        *
+        * @param       string          String to be wrapped in links
+        * @param       string          ID (path)
+        * @return      string          HTML
+        */
+       function linkWrapFile($code,$path)      {
+               if (t3lib_div::isFirstPartOfStr($path,t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT')))    {
+                       $href = substr($path,strlen(t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT')));
+                       $aOnClick = "return top.openUrlInWindow('".$href."','WebFile');";
+                       $code = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$code.'</a>';
+               } 
+               return $code;
+       }
+
+       /**
+        * Returns list URL; This is the URL of the current script with id and imagemode parameters, thats all.
+        *
         * @return      string          URL
         */
        function listURL()      {
@@ -382,7 +398,7 @@ class fileList extends t3lib_recordList {
 
        /**
         * Returns some data specific for the directories...
-        * 
+        *
         * @param       array           File information array
         * @return      array           (title, icon, path)
         */
@@ -407,8 +423,8 @@ class fileList extends t3lib_recordList {
 
        /**
         * This returns tablerows for the files in the array $items['sorting'].
-        * 
-        * @param       array           Items
+        *
+        * @param       array           File items
         * @return      string          HTML table rows.
         */
        function formatFileList($items) {
@@ -430,7 +446,7 @@ class fileList extends t3lib_recordList {
                                        $icon = t3lib_BEfunc::getFileIcon($ext);
 
                                                // The icon with link   
-                                       $theIcon = '<img src="'.$this->backPath.'gfx/fileicons/'.$icon.'" width="18" height="16" border="0" title="'.htmlspecialchars($theFile['file']).'" alt="" />';
+                                       $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/fileicons/'.$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />';
                                        if ($this->clickMenus) $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon,$theFile['path'].$theFile['file']);
        
                                                //      Preparing and getting the data-array
@@ -453,11 +469,13 @@ class fileList extends t3lib_recordList {
                                                        case '_CLIPBOARD_':
                                                                $theData[$field]=$this->makeClip($theFile);
                                                        break;
+                                                       case 'file':
+                                                               $theData[$field] = $this->linkWrapFile(t3lib_div::fixed_lgd($theFile[$field],$this->fixedL),$theFile['path'].$theFile['file']);
+                                                       break;                                                  
                                                        default:
                                                                $theData[$field]=t3lib_div::fixed_lgd($theFile[$field],$this->fixedL);
                                                        break;
                                                }
-                                               if ($field!='_CLIPBOARD_')      $theData[$field]='&nbsp;'.$theData[$field].'&nbsp;';
                                        }
                                        $out.=$this->addelement(1,$theIcon,$theData);
                                        
@@ -467,7 +485,7 @@ class fileList extends t3lib_recordList {
                                                $theFile_R = rawurlencode($theFile['path'].$theFile['file']);
                                                $titleCol=$this->fieldArray[0];
                                                $href = $this->backPath.$this->thumbScript.'?&dummy='.$GLOBALS['EXEC_TIME'].'&file='.$theFile_R;
-                                               $thumbData[$titleCol]='<img src="'.htmlspecialchars($href).'" hspace="2" border="0" title="'.htmlspecialchars(trim($theFile['file'])).'">';
+                                               $thumbData[$titleCol]='<img src="'.htmlspecialchars($href).'" hspace="2" title="'.htmlspecialchars(trim($theFile['file'])).'" alt="" />';
                                                $out.=$this->addelement(4,'',$thumbData);
                                        }
                                }
@@ -479,9 +497,9 @@ class fileList extends t3lib_recordList {
 
        /**
         * Returns true if $ext is an image-extension according to $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
-        * 
+        *
         * @param       string          file extension
-        * @return      boolean         
+        * @return      boolean
         */
        function isImage($ext)  {
                return t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],strtolower($ext));
@@ -489,7 +507,7 @@ class fileList extends t3lib_recordList {
 
        /**
         * Wraps the directory-titles ($code) in a link to file_list.php (id=$path) and sorting commands...
-        * 
+        *
         * @param       string          String to be wrapped
         * @param       string          ID (path)
         * @param       string          Sorting column
@@ -506,9 +524,9 @@ class fileList extends t3lib_recordList {
        }
 
        /**
-        * Returns an array with file/dir items + a array with the sorted items
-        * 
-        * @param       string          Path
+        * Returns an array with file/dir items + an array with the sorted items
+        *
+        * @param       string          Path (absolute) to read
         * @param       string          $type is the technical type; file,dir,link. empty is all kinds of stuff.
         * @param       string          $extList: List of fileextensions to select. If empty, all are selected.
         * @return      array           Array('files'=>array(), 'sorting'=>array());
@@ -523,8 +541,8 @@ class fileList extends t3lib_recordList {
                        if (is_object($d))      {
                                while($entry=$d->read()) {
                                        if ($entry!='.' && $entry!='..')        {
-                                               $wholePath = $path.'/'.$entry;          // Because of odd PHP-error where  <BR>-tag is sometimes placed after a filename!!
-                                               if (@file_exists($wholePath) && (!$type || filetype($wholePath)==$type))        {
+                                               $wholePath = $path.'/'.$entry;          // Because of odd PHP-error where  <br />-tag is sometimes placed after a filename!!
+                                               if (@file_exists($wholePath) && (!$type || t3lib_div::inList($type,filetype($wholePath))))      {
                                                        if ($extList)   {
                                                                $fI = t3lib_div::split_fileref($entry);
                                                                if (t3lib_div::inList($extList,$fI['fileext'])) {
@@ -563,8 +581,8 @@ class fileList extends t3lib_recordList {
 
        /**
         * Creates the clipboard control pad
-        * 
-        * @param       array           
+        *
+        * @param       array           Array with information about the file/directory for which to make the clipboard panel for the listing.
         * @return      string          HTML-table
         */
        function makeClip($theData)     {
@@ -576,42 +594,34 @@ class fileList extends t3lib_recordList {
                if ($this->clipObj->current=='normal')  {
                        $isSel = $this->clipObj->isSelected('_FILE',$md5);
                        $cells[]='<a href="'.htmlspecialchars($this->clipObj->selUrlFile($fullIdent,1,($isSel=='copy'))).'">'.
-                                               '<img src="gfx/clip_copy'.($isSel=='copy'?'_h':'').'.gif" width="12" height="12" border="0"'.t3lib_BEfunc::titleAttrib($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.copy'),1).' alt="" />'.
+                                               '<img'.t3lib_iconWorks::skinImg('','gfx/clip_copy'.($isSel=='copy'?'_h':'').'.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.copy',1).'" alt="" />'.
                                                '</a>';
                        $cells[]='<a href="'.htmlspecialchars($this->clipObj->selUrlFile($fullIdent,0,($isSel=='cut'))).'">'.
-                                               '<img src="gfx/clip_cut'.($isSel=='cut'?'_h':'').'.gif" width="12" height="12" border="0"'.t3lib_BEfunc::titleAttrib($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.cut'),1).' alt="" />'.
+                                               '<img'.t3lib_iconWorks::skinImg('','gfx/clip_cut'.($isSel=='cut'?'_h':'').'.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.cut',1).'" alt="" />'.
                                                '</a>';
                } else {        // For numeric pads, add select checkboxes:
                        $n='_FILE|'.$md5;
                        $this->CBnames[]=$n;
 
-                       $checked = ($this->clipObj->isSelected('_FILE',$md5)?' checked':'');
-                       $cells[]='<input type="hidden" name="CBH['.$n.']" value="0">'.
-                                       '<input type="checkbox" name="CBC['.$n.']" value="'.htmlspecialchars($fullIdent).'" style="width:12;height:12;margin:0 0 0 0;"'.$checked.'>';   // NN 6.1
+                       $checked = ($this->clipObj->isSelected('_FILE',$md5)?' checked="checked"':'');
+                       $cells[]='<input type="hidden" name="CBH['.$n.']" value="0" />'.
+                                       '<input type="checkbox" name="CBC['.$n.']" value="'.htmlspecialchars($fullIdent).'" class="smallCheckboxes"'.$checked.' />';
                }
 
                        // Display PASTE button, if directory:
                $elFromTable = $this->clipObj->elFromTable('_FILE');
                if (@is_dir($fullIdent) && count($elFromTable)) {
                        $cells[]='<a href="'.htmlspecialchars($this->clipObj->pasteUrl('_FILE',$fullIdent)).'" onclick="return '.htmlspecialchars($this->clipObj->confirmMsg('_FILE',$fullIdent,'into',$elFromTable)).'">'.
-                                               '<img src="gfx/clip_pasteinto.gif" width="12" height="12" border="0"'.t3lib_BEfunc::titleAttrib($GLOBALS['LANG']->getLL('clip_pasteInto'),1).' alt="" />'.
+                                               '<img'.t3lib_iconWorks::skinImg('','gfx/clip_pasteinto.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_pasteInto',1).'" alt="" />'.
                                                '</a>';
                }
 
-               if ($GLOBALS['CLIENT']['BROWSER']=='net' && $GLOBALS['CLIENT']['VERSION']<5)    {
-                       $w100 = '';
-                       $w40 = '';
-               } else {
-                       $w100 = ' width="100%"';
-                       $w40 = ' width="40%"';
-               }
-               return '<table border="0" cellpadding="1" cellspacing="0" bgcolor="'.$GLOBALS['SOBE']->doc->bgColor5.'"'.$w100.'>
-                       <tr>
-                       <td'.$w40.'></td>
-                       <td align="center">'.implode('</td><td>',$cells).'</td>
-                       <td'.$w40.'></td>
-                       </tr>
-               </table>';
+                       // Compile items into a DIV-element:
+               return '                                                        <!-- CLIPBOARD PANEL: -->
+                                                                                       <div class="typo3-clipCtrl">
+                                                                                               '.implode('
+                                                                                               ',$cells).'
+                                                                                       </div>';
        }
 }