mirror of
https://github.com/go-gitea/gitea
synced 2025-02-01 00:37:46 +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}}
|
{{template "repo/diff/conversation" dict "." $ "comments" $line.Comments}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -19,6 +19,7 @@ import {
|
|||||||
import {POST, GET} from '../modules/fetch.ts';
|
import {POST, GET} from '../modules/fetch.ts';
|
||||||
import {fomanticQuery} from '../modules/fomantic/base.ts';
|
import {fomanticQuery} from '../modules/fomantic/base.ts';
|
||||||
import {createTippy} from '../modules/tippy.ts';
|
import {createTippy} from '../modules/tippy.ts';
|
||||||
|
import {initGlobalDropdown} from './common-page.ts';
|
||||||
|
|
||||||
const {pageData, i18n} = window.config;
|
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) {
|
$(document).on('click', '.resolve-conversation', async function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const comment_id = $(this).data('comment-id');
|
const comment_id = $(this).data('comment-id');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user