aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2024-02-25 07:07:23 +0200
committerGitHub <noreply@github.com>2024-02-25 05:07:23 +0000
commit4e3d81e44ee3f504f7262966533305561e04101f (patch)
tree1e78fb19775e9fe0e45e09f6c4f89ecc05674d42 /web_src/js/features
parent1f6de13897fa0ac74087b2d1ec00cbef06caf2f7 (diff)
downloadgitea-4e3d81e44ee3f504f7262966533305561e04101f.tar.gz
gitea-4e3d81e44ee3f504f7262966533305561e04101f.zip
Remove jQuery from the code diff expansion buttons (#29385)
- Removed all jQuery AJAX calls and replaced with htmx - Tested the code diff expansion buttons functionality and it works as before plus a loading indicator # Demo using `htmx` instead of jQuery AJAX ![action](https://github.com/go-gitea/gitea/assets/20454870/afba7442-ed56-4d39-b764-835d1f6c3a9c) Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Diffstat (limited to 'web_src/js/features')
-rw-r--r--web_src/js/features/repo-code.js8
1 files changed, 0 insertions, 8 deletions
diff --git a/web_src/js/features/repo-code.js b/web_src/js/features/repo-code.js
index a142313211..c4a81ea165 100644
--- a/web_src/js/features/repo-code.js
+++ b/web_src/js/features/repo-code.js
@@ -186,14 +186,6 @@ export function initRepoCodeView() {
$(document).on('click', '.fold-file', ({currentTarget}) => {
invertFileFolding(currentTarget.closest('.file-content'), currentTarget);
});
- $(document).on('click', '.code-expander-button', async ({currentTarget}) => {
- const url = currentTarget.getAttribute('data-url');
- const query = currentTarget.getAttribute('data-query');
- const anchor = currentTarget.getAttribute('data-anchor');
- if (!url) return;
- const blob = await $.get(`${url}?${query}&anchor=${anchor}`);
- currentTarget.closest('tr').outerHTML = blob;
- });
$(document).on('click', '.copy-line-permalink', async ({currentTarget}) => {
await clippie(toAbsoluteUrl(currentTarget.getAttribute('data-url')));
});