+ [task#137378,dong,1h] add loadBranches.

This commit is contained in:
liumengyi
2025-02-17 15:40:46 +08:00
committed by 刘刚
parent a5a44a939a
commit e0382e6efe
+20
View File
@@ -195,6 +195,26 @@ window.loadBranches = function(product)
if(typeof projectID == 'undefined') projectID = 0;
$.getJSON($.createLink('branch', 'ajaxGetBranches', "productID=" + currentProduct + "&oldBranch=&param=active&projectID=" + projectID + "&withMainBranch=true&isTwins=no&fieldID=0&multiple=&charterID=" + charterID), function(data)
{
if(data.length > 0)
{
let chosenBranches = [];
$('[name^=product][value="' + currentProduct + '"]').closest('.productBox').find('[name^="branch"]').each(function()
{
if(!isNaN($(this).val()) && $(this).val() !== '') chosenBranches.push($(this).val().toString());
});
}
else
{
if(objectType == 'roadmap')
{
loadRoadmap(product);
}
else
{
loadPlan(product);
}
updateItems();
}
});
}