From ca81c5afbabbdcebe03cedf1ed376c35a4b9508b Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 12 May 2022 09:09:41 +0800 Subject: [PATCH 1/3] * Fix bug #22370. --- module/tree/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/tree/model.php b/module/tree/model.php index e7da456a9d..e9f0eb6be8 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -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); From c4b076c3d84d9907665387376295d98a66368685 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 12 May 2022 09:44:12 +0800 Subject: [PATCH 2/3] * Fix bug #22372. --- module/doc/css/objectlibs.css | 1 + module/doc/css/tablecontents.css | 3 +++ 2 files changed, 4 insertions(+) diff --git a/module/doc/css/objectlibs.css b/module/doc/css/objectlibs.css index 71a6036c15..01c2431ed2 100644 --- a/module/doc/css/objectlibs.css +++ b/module/doc/css/objectlibs.css @@ -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;} diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css index 9cd6f9101e..c00c63eff2 100644 --- a/module/doc/css/tablecontents.css +++ b/module/doc/css/tablecontents.css @@ -23,10 +23,12 @@ 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;} @@ -36,5 +38,6 @@ span.dotted-line+a {display: block;} .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;} .sortDoc>.tail-info{right: 20px;} .sortDoc>.tree-actions{position: absolute; right: 0px; background: #fff;} From 10e48b66d9fc8c3056166a722577c2cc3e32bc84 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 12 May 2022 15:50:05 +0800 Subject: [PATCH 3/3] * Fix bug #22378. --- module/doc/css/tablecontents.css | 7 +------ module/doc/model.php | 20 +------------------- module/doc/view/side.html.php | 1 + 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css index c00c63eff2..8e12dc7d0f 100644 --- a/module/doc/css/tablecontents.css +++ b/module/doc/css/tablecontents.css @@ -31,13 +31,8 @@ span.dotted-line+a {display: block;} .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;} -.sortable-sorting .tree-group:hover .tree-actions {display: none;} -.sortDoc>.tail-info{right: 20px;} -.sortDoc>.tree-actions{position: absolute; right: 0px; background: #fff;} diff --git a/module/doc/model.php b/module/doc/model.php index 87f9a94b0c..73acea6885 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -2417,12 +2417,6 @@ EOT; if($currentMethod == 'tablecontents') { $treeMenu[0] .= '
' . zget($users, $doc->editedBy) . '  ' . $doc->editedDate . ''; - if(common::hasPriv('doc', 'updateOrder')) - { - $treeMenu[0] .= "
"; - $treeMenu[0] .= html::a('javascript:;', "", '', "title='{$this->lang->doc->updateOrder}' class='sortDoc'"); - $treeMenu[0] .= '
'; - } } if($currentMethod == 'objectlibs') { @@ -2495,12 +2489,6 @@ EOT; if($currentMethod == 'tablecontents') { $treeMenu[$module->id] .= '
' . zget($users, $doc->editedBy) . '  ' . $doc->editedDate . ''; - if(common::hasPriv('doc', 'updateOrder')) - { - $treeMenu[$module->id] .= "
"; - $treeMenu[$module->id] .= html::a('javascript:;', "", '', "title='{$this->lang->doc->updateOrder}' class='sortDoc'"); - $treeMenu[$module->id] .= '
'; - } } if($currentMethod == 'objectlibs') @@ -2535,13 +2523,7 @@ EOT; else { $li = "
" . $module->name . ''; - if($currentMethod == 'tablecontents' and common::hasPriv('tree', 'updateOrder')) - { - $li .= "
"; - $li .= html::a('javascript:;', "", '', "title='{$this->lang->doc->updateOrder}' class='sortModule'"); - $li .= '
'; - } - else + if($currentMethod != 'tablecontents') { if(common::hasPriv('tree', 'edit') or common::hasPriv('tree', 'browse') or common::hasPriv('tree', 'browse') or common::hasPriv('tree', 'updateOrder')) { diff --git a/module/doc/view/side.html.php b/module/doc/view/side.html.php index 701393f393..17ac0cbdf7 100644 --- a/module/doc/view/side.html.php +++ b/module/doc/view/side.html.php @@ -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;}