fix(ui): make tag dropdown clickable again (#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)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7558
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
Gusted 2025-04-16 12:28:39 +00:00 committed by Earl Warren
parent 1b0e3c717f
commit 5c1c514361
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')));