* Adjust menu for onlyTest.

This commit is contained in:
daitingting
2017-05-12 14:45:57 +08:00
parent ff5b0639ed
commit b378b53307
20 changed files with 471 additions and 72 deletions
+31
View File
@@ -352,6 +352,37 @@ class tree extends control
if($returnType == 'json') die(json_encode($optionMenu));
}
/**
* Ajax get drop menu.
*
* @param int $rootID
* @param string $module
* @param string $method
* @param string $extra
* @access public
* @return void
*/
public function ajaxGetDropMenu($rootID, $module, $method, $extra)
{
$this->view->productID = $rootID;
$this->view->module = $module;
$this->view->method = $method;
$this->view->extra = $extra;
if($module == 'bug') $viewType = 'bug';
if($module == 'testcase') $viewType = 'case';
if($module == 'testsuite') $viewType = 'caselib';
$modules = $this->tree->getOptionMenu($rootID, $viewType);
$modulesPinyin = common::convert2Pinyin($modules);
$this->view->link = $viewType == 'caselib' ? helper::createLink($module, $method, "rootID=%s&type=byModule&param=%s") : helper::createLink($module, $method, "rootID=%s&branch=&type=byModule&param=%s");
$this->view->viewType = $viewType;
$this->view->modules = $modules;
$this->view->modulesPinyin = $modulesPinyin;
$this->display();
}
/**
* AJAX: get modules.
*