Skip to content

Commit defbb95

Browse files
committed
fix: use fomanticQuery instead of jquery
1 parent 72d9f96 commit defbb95

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

web_src/js/features/repo-delete-file.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import $ from 'jquery';
1+
import {fomanticQuery} from '../modules/fomantic/base.ts';
22

33
export function initRepoDeleteFile() {
44
const deleteButton = document.querySelector('#delete-file-button');
@@ -11,12 +11,12 @@ export function initRepoDeleteFile() {
1111

1212
deleteButton.addEventListener('click', (e) => {
1313
e.preventDefault();
14-
$(deleteModal).modal('show');
14+
fomanticQuery(deleteModal).modal('show');
1515
});
1616

1717
// Handle form submission
1818
deleteForm.addEventListener('submit', () => {
19-
$(deleteModal).modal('hide');
19+
fomanticQuery(deleteModal).modal('hide');
2020
});
2121

2222
// Handle commit choice radio buttons

web_src/js/features/repo-editor-commit.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import $ from 'jquery';
1+
import {fomanticQuery} from '../modules/fomantic/base.ts';
22

33
export function initRepoEditorCommit() {
44
const commitButton = document.querySelector('#commit-changes-button');
@@ -71,12 +71,12 @@ export function initRepoEditorCommit() {
7171
// Position it inside the modal using CSS
7272
commitFormFields.classList.add('commit-form-in-modal');
7373
}
74-
$(commitModal).modal('show');
74+
fomanticQuery(commitModal).modal('show');
7575
}
7676
});
7777

7878
// When modal closes, hide the form fields again
79-
$(commitModal).modal({
79+
fomanticQuery(commitModal).modal({
8080
onHidden: () => {
8181
if (commitFormFields) {
8282
commitFormFields.style.display = 'none';
@@ -89,14 +89,14 @@ export function initRepoEditorCommit() {
8989
const closeButton = document.querySelector('#commit-modal-close-btn');
9090
if (closeButton) {
9191
closeButton.addEventListener('click', () => {
92-
$(commitModal).modal('hide');
92+
fomanticQuery(commitModal).modal('hide');
9393
});
9494
}
9595

9696
// Handle form submission - close modal after submit
9797
if (elForm) {
9898
elForm.addEventListener('submit', () => {
99-
$(commitModal).modal('hide');
99+
fomanticQuery(commitModal).modal('hide');
100100
});
101101
}
102102
}

0 commit comments

Comments
 (0)