* finish task #2395.

This commit is contained in:
wangyidong
2015-11-11 16:15:41 +08:00
parent 4f48349475
commit fd312662cc
2 changed files with 3 additions and 3 deletions

View File

@@ -306,7 +306,7 @@ class tree extends control
if($returnType == 'html')
{
$changeFunc = '';
if($viewType == 'task' or $viewType == 'bug' or $viewType == 'testcase') $changeFunc = "onchange='loadModuleRelated()'";
if($viewType == 'task' or $viewType == 'bug' or $viewType == 'case') $changeFunc = "onchange='loadModuleRelated()'";
$output = html::select("module", $optionMenu, '', "class='form-control' $changeFunc");
if(count($optionMenu) == 1 and $needManage)
{

View File

@@ -171,7 +171,7 @@ class treeModel extends model
{
$modules = $this->dao->select('*')->from(TABLE_MODULE)->where("((root = $rootID and type = 'task') OR (root = $id and type = 'story'))")
->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi()
->orderBy('grade desc, type, `order`')
->orderBy('grade desc, branch, type, `order`')
->fetchAll('id');
}
else
@@ -563,7 +563,7 @@ class treeModel extends model
foreach($modules as $module)
{
if(empty($module->branch)) $paths[$module->id] = $module->id;
if(isset($productGroups[$module->root][$module->branch])) $paths[$module->id] = $module->id;
if(isset($productGroups[$module->root][0]) or isset($productGroups[$module->root][$module->branch])) $paths[$module->id] = $module->id;
}
}