fix branch selector on new issue page (#14194)
fix #14185 Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
ef825bd242
commit
b003116fca
2 changed files with 7 additions and 2 deletions
|
@ -111,10 +111,15 @@ function initEditForm() {
|
|||
function initBranchSelector() {
|
||||
const $selectBranch = $('.ui.select-branch');
|
||||
const $branchMenu = $selectBranch.find('.reference-list-menu');
|
||||
const $isNewIssue = $branchMenu.hasClass('new-issue');
|
||||
$branchMenu.find('.item:not(.no-select)').click(function () {
|
||||
const selectedValue = $(this).data('id');
|
||||
const editMode = $('#editing_mode').val();
|
||||
$($(this).data('id-selector')).val(selectedValue);
|
||||
if ($isNewIssue) {
|
||||
$selectBranch.find('.ui .branch-name').text($(this).data('name'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (editMode === 'true') {
|
||||
const form = $('#update_issueref_form');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue