[v11.0/forgejo] fix(ui): make tag dropdown clickable again (#7559)

**Backport:** https://codeberg.org/forgejo/forgejo/pulls/7558

- forgejo/forgejo#7187 removed the usage of `reference column` class names, however some javascript code depended on it. Adjust this code to instead use the new class `branch-tag-item`.
- Ref: forgejo/forgejo#7187

## Testing

- visit a compare tag page
- see it is possible search for a tag
   ![image](/attachments/8006fc35-96d0-49ad-94d4-078030cb2323)

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7559
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
This commit is contained in:
forgejo-backport-action 2025-04-16 12:32:18 +00:00 committed by Earl Warren
parent ecdb814dd8
commit 308810cdd1
2 changed files with 2 additions and 2 deletions

View file

@ -58,7 +58,7 @@ export function initRepoCloneLink() {
export function initRepoCommonBranchOrTagDropdown(selector) {
$(selector).each(function () {
const $dropdown = $(this);
$dropdown.find('.reference.column').on('click', function () {
$dropdown.find('.branch-tag-item').on('click', function () {
hideElem($dropdown.find('.scrolling.reference-list-menu'));
showElem($($(this).data('target')));
return false;

View file

@ -72,7 +72,7 @@ export function initRepoCommentForm() {
$selectBranch.find('.ui .branch-name').text(selectedValue);
}
});
$selectBranch.find('.reference.column').on('click', function () {
$selectBranch.find('.branch-tag-item').on('click', function () {
hideElem($selectBranch.find('.scrolling.reference-list-menu'));
$selectBranch.find('.reference .text').removeClass('black');
showElem($($(this).data('target')));