00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00057 $BACK_PATH = '';
00058 require('init.php');
00059 require('template.php');
00060 require_once('class.filelistfoldertree.php');
00061
00062
00070 class SC_alt_file_navframe {
00071
00072
00073 var $content;
00074 var $foldertree;
00075
00081 var $doc;
00082 var $backPath;
00083
00084
00085 var $ajax;
00086 var $currentSubScript;
00087 var $cMR;
00088
00089
00095 function init() {
00096 global $BE_USER,$BACK_PATH,$CLIENT;
00097
00098
00099 $this->backPath = $BACK_PATH;
00100
00101
00102 $this->ajax = t3lib_div::_GP('ajax');
00103 $this->currentSubScript = t3lib_div::_GP('currentSubScript');
00104 $this->cMR = t3lib_div::_GP('cMR');
00105
00106
00107 $this->foldertree = t3lib_div::makeInstance('filelistFolderTree');
00108 $this->foldertree->ext_IconMode = $BE_USER->getTSConfigVal('options.folderTree.disableIconLinkToContextmenu');
00109 $this->foldertree->thisScript = 'alt_file_navframe.php';
00110
00111
00112 if (!$this->ajax) {
00113
00114 $this->doHighlight = !$BE_USER->getTSConfigVal('options.pageTree.disableTitleHighlight');
00115
00116
00117 $this->doc = t3lib_div::makeInstance('template');
00118 $this->doc->backPath = $BACK_PATH;
00119 $this->doc->docType = 'xhtml_trans';
00120
00121
00122 $this->doc->JScode = '
00123 <script type="text/javascript" src="'.$this->backPath.'contrib/prototype/prototype.js"></script>
00124 <script type="text/javascript" src="'.$this->backPath.'tree.js"></script>'."\n";
00125
00126
00127 $this->doc->JScode .= $this->doc->wrapScriptTags(
00128 ($this->currentSubScript?'top.currentSubScript=unescape("'.rawurlencode($this->currentSubScript).'");':'').'
00129
00130
00131 Tree.thisScript = "'.$this->foldertree->thisScript.'";
00132 DragDrop.changeURL = "'.$this->backPath.'alt_clickmenu.php";
00133 DragDrop.backPath = "'.t3lib_div::shortMD5(''.'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']).'";
00134 DragDrop.table = "folders";
00135
00136
00137 function jumpTo(id, linkObj, highlightID, bank) {
00138 var theUrl = top.TS.PATH_typo3 + top.currentSubScript + "?id=" + id;
00139 top.fsMod.currentBank = bank;
00140
00141 if (top.condensedMode) top.content.location.href = theUrl;
00142 else parent.list_frame.location.href = theUrl;
00143
00144 '.($this->doHighlight ? 'Tree.highlightActiveItem("file", highlightID + "_" + bank);' : '').'
00145 '.(!$GLOBALS['CLIENT']['FORMSTYLE'] ? '' : 'if (linkObj) linkObj.blur(); ').'
00146 return false;
00147 }
00148 '.($this->cMR ? " jumpTo(top.fsMod.recentIds['file'],'');" : '')
00149 );
00150
00151
00152 $CMparts=$this->doc->getContextMenuCode();
00153 $this->doc->bodyTagAdditions = $CMparts[1];
00154 $this->doc->JScode.= $CMparts[0];
00155 $this->doc->postCode.= $CMparts[2];
00156 }
00157 }
00158
00164 function main() {
00165 global $LANG,$CLIENT;
00166
00167
00168 $tree = $this->foldertree->getBrowsableTree();
00169
00170
00171 if ($this->ajax) {
00172 $this->content = $LANG->csConvObj->utf8_encode($tree, $LANG->charSet);
00173 return;
00174 }
00175
00176 $this->content = $this->doc->startPage('TYPO3 Folder Tree');
00177
00178
00179 $this->content.= $tree;
00180
00181
00182 $this->content.= '
00183 <p class="c-refresh">
00184 <a href="'.htmlspecialchars(t3lib_div::getIndpEnv('REQUEST_URI')).'">'.
00185 '<img'.t3lib_iconWorks::skinImg('','gfx/refresh_n.gif','width="14" height="14"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.refresh',1).'" alt="" />'.
00186 $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.refresh',1).'</a>
00187 </p>
00188 <br />';
00189
00190
00191 $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filetree', $GLOBALS['BACK_PATH']);
00192
00193
00194 $this->content .=$this->doc->wrapScriptTags('
00195 '.($this->doHighlight ? 'Tree.highlightActiveItem("", top.fsMod.navFrameHighlightedID["file"]);' : '').'
00196 '.(!$this->doc->isCMlayers() ? 'Tree.activateDragDrop = false;' : 'Tree.registerDragDropHandlers();')
00197 );
00198
00199 }
00200
00206 function printContent() {
00207
00208 if ($this->ajax) {
00209 header('X-JSON: ('.($this->foldertree->ajaxStatus?'true':'false').')');
00210 header('Content-type: text/html; charset=utf-8');
00211
00212 } else {
00213 $this->content.= $this->doc->endPage();
00214 $this->content = $this->doc->insertStylesAndJS($this->content);
00215 }
00216 echo $this->content;
00217 }
00218 }
00219
00220
00221 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_file_navframe.php']) {
00222 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_file_navframe.php']);
00223 }
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237 $SOBE = t3lib_div::makeInstance('SC_alt_file_navframe');
00238 $SOBE->init();
00239 $SOBE->main();
00240 $SOBE->printContent();
00241 ?>
This documentation has been generated automatically from TYPO3 source code using
Doxygen and is provided as is by
Cast Iron Coding
as a courtesy to other TYPO3 developers and users. Please consider
Cast Iron Coding — a full-service web development
agency in Portland, Oregon specializing in TYPO3 extension development — for all of your TYPO3 development and consulting needs!