Exemplo n.º 1
0
 */
//-- Add css
ecrStylesheet('contextmenu');
//-- Add javascript
ecrScript('contextmenu', 'templates');
JHTML::_('behavior.modal', 'a.ecr_modal');
//-- Allowed extensions
//-- TODO set somewhere else...
$allowed_exts = array('php', 'css', 'xml', 'js', 'ini', 'txt', 'html', 'sql');
$allowed_pics = array('png', 'gif', 'jpg', 'ico');
ecrLoadMedia('php_file_tree');
$fileTree = new EcrFileTree();
$js = '';
$js .= " onmousedown=\"setAction(event, '[folder]', '[file]', '[id]');\"";
$js .= " onclick=\"ecr_loadFile('templates', '[folder]', '[file]', '[id]');\"";
$fileTree->setJs('file', $js);
$fileTree->setJs('folder', " onmousedown=\"setAction(event, '[folder]', '[file]');\"");
?>

<table width="100%">
    <tr valign="top">
        <td width="20%">
            <div class="ecr_floatbox">
                <span style="float: right;" class="img icon16-info hasTip"
                      title="<?php 
echo jgettext('File tree') . '::' . jgettext('Left click files to edit.') . '<br />' . jgettext('Right click files and folders for options.');
?>
">&nbsp;</span>
                <?php 
echo $fileTree->startTree();
?>