* Adjust menu for onlyTest.
This commit is contained in:
@@ -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¶m=%s") : helper::createLink($module, $method, "rootID=%s&branch=&type=byModule¶m=%s");
|
||||
$this->view->viewType = $viewType;
|
||||
$this->view->modules = $modules;
|
||||
$this->view->modulesPinyin = $modulesPinyin;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get modules.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user