* Code for task#45080.

This commit is contained in:
xieqiyu
2021-11-29 21:28:42 +08:00
parent 0cf53a32e0
commit 84baf0c896
+5 -4
View File
@@ -28,8 +28,6 @@ function loadProduct(productID)
oldProductID = $('#product').val();
loadProductBranches(productID)
loadProductModules(productID);
loadProductPlans(productID);
}
function loadBranch()
@@ -44,7 +42,7 @@ function loadProductBranches(productID)
{
$('#branch').remove();
$('#branch_chosen').remove();
$.get(createLink('branch', 'ajaxGetBranches', "productID=" + productID), function(data)
$.get(createLink('branch', 'ajaxGetBranches', "productID=" + productID + "&oldBranch=0&param=&projectID=" + executionID), function(data)
{
var $product = $('#product');
var $inputGroup = $product.closest('.input-group');
@@ -55,12 +53,15 @@ function loadProductBranches(productID)
$('#branch').css('width', config.currentMethod == 'create' ? '120px' : '65px').chosen();
}
$inputGroup.fixInputGroup();
loadProductModules(productID, $('#branch').val());
loadProductPlans(productID, $('#branch').val());
})
}
function loadProductModules(productID, branch)
{
if(typeof(branch) == 'undefined') branch = 0;
if(typeof(branch) == 'undefined') branch = $('#branch').val();
if(!branch) branch = 0;
var moduleLink = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=story&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=&needManage=true');
var $moduleIDBox = $('#moduleIdBox');