* adjust for editor.

This commit is contained in:
wangyidong
2023-03-09 11:30:39 +08:00
parent 99f54fc955
commit 4549e19e5d
3 changed files with 13 additions and 3 deletions
+2
View File
@@ -50,6 +50,8 @@ class editor extends control
*/
public function extend($moduleDir = '')
{
if(!isset($this->lang->{$moduleDir}->common)) $this->app->loadLang($moduleDir);
$moduleFiles = $this->editor->getModuleFiles($moduleDir);
$this->view->module = $moduleDir;
$this->view->tree = $this->editor->printTree($moduleFiles);
+1
View File
@@ -3,3 +3,4 @@ body{padding-bottom:0px;background-color:#fff;}
.collapsable > ul {display: block!important}
.tree li:before {margin-right: 4px;}
.tree li>a{display:inline;}
.main-content{padding: 0px; padding-top: 20px;}
+10 -3
View File
@@ -25,6 +25,7 @@ class editorModel extends model
foreach($this->config->editor->sort as $name)
{
$moduleFullFile = $modulePath . $name;
if(!file_exists($moduleFullFile)) continue;
if($name == 'control.php' or $name == 'model.php')
{
$allModules[$modulePath][$moduleFullFile] = $this->analysis($moduleFullFile);
@@ -204,9 +205,15 @@ class editorModel extends model
{
$tree = '';
$fileName = basename($filePath);
$file = "<span title='$fileName'>$fileName</span>";
if(isset($this->lang->editor->modules[$fileName])) $file = "<span title='$fileName'>" . $this->lang->editor->modules[$fileName] . '</span>';
if(isset($this->lang->editor->translate[$fileName])) $file = "<span title='$fileName'>" . $this->lang->editor->translate[$fileName] . '</span>';
if(isset($this->lang->editor->translate[$fileName]))
{
$file = "<span title='$fileName'>" . $this->lang->editor->translate[$fileName] . '</span>';
}
else
{
$moduleName = zget($this->lang->editor->modules, $fileName, isset($this->lang->{$fileName}->common) ? $this->lang->{$fileName}->common : $fileName);
$file = "<span title='{$fileName}'>{$moduleName}</span>";
}
if(strpos($filePath, DS . 'ext' . DS) !== false)
{