Index: typo3/file_list.php =================================================================== --- typo3/file_list.php (revision 3306) +++ typo3/file_list.php (working copy) @@ -58,6 +58,7 @@ require_once (PATH_t3lib.'class.t3lib_extfilefunc.php'); require_once (PATH_t3lib.'class.t3lib_recordlist.php'); require_once (PATH_t3lib.'class.t3lib_clipboard.php'); +require_once (PATH_t3lib.'class.t3lib_parsehtml.php'); require_once ('class.file_list.inc'); $BE_USER->modAccess($MCONF,1); @@ -166,6 +167,7 @@ // Initialize the template object $this->doc = t3lib_div::makeInstance('template'); $this->doc->backPath = $BACK_PATH; + $this->doc->setModuleTemplate('templates/file_list.html'); $this->doc->docType = 'xhtml_trans'; // Validating the input "id" (the path, directory!) and checking it against the mounts of the user. @@ -176,25 +178,25 @@ if ($access) { // Create filelisting object - $filelist = t3lib_div::makeInstance('fileList'); - $filelist->backPath = $BACK_PATH; - $filelist->thumbs = $this->MOD_SETTINGS['displayThumbs']?1:$BE_USER->uc['thumbnailsByDefault']; + $this->filelist = t3lib_div::makeInstance('fileList'); + $this->filelist->backPath = $BACK_PATH; + $this->filelist->thumbs = $this->MOD_SETTINGS['displayThumbs']?1:$BE_USER->uc['thumbnailsByDefault']; // Create clipboard object and initialize that - $filelist->clipObj = t3lib_div::makeInstance('t3lib_clipboard'); - $filelist->clipObj->fileMode=1; - $filelist->clipObj->initializeClipboard(); + $this->filelist->clipObj = t3lib_div::makeInstance('t3lib_clipboard'); + $this->filelist->clipObj->fileMode=1; + $this->filelist->clipObj->initializeClipboard(); $CB = t3lib_div::_GET('CB'); - if ($this->cmd=='setCB') $CB['el'] = $filelist->clipObj->cleanUpCBC(array_merge(t3lib_div::_POST('CBH'),t3lib_div::_POST('CBC')),'_FILE'); + if ($this->cmd=='setCB') $CB['el'] = $this->filelist->clipObj->cleanUpCBC(array_merge(t3lib_div::_POST('CBH'),t3lib_div::_POST('CBC')),'_FILE'); if (!$this->MOD_SETTINGS['clipBoard']) $CB['setP']='normal'; - $filelist->clipObj->setCmd($CB); - $filelist->clipObj->cleanCurrent(); - $filelist->clipObj->endClipboard(); // Saves + $this->filelist->clipObj->setCmd($CB); + $this->filelist->clipObj->cleanCurrent(); + $this->filelist->clipObj->endClipboard(); // Saves // If the "cmd" was to delete files from the list (clipboard thing), do that: if ($this->cmd=='delete') { - $items = $filelist->clipObj->cleanUpCBC(t3lib_div::_POST('CBC'),'_FILE',1); + $items = $this->filelist->clipObj->cleanUpCBC(t3lib_div::_POST('CBC'),'_FILE',1); if (count($items)) { // Make command array: $FILE=array(); @@ -223,16 +225,13 @@ // Start up filelisting object, include settings. $this->pointer = t3lib_div::intInRange($this->pointer,0,100000); - $filelist->start($this->id,$this->pointer,$this->MOD_SETTINGS['sort'],$this->MOD_SETTINGS['reverse'],$this->MOD_SETTINGS['clipBoard']); + $this->filelist->start($this->id,$this->pointer,$this->MOD_SETTINGS['sort'],$this->MOD_SETTINGS['reverse'],$this->MOD_SETTINGS['clipBoard']); - // Write the header - $filelist->writeTop($this->id); - // Generate the list - $filelist->generateList(); + $this->filelist->generateList(); // Write the footer - $filelist->writeBottom(); + $this->filelist->writeBottom(); // Set top JavaScript: $this->doc->JScode=$this->doc->wrapScriptTags(' @@ -242,88 +241,78 @@ window.location.href = URL; } - '.$filelist->CBfunctions() // ... and add clipboard JavaScript functions + '.$this->filelist->CBfunctions() // ... and add clipboard JavaScript functions ); // This will return content necessary for the context sensitive clickmenus to work: bodytag events, JavaScript functions and DIV-layers. $this->doc->getContextMenuCode(); + // Setting up the buttons and markers for docheader + list($buttons, $otherMarkers) = $this->filelist->getButtonsAndOtherMarkers($this->id); + + // add the folder info to the marker array + $otherMarkers['FOLDER_INFO'] = $this->filelist->getFolderInfo(); + + $docHeaderButtons = array_merge($this->getButtons(), $buttons); + + // Build the for the module + $this->content = $this->doc->startPage('Template Tools'); // Create output - $this->content=''; - $this->content.=$this->doc->startPage($LANG->getLL('files')); - $this->content.= '
'; - $this->content.= $filelist->HTMLcode; - $this->content.= '
'; - - // FileList Module CSH: - $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH'],'
|'); - - $this->content.=' - -
- - - - - -
-
- - - -
-
-
- - - -
-
-
- '; - - if ($filelist->HTMLcode) { // Making listing options: - - $this->content.=' - + $pageContent=''; + $pageContent.=$this->doc->startPage($LANG->getLL('files')); + $pageContent.= '
'; + $pageContent.= $this->filelist->HTMLcode; + $pageContent.= '
'; + + + if ($this->filelist->HTMLcode) { // Making listing options: + + $pageContent.=' +
'; - + // Add "display thumbnails" checkbox: - $this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[displayThumbs]',$this->MOD_SETTINGS['displayThumbs'],'file_list.php','','id="checkDisplayThumbs"').'
'; - + $pageContent.=t3lib_BEfunc::getFuncCheck($this->id,'SET[displayThumbs]',$this->MOD_SETTINGS['displayThumbs'],'file_list.php','','id="checkDisplayThumbs"').'
'; + // Add clipboard button - $this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[clipBoard]',$this->MOD_SETTINGS['clipBoard'],'file_list.php','','id="checkClipBoard"').' '; - - $this->content.=' + $pageContent.=t3lib_BEfunc::getFuncCheck($this->id,'SET[clipBoard]',$this->MOD_SETTINGS['clipBoard'],'file_list.php','','id="checkClipBoard"').' '; + + $pageContent.='
'; - $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_options', $GLOBALS['BACK_PATH']); - - + + // Set clipboard: if ($this->MOD_SETTINGS['clipBoard']) { - $this->content.=$filelist->clipObj->printClipboard(); - $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_clipboard', $GLOBALS['BACK_PATH']); + $pageContent.=$this->filelist->clipObj->printClipboard(); + $pageContent.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_clipboard', $GLOBALS['BACK_PATH']); } } + + $markerArray = array( + 'CSH' => $docHeaderButtons['csh'], + 'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), + 'CONTENT' => $pageContent + ); - // Add shortcut - if ($BE_USER->mayMakeShortcut()) { - $this->content.='

