From ae62bdff75e61eb06999c1c783713c8f6ee1bb62 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 7 Dec 2022 14:19:36 +0800 Subject: [PATCH] * Code for task#78661. --- module/tree/control.php | 8 ++++++++ module/tree/view/edit.html.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/module/tree/control.php b/module/tree/control.php index 90280d30ea..9de9df00ab 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -536,6 +536,14 @@ class tree extends control { $optionMenu = $this->tree->getOptionMenu($rootID, $viewType, $rootModuleID, $branch); } + + if(strpos($extra, 'excludeModuleID') !== false) + { + parse_str($extra, $output); + $excludeModuleID = $output['excludeModuleID']; + if(isset($optionMenu[$excludeModuleID])) unset($optionMenu[$excludeModuleID]); + } + if($returnType == 'html') { //Code for task #5081. diff --git a/module/tree/view/edit.html.php b/module/tree/view/edit.html.php index 861740098a..233893d74e 100644 --- a/module/tree/view/edit.html.php +++ b/module/tree/view/edit.html.php @@ -189,7 +189,7 @@ function loadModules(branch) if(typeof(branchID) == 'undefined') branchID = 0; if(typeof(moduleID) == 'undefined') moduleID = 0; - link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=story&branch=' + branchID + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=¤tModuleID=' + moduleID); + link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=story&branch=' + branchID + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=excludeModuleID=' + id;?> + '¤tModuleID=' + moduleID); $(moduleBox).load(link, function() { $(this).children('select').attr('id', 'parent').attr('name', 'parent');