Beispiel #1
0
    echo $js;
    ?>
>
                                        <?php 
    echo $pType->translateTypePlural();
    ?>
                                    </div>
                                    <ul>
                                        <?php 
    foreach ($this->templates[$pTag] as $template) {
        $js = " onmousedown=\"setAction('', '" . $path . DS . $pTag . "', '" . $template->folder . "');\"";
        echo '<li class="pft-directory">';
        echo '<div' . $js . ' class="hasTip" title="' . $template->info . '">';
        echo '<span class="img icon16-info" />' . $template->name;
        echo '</div>';
        echo $fileTree->setDir($this->path . DS . $pTag . DS . $template->folder)->drawTree();
        echo '</li>';
    }
    ?>
                                    </ul>
                                </li>
                                <?php 
}
?>
                        </ul>
                    </li>
                </ul>
                <ul>
                    <li class="pft-directoryX">
                        <div style="font-size: 1.3em;">
                            <?php 
Beispiel #2
0
        $local_api_copy .= '/';
    }
    if (strpos($local_api_copy, '//')) {
        $local_api_copy = substr($local_api_copy, strpos($local_api_copy, '//') + 2);
    }
    $formats[] = array('api local', $local_api_copy . '[package]/[class].html#[method]', 'apilocal', 'local');
} else {
    echo '<span style="float: right; background-color: #ffc;">';
    echo jgettext('No local API copy specified. you may do this in configuration.');
    echo '</span>';
}
$cList = getJoomlaClasses();
$packages = getJoomlaPackages();
ecrLoadMedia('php_file_tree');
$fileTree = new EcrFileTree('', '', " onclick=\"changeFrame('[folder]', '[file]');\"");
$fileTree->setDir($pathHelp);
$fileTree->showExtension = false;
?>
<script type="text/javascript">
    var fId = '<?php 
echo $out_format;
?>
';
    var ECR_DEBUG = <?php 
echo ECR_DEBUG ? 'true' : 'false';
?>
;
</script>

<table width="100%">
    <tr valign="top">
Beispiel #3
0
 /**
  * Get extended Information for an extension temlate.
  *
  * AJAX called. !
  *
  * @return void
  */
 public function ajGetExtensionTemplateInfo()
 {
     $input = JFactory::getApplication()->input;
     $jsFile = '';
     $fileTree = new EcrFileTree('', '', $jsFile, '');
     $extType = $input->get('extType');
     $folder = $input->get('folder');
     $response = array();
     $response['status'] = 0;
     $response['text'] = '';
     if (!$extType || !$folder) {
         $response['text'] = 'Invalid options';
         echo json_encode($response);
         return;
     }
     $dir = ECRPATH_EXTENSIONTEMPLATES . DS . $extType . DS . $folder;
     $folders = JFolder::folders($dir, '.', false, true, array('.svn'));
     foreach ($folders as $folder) {
         $fileTree->setDir($folder);
         $response['text'] .= $fileTree->drawFullTree();
     }
     //foreach
     $response['status'] = 1;
     echo json_encode($response);
 }
Beispiel #4
0
/**
 * @param EcrProjectBase $project
 *
 * @return string
 */
function drawFileTree(EcrProjectBase $project)
{
    ecrLoadMedia('php_file_tree');
    $ret = '';
    $javascript = '';
    $javascript .= " onclick=\"reflectFile('[folder]', '[file]', '[id]');\"";
    $jsFolder = '';
    $fileTree = new EcrFileTree('', '', $javascript, $jsFolder);
    foreach ($project->copies as $dir) {
        if (is_dir($dir)) {
            $d = str_replace(JPATH_ROOT, '', $dir);
            $dspl = str_replace(DS, ' ' . DS . ' ', $d);
            $ret .= '<div class="file_tree_path"><strong>JROOT</strong>' . BR . $dspl . '</div>';
            $fileTree->setDir($dir);
            $ret .= $fileTree->startTree();
            $ret .= $fileTree->drawTree();
            $ret .= $fileTree->endTree();
        } else {
            if (JFile::exists($dir)) {
                $show = true;
                foreach ($project->copies as $test) {
                    if (strpos($dir, $test)) {
                        $show = false;
                    }
                }
                if ($show) {
                    //--This shows a single file not included in anterior directory list ;) - hi plugins...
                    $fileName = JFile::getName(JPath::clean($dir));
                    $dirName = substr($dir, 0, strlen($dir) - strlen($fileName));
                    $oldDir = isset($oldDir) ? $oldDir : '';
                    if ($dirName != $oldDir) {
                        $d = str_replace(JPATH_ROOT, '', $dir);
                        $dspl = str_replace(DS, ' ' . DS . ' ', $d);
                        $ret .= '<div class="file_tree_path"><strong>JROOT</strong>' . BR . $dspl . '</div>';
                    }
                    $oldDir = $dirName;
                    if (false == isset($fileTree)) {
                        $fileTree = new EcrFileTree($dir, "javascript:", $javascript);
                    } else {
                        $fileTree->setDir($dir);
                    }
                    $ret .= $fileTree->startTree();
                    $ret .= $fileTree->getLink($dirName, $fileName);
                    $ret .= $fileTree->endTree();
                    $ret .= '<br />';
                }
            }
        }
    }
    return $ret;
}
Beispiel #5
0
/**
 *
 * @param $project
 * @return unknown_type
 */
function drawFileTree($project)
{
    $ret = '';
    $javascript = '';
    $javascript .= " onclick=\"create_skeleton('[link]', '[file]', '[id]');\"";
    $jsFolder = '';
    //    #$jsFolder .= " onmousedown=\"setPath('[link]/[file]');\"";
    $fileTree = new EcrFileTree('', '', $javascript, $jsFolder);
    foreach ($project->copies as $dir) {
        if (is_dir($dir)) {
            $dspl = str_replace(JPATH_ROOT . DS, '', $dir);
            $dspl = str_replace(DS, ' ' . DS . ' ', $dspl);
            $ret .= '<div class="file_tree_path"><strong>JROOT</strong>' . BR . $dspl . '</div>';
            $fileTree->setDir($dir);
            $ret .= $fileTree->startTree();
            $ret .= $fileTree->drawTree();
            $ret .= $fileTree->endTree();
        } else {
            if (JFile::exists($dir)) {
                $show = true;
                foreach ($project->copies as $test) {
                    if (strpos($dir, $test)) {
                        $show = false;
                    }
                }
                //foreach
                if (!$show) {
                    continue;
                }
                //-- This shows a single file not included in anterior directory list ;) - hi plugins...
                $fileName = JFile::getName(JPath::clean($dir));
                $dirName = substr($dir, 0, strlen($dir) - strlen($fileName));
                $oldDir = isset($oldDir) ? $oldDir : '';
                if ($dirName != $oldDir) {
                    $dspl = str_replace(JPATH_ROOT . DS, '', $dirName);
                    $ret .= '<div class="file_tree_path"><strong>JROOT</strong>' . BR . $dspl . '</div>';
                }
                $oldDir = $dirName;
                if (!isset($fileTree)) {
                    $fileTree = new EcrFileTree($dir, "javascript:", $javascript);
                } else {
                    $fileTree->setDir($dir);
                }
                $ret .= $fileTree->startTree();
                $ret .= $fileTree->getLink($dirName, $fileName);
                $ret .= $fileTree->endTree();
                $ret .= '<br />';
            }
        }
    }
    //foreach
    return $ret;
}