From 452f8375111763cb23a451a8a0a40375888fe049 Mon Sep 17 00:00:00 2001 From: liugang Date: Tue, 8 Aug 2023 17:49:20 +0800 Subject: [PATCH] - testcase: remove unused method. --- module/testcase/control.php | 74 ------------------------------------- 1 file changed, 74 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 48f5e9faa3..1a026bf178 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -2650,80 +2650,6 @@ class testcase extends control die($output); } - /** - * Ajax get option menu. - * - * @param int $rootID - * @param string $viewType - * @param int $branch - * @param int $rootModuleID - * @param string $returnType - * @param string $fieldID - * @param bool $needManage - * @param string $extra - * @param int $currentModuleID - * @access public - * @return void - */ - public function ajaxGetOptionMenu($rootID, $viewType = 'story', $branch = 0, $rootModuleID = 0, $returnType = 'html', $fieldID = '', $needManage = false, $extra = '', $currentModuleID = 0) - { - $this->loadModel('tree'); - - if($viewType == 'task') - { - $optionMenu = $this->tree->getTaskOptionMenu($rootID, 0, 0, $extra); - } - else - { - $optionMenu = $this->tree->getOptionMenu($rootID, $viewType, $rootModuleID, $branch); - } - - if($returnType == 'html') - { - if($viewType == 'line') - { - $lineID = $this->dao->select('id')->from(TABLE_MODULE)->where('type')->eq('line')->andWhere('deleted')->eq(0)->orderBy('id_desc')->limit(1)->fetch('id'); - $output = html::select("line", $optionMenu, $lineID, "class='form-control'"); - $output .= ""; - $output .= html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=$viewType¤tModuleID=0&branch=$branch", '', true), $viewType == 'line' ? $this->lang->tree->manageLine : $this->lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'"); - $output .= ''; - } - else - { - $changeFunc = ''; - if($viewType == 'bug' or $viewType == 'case') $changeFunc = "onchange='loadModuleRelatedNew()'"; - if($viewType == 'task') $changeFunc = ""; - $field = $fieldID ? "modules[$fieldID]" : 'module'; - - $currentModule = $this->tree->getById($currentModuleID); - $currentModuleID = (isset($currentModule->branch) and $currentModule->branch == 0) ? $currentModuleID : 0; - - $output = html::select("$field", $optionMenu, $currentModuleID, "class='form-control' $changeFunc"); - if(count($optionMenu) == 1 and $needManage) - { - $output .= ""; - $output .= html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=$viewType¤tModuleID=0&branch=$branch", '', true), $this->lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'"); - $output .= '  '; - $output .= html::a("javascript:void(0)", $this->lang->refreshIcon, '', "class='refresh' onclick='loadProductModulesNew($rootID)'"); - $output .= ''; - } - } - die($output); - } - - if($returnType == 'mhtml') - { - $changeFunc = ''; - if($viewType == 'bug' or $viewType == 'case') $changeFunc = "onchange='loadModuleRelatedNew()'"; - if($viewType == 'task') $changeFunc = ""; - $field = $fieldID ? "modules[$fieldID]" : 'module'; - $output = html::select("$field", $optionMenu, '', "class='input' $changeFunc"); - die($output); - } - - if($returnType == 'json') die(json_encode($optionMenu)); - } - /** * Ajax get scenes. *