+ [task#137378,dong,2h] add updateItems.

This commit is contained in:
liumengyi
2025-02-17 15:40:46 +08:00
committed by 刘刚
parent cf89e6d9e0
commit c72a232a66
+19
View File
@@ -179,3 +179,22 @@ window.loadRoadmapStories = function(event)
openUrl(link, {load: 'modal', size: 'lg', type: 'iframe'});
}
window.updateItems = function(currentProduct = '', currentBranch = '')
{
if($("[name^='product']").length == 0) return;
let chosenProducts = [];
$(".productsBox [name^='product']").each(function()
{
const productID = $(this).val();
if(productID > 0 && chosenProducts.indexOf(productID) == -1) chosenProducts.push(productID);
});
let chosenBranches = {};
if(currentProduct !== '') chosenBranches[currentProduct] = [];
if(currentBranch !== '') chosenBranches[currentProduct].push(currentBranch);
let allItems = zui.Picker.query("[name^='product']").options.items;
let productItems = [];
}