diff options
author | a1012112796 <1012112796@qq.com> | 2021-01-01 02:32:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-31 13:32:11 -0500 |
commit | b003116fcaf6c1501eb210f7cda83e8f64cbc608 (patch) | |
tree | d2c3bc8f90249501804f47d6ed9ee49dd7c0dc44 /web_src | |
parent | ef825bd242e9f8615007dbd7ddaaa81386ea1048 (diff) | |
download | gitea-b003116fcaf6c1501eb210f7cda83e8f64cbc608.tar.gz gitea-b003116fcaf6c1501eb210f7cda83e8f64cbc608.zip |
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>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/index.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js index 93708e4fdc..ef674ad6a6 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -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'); |