Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into tsj_fixbug
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<div class='text-center'>
|
||||
<?php
|
||||
echo $lang->dev->noteEditor;
|
||||
if(common::hasPriv('editor', 'switch')) echo html::a($this->createLink('editor', 'switch', 'status=1'), $lang->dev->switchList[1], 'hiddenwin', "class='btn btn-primary'");
|
||||
if(common::hasPriv('editor', 'turnon')) echo html::a($this->createLink('editor', 'turnon', 'status=1'), $lang->dev->switchList[1], '', "class='btn btn-primary'");
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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);
|
||||
@@ -195,11 +197,11 @@ class editor extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function switch($status)
|
||||
public function turnon($status)
|
||||
{
|
||||
$this->loadModel('setting')->setItem('system.common.global.editor', $status);
|
||||
|
||||
$link = empty($status) ? $this->createLink('dev', 'editor') : $this->createLink('editor', 'index');
|
||||
return print(js::locate($link, 'parent'));
|
||||
return print(js::locate($link));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
@@ -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)
|
||||
{
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
*/
|
||||
?>
|
||||
<?php include $app->getModuleRoot() . 'dev/view/header.html.php';?>
|
||||
<?php if(common::hasPriv('editor', 'switch')):?>
|
||||
<?php if(common::hasPriv('editor', 'turnon')):?>
|
||||
<div id='mainMenu' class='clearfix menu-secondary'>
|
||||
<div class="pull-left">
|
||||
<?php
|
||||
echo $lang->editor->turnOff;
|
||||
echo html::a($this->createLink('editor', 'switch', 'status=0'), $lang->dev->switchList['0'], 'hiddenwin', "class='btn btn-sm'");
|
||||
echo html::a($this->createLink('editor', 'turnon', 'status=0'), $lang->dev->switchList['0'], '', "class='btn btn-sm'");
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@ $config->mail->fromAddress = ''; // The from address.
|
||||
$config->mail->fromName = ''; // The from name.
|
||||
$config->mail->mta = 'smtp'; // The send mail type.
|
||||
$config->mail->smtp->debug = 0; // Debug level, 0,1,2.
|
||||
$config->mail->smtp->charset = 'utf-8'; // Charset
|
||||
$config->mail->smtp->charset = 'utf-8'; // Charset
|
||||
$config->mail->smtp->auth = true; // Need auth or not. true|false
|
||||
$config->mail->smtp->host = 'localhost';// The smtp server host address.
|
||||
$config->mail->smtp->port = '25'; // The smtp server host port.
|
||||
|
||||
Reference in New Issue
Block a user