Merge branch 'sprint/tianshujie_fixbug' into 'master'

Sprint/tianshujie fixbug

See merge request easycorp/zentaopms!3368
This commit is contained in:
李玉春
2022-05-12 07:55:25 +00:00
5 changed files with 8 additions and 26 deletions
+1
View File
@@ -48,3 +48,4 @@
.tree-group:hover > .module-name {width: calc(100% - 20px);}
.tree-group:hover .tree-actions {display: block}
.tree li.has-list.open:before {left: 6px;}
.sortable-sorting .tree-group:hover .tree-actions {display: none;}
+3 -5
View File
@@ -23,18 +23,16 @@ span.dotted-line+a {display: block;}
.sortable-sorting .module-name > a {cursor: move;}
.sortable-sorting li >.tree-group {opacity: .5;}
.sortable-sorting li:before {opacity: .3;}
.sortable-sorting .drop-here .tree-group {background-color: #fff3e0;}
.sortable-sorting .drop-here .tree-group > * {opacity: .1;}
.sortable-sorting .drag-shadow .tree-group {opacity: 1!important;}
.sortable-sorting .drag-shadow .tree-actions {visibility: hidden;}
.is-sorting > li:before {opacity: 1;}
.is-sorting > li > .tree-group {opacity: 1; border-radius: 4px;}
.is-sorting > li ul {display: none!important;}
li.drag-shadow ul {display: none!important;}
.tree-group {position: relative;}
.tree-group > .module-name {white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block;}
.tree-group .tree-actions {display: none; position: absolute; right: 0; top: 0; background-color: #fff; white-space: nowrap;}
.tree-group:hover > .module-name {width: calc(100% - 20px);}
.tree-group:hover .tree-actions {display: block}
.tree li.has-list.open:before {left: 6px;}
.sortDoc>.tail-info{right: 20px;}
.sortDoc>.tree-actions{position: absolute; right: 0px; background: #fff;}
+1 -19
View File
@@ -2417,12 +2417,6 @@ EOT;
if($currentMethod == 'tablecontents')
{
$treeMenu[0] .= '<div class="tree-group"><span class="tail-info">' . zget($users, $doc->editedBy) . ' &nbsp;' . $doc->editedDate . '</span>';
if(common::hasPriv('doc', 'updateOrder'))
{
$treeMenu[0] .= "<div class='tree-actions'>";
$treeMenu[0] .= html::a('javascript:;', "<i class='icon icon-move sortDoc'></i>", '', "title='{$this->lang->doc->updateOrder}' class='sortDoc'");
$treeMenu[0] .= '</div>';
}
}
if($currentMethod == 'objectlibs')
{
@@ -2495,12 +2489,6 @@ EOT;
if($currentMethod == 'tablecontents')
{
$treeMenu[$module->id] .= '<div class="tree-group"><span class="tail-info">' . zget($users, $doc->editedBy) . ' &nbsp;' . $doc->editedDate . '</span>';
if(common::hasPriv('doc', 'updateOrder'))
{
$treeMenu[$module->id] .= "<div class='tree-actions'>";
$treeMenu[$module->id] .= html::a('javascript:;', "<i class='icon icon-move sortDoc'></i>", '', "title='{$this->lang->doc->updateOrder}' class='sortDoc'");
$treeMenu[$module->id] .= '</div>';
}
}
if($currentMethod == 'objectlibs')
@@ -2535,13 +2523,7 @@ EOT;
else
{
$li = "<div class='tree-group'><span class='module-name'><a class='sort-module' title='{$module->name}'>" . $module->name . '</a></span>';
if($currentMethod == 'tablecontents' and common::hasPriv('tree', 'updateOrder'))
{
$li .= "<div class='tree-actions'>";
$li .= html::a('javascript:;', "<i class='icon icon-move sortModule'></i>", '', "title='{$this->lang->doc->updateOrder}' class='sortModule'");
$li .= '</div>';
}
else
if($currentMethod != 'tablecontents')
{
if(common::hasPriv('tree', 'edit') or common::hasPriv('tree', 'browse') or common::hasPriv('tree', 'browse') or common::hasPriv('tree', 'updateOrder'))
{
+1
View File
@@ -72,6 +72,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
.sortable-sorting .drag-shadow .tree-actions {visibility: hidden;}
.is-sorting > li > .tree-group {opacity: 1; border-radius: 4px;}
.is-sorting > li ul {display: none!important;}
li.drag-shadow ul {display: none!important;}
</style>
<script>
$(function()
+2 -2
View File
@@ -1573,7 +1573,7 @@ class treeModel extends model
foreach($childs as $moduleID => $moduleName)
{
if(preg_match('/(^\s+$)/', $moduleName)) return print(js::alert($this->lang->tree->shouldNotBlank));
if(preg_match('/(^\s+$)/', $moduleName)) helper::end(js::alert($this->lang->tree->shouldNotBlank));
}
$module = new stdClass();
@@ -1581,7 +1581,7 @@ class treeModel extends model
$module->type = $type;
$module->parent = $parentModuleID;
$repeatName = $this->checkUnique($module, $childs);
if($repeatName) return print(js::alert(sprintf($this->lang->tree->repeatName, $repeatName)));
if($repeatName) helper::end(js::alert(sprintf($this->lang->tree->repeatName, $repeatName)));
$parentModule = $this->getByID($parentModuleID);