mirror of
1
Fork 0

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>
(cherry picked from commit 42870cf40278e84024ccea41368312451f79a4d6)
This commit is contained in:
Yarden Shoham 2024-03-29 22:24:17 +03:00 committed by Gergely Nagy
parent ecc78da55a
commit 0f1bd1be06
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

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