diff options
author | Yarden Shoham <git@yardenshoham.com> | 2024-03-29 22:24:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-29 20:24:17 +0100 |
commit | 42870cf40278e84024ccea41368312451f79a4d6 (patch) | |
tree | cf13ff6fb80421e82a82d32d3c0c4d09e773716b /web_src | |
parent | c487a32bcd093affe3284282ea279d97f52a867f (diff) | |
download | gitea-42870cf40278e84024ccea41368312451f79a4d6.tar.gz gitea-42870cf40278e84024ccea41368312451f79a4d6.zip |
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>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/features/repo-editor.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/features/repo-editor.js b/web_src/js/features/repo-editor.js index fc951750a9..01dc4b95aa 100644 --- a/web_src/js/features/repo-editor.js +++ b/web_src/js/features/repo-editor.js @@ -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; }, }); |