'.$this->doc->makeShortcutIcon('pointer,id,target,table',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']); - } + $this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, array_merge($markerArray, $otherMarkers)); + $this->content.= $this->doc->endPage(); + $this->content = $this->doc->insertStylesAndJS($this->content); + } else { // Create output - no access (no warning though) - $this->content=''; - $this->content.=$this->doc->startPage($LANG->getLL('files')); + $this->content = ''; + $this->content .= $this->doc->startPage($LANG->getLL('files')); + $this->content .= $this->doc->endPage(); + $this->content = $this->doc->insertStylesAndJS($this->content); } + } /** @@ -332,10 +321,42 @@ * @return void */ function printContent() { - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); echo $this->content; } + + /** + * Create the panel of buttons for submitting the form or otherwise perform operations. + * + * @return array all available buttons as an assoc. array + */ + function getButtons() { + global $TCA, $LANG, $BACK_PATH, $BE_USER; + + $buttons = array( + 'csh' => '', + 'shortcut' => '', + 'upload' => '', + 'new' => '', + ); + + // Add shortcut + if ($BE_USER->mayMakeShortcut()) { + $buttons['shortcut'] = $this->doc->makeShortcutIcon('pointer,id,target,table',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']); + } + + // FileList Module CSH: + $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH']); + + // upload button + $theIcon = 'backPath,'gfx/upload.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.upload',1)).'" alt="" />'; + $buttons['upload'] = ''.$theIcon.''; + + $theIcon = 'backPath,'gfx/new_file.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.new',1)).'" alt="" />'; + $buttons['new'] = ''.$theIcon.''; + + return $buttons; + } + } // Include extension? Index: typo3/class.file_list.inc =================================================================== --- typo3/class.file_list.inc (revision 3306) +++ typo3/class.file_list.inc (working copy) @@ -140,58 +140,57 @@ } /** - * Make the top of the list + * Return the buttons used by the file list to include in the top header * - * @param string The path to list. - * @return void + * @return array */ - function writeTop($path) { + function getButtonsAndOtherMarkers($path) { + // Makes the code for the foldericon in the top $path = $GLOBALS['SOBE']->basicFF->is_directory($path); // Cleaning name... if ($path) { - $out=''; + $otherMarkers = array( + 'PAGE_ICON' => '', + 'TITLE' => '', + ); + + $buttons = array( + 'level_up' => '', + 'refresh' => '', + 'title' => '', + 'page_icon' => '', + ); + $theFile = $GLOBALS['SOBE']->basicFF->getTotalFileInfo($path); - $root = $GLOBALS['SOBE']->basicFF->checkPathAgainstMounts($theFile['path']); - $titleCol='path'; - $this->fieldArray = Array($titleCol,'up'); list($title,$icon,$path) = $this->dirData($theFile); // Start compiling the HTML - $theData = Array(); - $theData[$titleCol] = $this->widthGif; - $title = $GLOBALS['SOBE']->basicFF->blindPath($path); - $theData['up']=''. - 'backPath,'gfx/refresh_n.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload',1).'" alt="" />'. - ''; - if ($root) { + // if this is some subpage under the mount root.... + if ($GLOBALS['SOBE']->basicFF->checkPathAgainstMounts($theFile['path'])) { // The icon with link - $theIcon = 'backPath,$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />'; - if ($this->clickMenus) $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon,$path); + $otherMarkers['PAGE_ICON'] = 'backPath,$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />'; + if ($this->clickMenus) $otherMarkers['PAGE_ICON'] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($otherMarkers['PAGE_ICON'],$path); - $theData[$titleCol].='
'.t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20)); // No HTML specialchars here - HTML like is allowed - $theData['up'].=$this->linkWrapDir('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']); + $buttons['level_up'] .= $this->linkWrapDir('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']); + $otherMarkers['TITLE'] .= t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20)); // No HTML specialchars here - HTML like is allowed + + // this is the root page } else { - // root:0 - $theIcon='backPath,'gfx/i/_icon_ftp.gif','width="18" height="16"').' alt="" />'; - $theData[$titleCol].='
'.htmlspecialchars(t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20))); + $otherMarkers['PAGE_ICON'] = 'backPath,'gfx/i/_icon_ftp.gif','width="18" height="16"').' alt="" />'; + if ($this->clickMenus) $otherMarkers['PAGE_ICON'] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($otherMarkers['PAGE_ICON'],$path); + $otherMarkers['TITLE'] .= htmlspecialchars(t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20))); } - - // Adding top element - $out.=$this->addelement(1,'',$theData,'','',$theIcon); - - $this->HTMLcode.=' - - - - '.$out.' -
'; } + + $buttons['refresh'] = ''. + 'backPath,'gfx/refresh_n.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload',1).'" alt="" />'. + ''; + + return array($buttons, $otherMarkers); } /** @@ -276,9 +275,6 @@ $out.=$iOut; // half line is drawn - $theData = Array(); - $theData[$titleCol] = $this->counter.' File(s), '.t3lib_div::formatSize($this->totalbytes).'bytes'; - $out.=$this->addelement(1,'',$theData); // finish return ' @@ -293,6 +289,20 @@ } /** + * Gets the number of files and total size of a folder + * + * @return string + **/ + function getFolderInfo() { + if($this->counter == 1) { + $fileLabel = 'File'; + } else { + $fileLabel = 'Files'; + } + return $this->counter.' '.$fileLabel.', '.t3lib_div::formatSize($this->totalbytes).'bytes'; + } + + /** * This returns tablerows for the directories in the array $items['sorting']. * * @param array Directory items Index: typo3/file_rename.php =================================================================== --- typo3/file_rename.php (revision 3306) +++ typo3/file_rename.php (working copy) @@ -53,6 +53,7 @@ require('init.php'); require('template.php'); require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php'); +require_once(PATH_t3lib.'class.t3lib_parsehtml.php'); @@ -63,7 +64,6 @@ - /** * Script Class for the rename-file form. * @@ -134,17 +134,19 @@ default: $this->icon = 'gfx/i/_icon_ftp.gif'; break; } + $this->icon = 'backPath,$this->icon,'width="18" height="16"').' title="" alt="" />'; + // Relative path to filemount, $key: $this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path'])); // Setting title: - $this->title = $GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath; + $this->title = $this->icon.$GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath; // Setting template object - $this->doc = t3lib_div::makeInstance('smallDoc'); + $this->doc = t3lib_div::makeInstance('template'); $this->doc->docType = 'xhtml_trans'; + $this->doc->setModuleTemplate('templates/file_rename.html'); $this->doc->backPath = $BACK_PATH; - $this->doc->form='
'; $this->doc->JScode=$this->doc->wrapScriptTags(' function backToList() { // top.goToModule("file_list"); @@ -161,16 +163,16 @@ global $LANG; // Make page header: - $this->content=''; - $this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle')); - $this->content.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle')); - $this->content.=$this->doc->spacer(5); - $this->content.=$this->doc->section('',$this->doc->getFileheader($this->title,$this->shortPath,$this->icon)); - $this->content.=$this->doc->divider(5); + $this->content = $this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle')); + $pageContent = $this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle')); + $pageContent .= $this->doc->spacer(5); + $pageContent .= $this->doc->divider(5); + + $code = ''; // Making the formfields for renaming: - $code=' + $code .= '
formWidth(20).' /> @@ -187,12 +189,24 @@
'; - // CSH: - $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH'],'
'); // Add the HTML as a section: - $this->content.= $this->doc->section('',$code); + $pageContent .= $code; + $docHeaderButtons = array(); + $docHeaderButtons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH']); + + // Add the HTML as a section: + $markerArray = array( + 'CSH' => $docHeaderButtons['csh'], + 'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), + 'CONTENT' => $pageContent, + 'PATH' => $this->title, + ); + + $this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray); + $this->content.= $this->doc->endPage(); + $this->content = $this->doc->insertStylesAndJS($this->content); } /** @@ -201,8 +215,6 @@ * @return void */ function printContent() { - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); echo $this->content; } } Index: typo3/file_newfolder.php =================================================================== --- typo3/file_newfolder.php (revision 3306) +++ typo3/file_newfolder.php (working copy) @@ -53,6 +53,7 @@ require('init.php'); require('template.php'); require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php'); +require_once(PATH_t3lib.'class.t3lib_parsehtml.php'); @@ -63,7 +64,6 @@ - /** * Script Class for the create-new script; Displays a form for creating up to 10 folders or one new text file * @@ -136,17 +136,19 @@ default: $this->icon = 'gfx/i/_icon_ftp.gif'; break; } + $this->icon = 'backPath,$this->icon,'width="18" height="16"').' title="" alt="" />'; + // Relative path to filemount, $key: $this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path'])); // Setting title: - $this->title = $GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath; - + $this->title = $this->icon.$GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath; + // Setting template object - $this->doc = t3lib_div::makeInstance('smallDoc'); + $this->doc = t3lib_div::makeInstance('template'); $this->doc->docType = 'xhtml_trans'; + $this->doc->setModuleTemplate('templates/file_newfolder.html'); $this->doc->backPath = $BACK_PATH; - $this->doc->form=''; $this->doc->JScode=$this->doc->wrapScriptTags(' var path = "'.$this->target.'"; @@ -171,19 +173,22 @@ */ function main() { global $LANG; - + + // start content compilation + $this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle')); + + // Make page header: - $this->content=''; - $this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle')); - $this->content.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle')); - $this->content.=$this->doc->spacer(5); - $this->content.=$this->doc->section('',$this->doc->getFileheader($this->title,$this->shortPath,$this->icon)); - $this->content.=$this->doc->divider(5); + $pageContent=''; + $pageContent.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle')); + $pageContent.=$this->doc->spacer(5); + $pageContent.=$this->doc->divider(5); + $code = ''; // Making the selector box for the number of concurrent folder-creations $this->number = t3lib_div::intInRange($this->number,1,10); - $code=' + $code .= '
- - - -
- '; // Edit textarea: $code.=' @@ -188,25 +185,37 @@ t3lib_div::formatForTextarea($fileContent). ' +
'; - // CSH: - $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_edit', $GLOBALS['BACK_PATH'],'|
'); - // Make shortcut: if ($BE_USER->mayMakeShortcut()) { $this->MCONF['name']='xMOD_file_edit.php'; - $code.= '
'.$this->doc->makeShortcutIcon('target','',$this->MCONF['name'],1); + $docHeaderButtons['shortcut'] = $this->doc->makeShortcutIcon('target','',$this->MCONF['name'],1); } } else { $code.=sprintf($LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.coundNot'), $extList); } // Ending of section and outputting editing form: - $this->content.= $this->doc->sectionEnd(); - $this->content.=$code; + $pageContent.= $this->doc->sectionEnd(); + $pageContent.=$code; + // Add the HTML as a section: + $markerArray = array( + 'CSH' => $docHeaderButtons['csh'], + 'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), + 'BUTTONS' => $docHeaderButtons, + 'CONTENT' => $pageContent, + 'PATH' => $this->title, + ); + + $this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray); + $this->content.= $this->doc->endPage(); + $this->content = $this->doc->insertStylesAndJS($this->content); + + } /** @@ -215,10 +224,35 @@ * @return void */ function printContent() { - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); echo $this->content; } + + /** + * Builds the buttons for the docheader and returns them as an array + * + * @return array + **/ + function getButtons() { + + $buttons = array(); + + // CSH button + $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_edit', $GLOBALS['BACK_PATH']); + + // Save button + $theIcon = 'backPath,'gfx/savedok.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.submit',1)).'" alt="" />'; + $buttons['SAVE'] = ''.$theIcon.''; + + // Save and Close button + $theIcon = 'backPath,'gfx/saveandclosedok.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.saveAndClose',1)).'" alt="" />'; + $buttons['SAVE_CLOSE'] = ''.$theIcon.''; + + // Cancel button + $theIcon = 'backPath,'gfx/closedok.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.cancel',1)).'" alt="" />'; + $buttons['CANCEL'] = ''.$theIcon.''; + + return $buttons; + } } // Include extension? Index: typo3/stylesheet.css =================================================================== --- typo3/stylesheet.css (revision 3306) +++ typo3/stylesheet.css (working copy) @@ -128,6 +128,8 @@ body#typo3-alt-doc-php, body#typo3-db-list-php, body#ext-cms-layout-db-layout-php, body#ext-tstemplate-ts-index-php, body#typo3-mod-web-perm-index-php, body#typo3-mod-web-info-index-php, body#typo3-mod-web-func-index-php, body#ext-version-cm1-index-php, body#ext-setup-mod-index-php, body#typo3-mod-user-ws-index-php, body#typo3-mod-user-ws-workspaceforms-php, body#typo3-mod-php, body#ext-tsconfig-help-mod1-index-php, body#typo3-mod-tools-em-index-php, body#ext-lowlevel-dbint-index-php, body#ext-lowlevel-config-index-php { padding: 0; margin: 0; overflow: hidden; height: 100%; } +/* Set body styles for Filelist module */ +BODY#typo3-file-newfolder-php, BODY#typo3-file-list-php, BODY#typo3-file-edit-php, BODY#typo3-file-rename-php, BODY#typo3-file-upload-php { margin: 0;} /**************************************** * SPECIFIC WRAPPERS Index: typo3/templates/file_upload.html =================================================================== --- typo3/templates/file_upload.html (revision 0) +++ typo3/templates/file_upload.html (revision 0) @@ -0,0 +1,33 @@ + +
+ +
+
+
###BUTTONLIST_LEFT###
+
###BUTTONLIST_RIGHT######FUNC_MENU###
+
+
+
###PATH###
+
+
+
+ +
+ ###CONTENT### +
+
+ + + + + +
###BUTTONS###
+ + + + + + + + + \ No newline at end of file Index: typo3/templates/file_edit.html =================================================================== --- typo3/templates/file_edit.html (revision 0) +++ typo3/templates/file_edit.html (revision 0) @@ -0,0 +1,33 @@ + +
+ +
+
+
###BUTTONLIST_LEFT###
+
###BUTTONLIST_RIGHT######FUNC_MENU###
+
+
+
###CSH### ###PATH###
+
+
+
+ +
+ ###CONTENT### +
+
+ + + + + +
###BUTTONS###
+ + + +###SAVE######SAVE_CLOSE######CANCEL### + + + +###SHORTCUT### + \ No newline at end of file Index: typo3/templates/file_newfolder.html =================================================================== --- typo3/templates/file_newfolder.html (revision 0) +++ typo3/templates/file_newfolder.html (revision 0) @@ -0,0 +1,33 @@ + +
+ +
+
+
###BUTTONLIST_LEFT###
+
###BUTTONLIST_RIGHT######FUNC_MENU###
+
+
+
###PATH###
+
+
+
+ +
+ ###CONTENT### +
+
+ + + + + +
###BUTTONS###
+ + + + + + + + + \ No newline at end of file Index: typo3/templates/file_rename.html =================================================================== --- typo3/templates/file_rename.html (revision 0) +++ typo3/templates/file_rename.html (revision 0) @@ -0,0 +1,33 @@ + +
+ +
+
+
###BUTTONLIST_LEFT###
+
###BUTTONLIST_RIGHT######FUNC_MENU###
+
+
+
###CSH### ###PATH###
+
+
+
+ +
+ ###CONTENT### +
+
+ + + + + +
###BUTTONS###
+ + + + + + + + + \ No newline at end of file Index: typo3/templates/file_list.html =================================================================== --- typo3/templates/file_list.html (revision 0) +++ typo3/templates/file_list.html (revision 0) @@ -0,0 +1,33 @@ + +
+ +
+
+
###BUTTONLIST_LEFT###
+
###BUTTONLIST_RIGHT######FUNC_MENU###
+
+
+
###CSH######TITLE###
+
###FOLDER_INFO### ###PAGE_ICON###
+
+
+ +
+ ###CONTENT### +
+
+ + + + + +
###BUTTONS###
+ + + +###UPLOAD######NEW### + + + +###REFRESH######LEVEL_UP######SHORTCUT### + \ No newline at end of file Index: typo3/file_upload.php =================================================================== --- typo3/file_upload.php (revision 3306) +++ typo3/file_upload.php (working copy) @@ -54,6 +54,7 @@ require('template.php'); $LANG->includeLLFile('EXT:lang/locallang_misc.xml'); require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php'); +require_once(PATH_t3lib.'class.t3lib_parsehtml.php'); @@ -66,7 +67,6 @@ - /** * Script Class for display up to 10 upload fields * @@ -145,17 +145,19 @@ default: $this->icon = 'gfx/i/_icon_ftp.gif'; break; } + $this->icon = 'backPath,$this->icon,'width="18" height="16"').' title="" alt="" />'; + // Relative path to filemount, $key: $this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path'])); // Setting title: - $this->title = $GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath; + $this->title = $this->icon.$GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath; // Setting template object - $this->doc = t3lib_div::makeInstance('smallDoc'); + $this->doc = t3lib_div::makeInstance('template'); $this->doc->docType = 'xhtml_trans'; + $this->doc->setModuleTemplate('templates/file_upload.html'); $this->doc->backPath = $BACK_PATH; - $this->doc->form=''; if($GLOBALS['BE_USER']->jsConfirmation(1)) { $confirm = ' && confirm('.$LANG->JScharCode($LANG->sL('LLL:EXT:lang/locallang_core.php:mess.redraw')).')'; @@ -187,17 +189,17 @@ global $LANG; // Make page header: - $this->content=''; - $this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle')); - $this->content.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle')); - $this->content.=$this->doc->spacer(5); - $this->content.=$this->doc->section('',$this->doc->getFileheader($this->title,$this->shortPath,$this->icon)); - $this->content.=$this->doc->divider(5); + $this->content = $this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle')); + $pageContent.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle')); + $pageContent.=$this->doc->spacer(5); + $pageContent.=$this->doc->divider(5); + + $code = ''; // Making the selector box for the number of concurrent uploads $this->number = t3lib_div::intInRange($this->number,1,10); - $code=' + $code .= '