summaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/index.js5
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');