mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-19 20:00:03 +02:00
chore: enable no-jquery/no-trigger
- A lot of substitution to `.requestSubmit()`. - Where possible, rewrite some other jquery to vanilla javascript to ease the linter fix.
This commit is contained in:
parent
c124014115
commit
9420d3d0a5
9 changed files with 34 additions and 31 deletions
|
@ -57,7 +57,7 @@ export function initGlobalEnterQuickSubmit() {
|
|||
export function initGlobalButtonClickOnEnter() {
|
||||
$(document).on('keypress', 'div.ui.button,span.ui.button', (e) => {
|
||||
if (e.code === ' ' || e.code === 'Enter') {
|
||||
$(e.target).trigger('click');
|
||||
e.target.click();
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
@ -314,7 +314,7 @@ export function initGlobalLinkActions() {
|
|||
closable: false,
|
||||
onApprove: async () => {
|
||||
if ($this.data('type') === 'form') {
|
||||
$($this.data('form')).trigger('submit');
|
||||
document.querySelector($this.data('form')).requestSubmit();
|
||||
return;
|
||||
}
|
||||
if ($this[0].getAttribute('hx-confirm')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue