mirror of
https://github.com/go-gitea/gitea
synced 2025-01-31 21:58:19 +01:00
chore: fix the comment context menu drop down
This commit is contained in:
parent
d36fece725
commit
5d9651b8ed
@ -126,6 +126,13 @@
|
||||
{{template "repo/diff/conversation" dict "." $ "comments" $line.Comments}}
|
||||
</td>
|
||||
</tr>
|
||||
<button class="pull-request-diff-comments hidden"></button>
|
||||
<script class="pull-request-diff-comments">
|
||||
var $buttons = document.querySelector('button.pull-request-diff-comments');
|
||||
if ($buttons) {
|
||||
$buttons.click();
|
||||
}
|
||||
</script>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
@ -19,6 +19,7 @@ import {
|
||||
import {POST, GET} from '../modules/fetch.ts';
|
||||
import {fomanticQuery} from '../modules/fomantic/base.ts';
|
||||
import {createTippy} from '../modules/tippy.ts';
|
||||
import {initGlobalDropdown} from './common-page.ts';
|
||||
|
||||
const {pageData, i18n} = window.config;
|
||||
|
||||
@ -94,6 +95,13 @@ function initRepoDiffConversationForm() {
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.pull-request-diff-comments', async (e) => {
|
||||
e.preventDefault();
|
||||
initGlobalDropdown();
|
||||
// post initiation cleaning up the buttons and scripts
|
||||
$('.pull-request-diff-comments').remove();
|
||||
});
|
||||
|
||||
$(document).on('click', '.resolve-conversation', async function (e) {
|
||||
e.preventDefault();
|
||||
const comment_id = $(this).data('comment-id');
|
||||
|
Loading…
x
Reference in New Issue
Block a user