From 145b1766f75d8cece1dddf544b9d7908700db9ff Mon Sep 17 00:00:00 2001 From: mayue Date: Mon, 11 Apr 2022 15:37:10 +0800 Subject: [PATCH] * Fix bug #17286.* Fix bug #17286.* Fix bug #17286.* Fix bug #17286.* Fix bug #17286.* Fix bug #17286.* Fix bug #17286.* Fix bug #17286. --- module/tree/js/browse.js | 8 ++++++-- module/tree/lang/en.php | 1 + module/tree/lang/zh-cn.php | 1 + module/tree/view/browse.html.php | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/module/tree/js/browse.js b/module/tree/js/browse.js index 2661c9b8ab..6eeed2c869 100644 --- a/module/tree/js/browse.js +++ b/module/tree/js/browse.js @@ -6,7 +6,11 @@ function syncModule(rootID, type) link = createLink('tree', 'ajaxGetSonModules', 'moduleID=' + moduleID + '&rootID=' + rootID + '&type=' + type); $.getJSON(link, function(modules) { - if(modules.length == 0) return false; + if(modules.length == 0) + { + alert(alertCopy); + return false; + } $('.helplink').addClass('hidden'); var $inputgroup = $('
').append($('.col-actions .icon-close:first').closest('.table-row').clone()).html(); @@ -48,7 +52,7 @@ function syncProductOrProject(obj, type) { if(type == 'product') viewType = 'story'; if(type == 'project') viewType = 'task'; - link = createLink('tree', 'ajaxGetOptionMenu', 'rootID=' + obj.value + "&viewType=" + viewType + "&branch=0&rootModuleID=0&returnType=json"); + link = createLink('tree', 'ajaxGetOptionMenu', 'rootID=' + obj.value + "&viewType=" + viewType + "&branch=all&rootModuleID=0&returnType=json"); $.getJSON(link, function(modules) { $('.helplink').addClass('hidden'); diff --git a/module/tree/lang/en.php b/module/tree/lang/en.php index 9b8e08da48..5f78bf6d0c 100644 --- a/module/tree/lang/en.php +++ b/module/tree/lang/en.php @@ -43,6 +43,7 @@ $lang->tree->confirmDelCategory = 'Do you want to delete this category and its c $lang->tree->confirmDeleteLine = "Do you want to delete this {$lang->productCommon} line?"; $lang->tree->confirmRoot = "Any changes to the {$lang->productCommon} will change the stories, bugs, cases of {$lang->productCommon} it belongs to, as well as the linkage of {$lang->executionCommon} and {$lang->productCommon}, which is dangerous. Do you want to change it?"; $lang->tree->confirmRoot4Doc = "Any changes to the library will change the document of library it belongs to, which is dangerous. Do you want to change it?"; +$lang->tree->alertCopy = "There are no copyable submodules under the current module!"; $lang->tree->successSave = 'Saved.'; $lang->tree->successFixed = 'Fixed.'; $lang->tree->repeatName = 'The name "%s" exists!'; diff --git a/module/tree/lang/zh-cn.php b/module/tree/lang/zh-cn.php index 005b9a5b2d..aa85f619e2 100644 --- a/module/tree/lang/zh-cn.php +++ b/module/tree/lang/zh-cn.php @@ -43,6 +43,7 @@ $lang->tree->confirmDelCategory = '该分类及其子分类都会被删除,您 $lang->tree->confirmDeleteLine = "您确定删除该{$lang->productCommon}线吗?"; $lang->tree->confirmRoot = "模块的所属{$lang->productCommon}修改,会关联修改该模块下的{$lang->SRCommon}、Bug、用例的所属{$lang->productCommon},以及{$lang->executionCommon}和{$lang->productCommon}的关联关系。该操作比较危险,请谨慎操作。是否确认修改?"; $lang->tree->confirmRoot4Doc = "修改所属文档库,会同时修改该分类下文档的关联关系。该操作比较危险,请谨慎操作。是否确认修改?"; +$lang->tree->alertCopy = "当前模块下没有可复制的子模块!"; $lang->tree->successSave = '成功保存'; $lang->tree->successFixed = '成功修正数据!'; $lang->tree->repeatName = '模块名“%s”已经存在!'; diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index 84443c4a8c..d88bc7c00a 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -19,6 +19,7 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete] {display: none +tree->alertCopy);?> app->loadLang('doc');?> type) && $root->type != 'normal')) ? true : false;?>