diff --git a/module/story/view/header.html.php b/module/story/view/header.html.php index 5ddaecc4e7..45f6b5645b 100644 --- a/module/story/view/header.html.php +++ b/module/story/view/header.html.php @@ -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() diff --git a/module/tree/control.php b/module/tree/control.php index 560ce2c5e9..f7b1f7bcc9 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -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 .= "";