File tree 2 files changed +7
-2
lines changed 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 31
31
</div>
32
32
</div>
33
33
</div>
34
- <div id="branch-list" class="scrolling menu reference-list-menu">
34
+ <div id="branch-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}} ">
35
35
{{if .Issue.Ref}}
36
36
<div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{$.i18n.Tr "repo.clear_ref"}}</a></strong></div>
37
37
{{end}}
38
38
{{range .Branches}}
39
39
<div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector">{{.}}</div>
40
40
{{end}}
41
41
</div>
42
- <div id="tag-list" class="scrolling menu reference-list-menu" style="display: none">
42
+ <div id="tag-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}} " style="display: none">
43
43
{{if .Issue.Ref}}
44
44
<div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{.i18n.Tr "repo.clear_ref"}}</a></strong></div>
45
45
{{end}}
Original file line number Diff line number Diff line change @@ -111,10 +111,15 @@ function initEditForm() {
111
111
function initBranchSelector ( ) {
112
112
const $selectBranch = $ ( '.ui.select-branch' ) ;
113
113
const $branchMenu = $selectBranch . find ( '.reference-list-menu' ) ;
114
+ const $isNewIssue = $branchMenu . hasClass ( 'new-issue' ) ;
114
115
$branchMenu . find ( '.item:not(.no-select)' ) . click ( function ( ) {
115
116
const selectedValue = $ ( this ) . data ( 'id' ) ;
116
117
const editMode = $ ( '#editing_mode' ) . val ( ) ;
117
118
$ ( $ ( this ) . data ( 'id-selector' ) ) . val ( selectedValue ) ;
119
+ if ( $isNewIssue ) {
120
+ $selectBranch . find ( '.ui .branch-name' ) . text ( $ ( this ) . data ( 'name' ) ) ;
121
+ return ;
122
+ }
118
123
119
124
if ( editMode === 'true' ) {
120
125
const form = $ ( '#update_issueref_form' ) ;
You can’t perform that action at this time.
0 commit comments