add default branchName

This commit is contained in:
lanzongjun
2022-12-07 09:50:09 +08:00
parent e6df8be8a6
commit 15d16d3eb6
2 changed files with 12 additions and 1 deletions
+11
View File
@@ -14,6 +14,12 @@ $().ready(function()
if(data) $('#buildBox').html(data);
$('#builds').attr('data-placeholder', multipleSelect).chosen();
});
$.get(createLink('product', 'ajaxGetProductById', 'produtID=' + productID), function(data)
{
console.log(data.branchName)
$('#branchBox').closest('tr').find('th').text(data.branchName);
}, 'json');
});
$('input[name=isIntegrated]').change(function()
@@ -69,6 +75,11 @@ function loadProducts(executionID)
loadBranches($("#product").val());
}
});
$.get(createLink('product', 'ajaxGetProductById', 'produtID=' + $("#product").val()), function(data)
{
$('#branchBox').closest('tr').find('th').text(data.branchName);
}, 'json');
loadLastBuild();
}
+1 -1
View File
@@ -45,7 +45,7 @@
<td></td>
</tr>
<tr class='<?php if(!empty($product) and $product->type == 'normal') echo 'hidden'?>'>
<th class='w-120px'><?php echo $lang->build->branch;?></th>
<th class='w-120px'><?php echo $product->type == 'normal' ? '' : $lang->product->branchName[$product->type]?></th>
<td>
<div class='input-group' id='branchBox'>
<?php echo html::select('branch[]', $branches, key($product->branches), "class='form-control chosen' multiple required"); ?>