* [task#132865] add load system js mehod.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user