* fix a bug #689.

This commit is contained in:
wangyidong
2015-04-14 11:07:48 +08:00
parent 614580a026
commit ab3c3a6fbf
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -10,13 +10,13 @@ function loadProduct(productID)
function loadProductModules(productID)
{
moduleLink = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=story&rootModuleID=0&returnType=html&needManage=true');
$('#moduleIdBox').load(moduleLink);
$('#moduleIdBox').load(moduleLink, function(){$('#moduleIdBox #module').chosen(defaultChosenOptions);});
}
function loadProductPlans(productID)
{
planLink = createLink('product', 'ajaxGetPlans', 'productID=' + productID + '&planID=' + $('#plan').val() + '&needCreate=true');
$('#planIdBox').load(planLink);
$('#planIdBox').load(planLink, function(){$('#planIdBox #plan').chosen(defaultChosenOptions);});
}
$(function()
+3 -1
View File
@@ -299,7 +299,9 @@ class tree extends control
}
if($returnType == 'html')
{
$output = html::select("module", $optionMenu, '', "onchange='loadModuleRelated()' class='form-control'");
$changeFunc = '';
if($viewType == 'task' or $viewType == 'bug' or $viewType == 'testcase') $changeFunc = "onchange='loadModuleRelated()'";
$output = html::select("module", $optionMenu, '', "class='form-control' $changeFunc");
if(count($optionMenu) == 1 and $needManage)
{
$output .= "<span class='input-group-addon'>";