0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-28 01:58:20 +01:00

Remove jQuery class from the commit button (#30178)

- Switched from jQuery class functions to plain JavaScript `classList`
- Tested the commit button disabled toggling functionality and it works
as before

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
Yarden Shoham 2024-03-29 22:24:17 +03:00 committed by GitHub
parent c487a32bcd
commit 42870cf402
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -147,8 +147,8 @@ export function initRepoEditor() {
silent: true,
dirtyClass: dirtyFileClass,
fieldSelector: ':input:not(.commit-form-wrapper :input)',
change() {
const dirty = $(this).hasClass(dirtyFileClass);
change($form) {
const dirty = $form[0]?.classList.contains(dirtyFileClass);
commitButton.disabled = !dirty;
},
});