Added feature #14247: Add a concatenator for CSS and JS (thanks to Steffen Gebert)
[Packages/TYPO3.CMS.git] / typo3 / file_list.php
index bb4d936..04c427f 100644 (file)
@@ -145,7 +145,8 @@ class SC_file_list {
                        'sort' => '',
                        'reverse' => '',
                        'displayThumbs' => '',
-                       'clipBoard' => ''
+                       'clipBoard' => '',
+                       'bigControlPanel' => ''
                );
 
                        // CLEANSE SETTINGS
@@ -164,7 +165,7 @@ class SC_file_list {
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
                $this->doc->setModuleTemplate('templates/file_list.html');
-               $this->doc->loadPrototype();
+               $this->doc->getPageRenderer()->loadPrototype();
 
                        // Validating the input "id" (the path, directory!) and checking it against the mounts of the user.
                $this->id = $this->basicFF->is_directory($this->id);
@@ -236,7 +237,12 @@ class SC_file_list {
                                // Create filelisting object
                        $this->filelist = t3lib_div::makeInstance('fileList');
                        $this->filelist->backPath = $BACK_PATH;
-                       $this->filelist->thumbs = $this->MOD_SETTINGS['displayThumbs']?1:$BE_USER->uc['thumbnailsByDefault'];
+
+                               // if user never opened the list module, set the value for displayThumbs
+                       if (!isset($this->MOD_SETTINGS['displayThumbs'])) {
+                               $this->MOD_SETTINGS['displayThumbs'] = $BE_USER->uc['thumbnailsByDefault'];
+                       }
+                       $this->filelist->thumbs = $this->MOD_SETTINGS['displayThumbs'];
 
                                // Create clipboard object and initialize that
                        $this->filelist->clipObj = t3lib_div::makeInstance('t3lib_clipboard');
@@ -281,7 +287,7 @@ class SC_file_list {
 
                                // Start up filelisting object, include settings.
                        $this->pointer = t3lib_div::intInRange($this->pointer,0,100000);
-                       $this->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'], $this->MOD_SETTINGS['bigControlPanel']);
 
                                // Generate the list
                        $this->filelist->generateList();
@@ -331,6 +337,9 @@ class SC_file_list {
                                        <div id="typo3-listOptions">
                                ';
 
+                                       // Add "display bigControlPanel" checkbox:
+                               $pageContent.=t3lib_BEfunc::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], 'file_list.php', '', 'id="bigControlPanel"') . '<label for="bigControlPanel"> ' .$LANG->getLL('bigControlPanel', 1) . '</label><br />';
+
                                        // Add "display thumbnails" checkbox:
                                $pageContent.=t3lib_BEfunc::getFuncCheck($this->id,'SET[displayThumbs]',$this->MOD_SETTINGS['displayThumbs'],'file_list.php','','id="checkDisplayThumbs"').' <label for="checkDisplayThumbs">'.$LANG->getLL('displayThumbs',1).'</label><br />';