File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 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 @@ -112,10 +112,15 @@ function initEditForm() {
112
112
function initBranchSelector ( ) {
113
113
const $selectBranch = $ ( '.ui.select-branch' ) ;
114
114
const $branchMenu = $selectBranch . find ( '.reference-list-menu' ) ;
115
+ const $isNewIssue = $branchMenu . hasClass ( 'new-issue' ) ;
115
116
$branchMenu . find ( '.item:not(.no-select)' ) . click ( function ( ) {
116
117
const selectedValue = $ ( this ) . data ( 'id' ) ;
117
118
const editMode = $ ( '#editing_mode' ) . val ( ) ;
118
119
$ ( $ ( this ) . data ( 'id-selector' ) ) . val ( selectedValue ) ;
120
+ if ( $isNewIssue ) {
121
+ $selectBranch . find ( '.ui .branch-name' ) . text ( $ ( this ) . data ( 'name' ) ) ;
122
+ return ;
123
+ }
119
124
120
125
if ( editMode === 'true' ) {
121
126
const form = $ ( '#update_issueref_form' ) ;
You can’t perform that action at this time.
0 commit comments