* adjust task #2731.

This commit is contained in:
chenfeiCF
2016-12-04 13:35:40 +08:00
parent cb30979d57
commit a539be0c32
10 changed files with 160 additions and 28 deletions
+19
View File
@@ -323,6 +323,25 @@ class tree extends control
if($returnType == 'json') die(json_encode($optionMenu));
}
/**
* AJAX: get modules.
*
* @param int $productID
* @param string $viewType
* @param int $branchID
* @param int $number
* @access public
* @return string the html select string.
*/
public function ajaxGetModules($productID, $viewType = 'story', $branchID, $number)
{
$modules = $this->tree->getOptionMenu($productID, $viewType, $startModuleID = 0, $branchID);
$moduleName = $viewType == 'bug' ? "modules[$number]" : "module[$number]";
$modules = empty($modules) ? array('' => '') : $modules;
die(html::select($moduleName, $modules, '', 'class=form-control'));
}
/**
* AJAX: get a module's son modules.
*