Skip to content

Commit e8a0e43

Browse files
authored
Merge branch 'master' into oidc-core-implementation
2 parents 6ef385b + c9b9b46 commit e8a0e43

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,11 @@ and lead the development of Gitea.
293293
To honor the past owners, here's the history of the owners and the time
294294
they served:
295295

296+
* 2021-01-01 ~ 2021-12-31 - https://github.com/go-gitea/gitea/issues/13801
297+
* [Lunny Xiao](https://gitea.com/lunny) <[email protected]>
298+
* [Lauris Bukšis-Haberkorns](https://gitea.com/lafriks) <[email protected]>
299+
* [Matti Ranta](https://gitea.com/techknowlogick) <[email protected]>
300+
296301
* 2020-01-01 ~ 2020-12-31 - https://github.com/go-gitea/gitea/issues/9230
297302
* [Lunny Xiao](https://gitea.com/lunny) <[email protected]>
298303
* [Lauris Bukšis-Haberkorns](https://gitea.com/lafriks) <[email protected]>

templates/repo/issue/branch_selector_field.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
</div>
3232
</div>
3333
</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}}">
3535
{{if .Issue.Ref}}
3636
<div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{$.i18n.Tr "repo.clear_ref"}}</a></strong></div>
3737
{{end}}
3838
{{range .Branches}}
3939
<div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector">{{.}}</div>
4040
{{end}}
4141
</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">
4343
{{if .Issue.Ref}}
4444
<div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{.i18n.Tr "repo.clear_ref"}}</a></strong></div>
4545
{{end}}

web_src/js/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,15 @@ function initEditForm() {
111111
function initBranchSelector() {
112112
const $selectBranch = $('.ui.select-branch');
113113
const $branchMenu = $selectBranch.find('.reference-list-menu');
114+
const $isNewIssue = $branchMenu.hasClass('new-issue');
114115
$branchMenu.find('.item:not(.no-select)').click(function () {
115116
const selectedValue = $(this).data('id');
116117
const editMode = $('#editing_mode').val();
117118
$($(this).data('id-selector')).val(selectedValue);
119+
if ($isNewIssue) {
120+
$selectBranch.find('.ui .branch-name').text($(this).data('name'));
121+
return;
122+
}
118123

119124
if (editMode === 'true') {
120125
const form = $('#update_issueref_form');

0 commit comments

Comments
 (0)