* [task#132865] add load system js mehod.

This commit is contained in:
liyang
2024-11-25 10:21:04 +08:00
committed by 曹延义
parent 0586a388df
commit 8de431d325
2 changed files with 19 additions and 0 deletions
+16
View File
@@ -31,6 +31,22 @@ window.loadBranches = function(productID)
}, 'json');
}
window.loadSystem = function(productID)
{
productID = parseInt(productID);
if(!productID) productID = $('input[name=product]').val();
if(typeof(productID) == "undefined") return;
$.get($.createLink('build', 'ajaxGetSystemList', 'productID=' + productID), function(data)
{
if(data)
{
const $systemPicker = $('[name=system]').zui('picker');
$systemPicker.render({items: data});
}
}, 'json');
}
window.setSystemBox = function(e)
{
const newSystem = $(e.target).is(':checked') ? 1 : 0;
+3
View File
@@ -63,6 +63,7 @@ $().ready(function()
}
});
loadBranches();
loadSystem();
if(multipleProject)
{
window.waitDom('[name=execution]', function()
@@ -99,6 +100,7 @@ function loadProducts(executionID)
$('select[name^=builds]').attr('data-placeholder', multipleSelect);
loadBranches(productID);
loadSystem(productID);
}
else
{
@@ -109,6 +111,7 @@ function loadProducts(executionID)
});
loadLastBuild();
loadSystem();
}
/**