Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages | Examples

SC_alt_file_navframe Class Reference

List of all members.

Public Member Functions

 init ()
 Initialiation of the script class.
 main ()
 Main function, rendering the folder tree.
 printContent ()
 Outputting the accumulated content to screen.

Public Attributes

 $content
 $foldertree
 $doc
 $currentSubScript
 $cMR

Member Function Documentation

SC_alt_file_navframe::init  ) 
 

Initialiation of the script class.

Returns:
void

Definition at line 85 of file alt_file_navframe.php.

00085                      {
00086       global $BE_USER,$BACK_PATH,$CLIENT;
00087 
00088          // Setting GPvars:
00089       $this->currentSubScript = t3lib_div::_GP('currentSubScript');
00090       $this->cMR = t3lib_div::_GP('cMR');
00091 
00092          // Create folder tree object:
00093       $this->foldertree = t3lib_div::makeInstance('t3lib_folderTree');
00094       $this->foldertree->ext_IconMode = $BE_USER->getTSConfigVal('options.folderTree.disableIconLinkToContextmenu');
00095       $this->foldertree->thisScript = 'alt_file_navframe.php';
00096 
00097          // Setting highlight mode:
00098       $this->doHighlight = !$BE_USER->getTSConfigVal('options.pageTree.disableTitleHighlight');
00099 
00100          // Create template object:
00101       $this->doc = t3lib_div::makeInstance('template');
00102       $this->doc->docType='xhtml_trans';
00103 
00104          // Setting backPath
00105       $this->doc->backPath = $BACK_PATH;
00106 
00107          // Setting JavaScript for menu.
00108       $this->doc->JScode=$this->doc->wrapScriptTags(
00109    ($this->currentSubScript?'top.currentSubScript=unescape("'.rawurlencode($this->currentSubScript).'");':'').'
00110 
00111       // Function, loading the list frame from navigation tree:
00112    function jumpTo(id,linkObj,highLightID)   {  //
00113       var theUrl = top.TS.PATH_typo3+top.currentSubScript+"?id="+id;
00114 
00115       if (top.condensedMode)  {
00116          top.content.document.location=theUrl;
00117       } else {
00118          parent.list_frame.document.location=theUrl;
00119       }
00120 
00121         '.($this->doHighlight?'hilight_row("file",highLightID);':'').'
00122       '.(!$CLIENT['FORMSTYLE'] ? '' : 'if (linkObj) {linkObj.blur();}').'
00123       return false;
00124    }
00125 
00126 
00127       // Call this function, refresh_nav(), from another script in the backend if you want to refresh the navigation frame (eg. after having changed a page title or moved pages etc.)
00128       // See t3lib_BEfunc::getSetUpdateSignal()
00129    function refresh_nav()  {  //
00130       window.setTimeout("_refresh_nav();",0);
00131    }
00132    function _refresh_nav() {  //
00133       document.location="'.$this->pagetree->thisScript.'?unique='.time().'";
00134    }
00135 
00136       // Highlighting rows in the folder tree:
00137    function hilight_row(frameSetModule,highLightID) { //
00138 
00139          // Remove old:
00140       theObj = document.getElementById(top.fsMod.navFrameHighlightedID[frameSetModule]);
00141       if (theObj) {
00142          theObj.style.backgroundColor="";
00143       }
00144 
00145          // Set new:
00146       top.fsMod.navFrameHighlightedID[frameSetModule] = highLightID;
00147       theObj = document.getElementById(highLightID);
00148       if (theObj) {
00149          theObj.style.backgroundColor="'.t3lib_div::modifyHTMLColorAll($this->doc->bgColor,-20).'";
00150       }
00151    }
00152 
00153    '.($this->cMR?"jumpTo(top.fsMod.recentIds['file'],'');":'').';
00154       ');
00155 
00156          // Click menu code is added:
00157       $CMparts=$this->doc->getContextMenuCode();
00158       $this->doc->bodyTagAdditions = $CMparts[1];
00159       $this->doc->JScode.=$CMparts[0];
00160       $this->doc->postCode.= $CMparts[2];
00161    }

SC_alt_file_navframe::main  ) 
 

Main function, rendering the folder tree.

Returns:
void

Definition at line 168 of file alt_file_navframe.php.

References $LANG, and t3lib_BEfunc::cshItem().

00168                      {
00169       global $LANG,$CLIENT;
00170 
00171          // Produce browse-tree:
00172       $tree = $this->foldertree->getBrowsableTree();
00173 
00174       $this->content = '';
00175       $this->content.= $this->doc->startPage('Folder tree');
00176       $this->content.= $tree;
00177       $refreshUrl = t3lib_div::getIndpEnv('REQUEST_URI');
00178       $this->content.= '
00179          <p class="c-refresh">
00180             <a href="'.htmlspecialchars($refreshUrl).'">'.
00181             '<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="" />'.
00182             '</a><a href="'.htmlspecialchars($refreshUrl).'">'.
00183             $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.refresh',1).'</a>
00184          </p>
00185          <br />';
00186       $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filetree', $GLOBALS['BACK_PATH']);
00187 
00188          // Adding highlight - JavaScript
00189       if ($this->doHighlight) $this->content .=$this->doc->wrapScriptTags('
00190          hilight_row("",top.fsMod.navFrameHighlightedID["file"]);
00191       ');
00192    }

SC_alt_file_navframe::printContent  ) 
 

Outputting the accumulated content to screen.

Returns:
void

Definition at line 199 of file alt_file_navframe.php.

00199                            {
00200       $this->content.= $this->doc->endPage();
00201       echo $this->content;
00202    }


Member Data Documentation

SC_alt_file_navframe::$cMR
 

Definition at line 77 of file alt_file_navframe.php.

SC_alt_file_navframe::$content
 

Definition at line 71 of file alt_file_navframe.php.

SC_alt_file_navframe::$currentSubScript
 

Definition at line 76 of file alt_file_navframe.php.

SC_alt_file_navframe::$doc
 

Definition at line 73 of file alt_file_navframe.php.

SC_alt_file_navframe::$foldertree
 

Definition at line 72 of file alt_file_navframe.php.


The documentation for this class was generated from the following file:
Generated on Sun Oct 3 01:06:27 2004 for TYPO3core 3.7.0 dev by  doxygen 1.3.8-20040913