mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
# Preview Tab - Removed the jQuery AJAX call and replaced with our fetch wrapper - Tested the preview tab functionality and it works as before # Diff Tab - Removed the jQuery AJAX call and replaced with htmx - Tested the diff tab functionality and it works as before ## htmx Attributes - `hx-post="{{.RepoLink}}..."`: make a POST request to the endpoint - `hx-indicator=".tab[data-tab='diff']"`: attach the loading indicator to the tab body - `hx-target=".tab[data-tab='diff']"`: target the tab body for swapping with the response - `hx-swap="innerHTML"`: swap the target's inner HTML - `hx-include="#edit_area"`: include the value of the textarea (content) in the request body - `hx-vals='{"context":"{{.BranchLink}}"}'`: include the context in the request body - `hx-params="context,content"`: include only these keys in the request body # Demo using `fetch` and `htmx` instead of jQuery AJAX ![demo](https://github.com/go-gitea/gitea/assets/20454870/585cd6e8-f329-4c9e-ab53-a540acbd7988) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> |
11 months ago | |
---|---|---|
.. | ||
admin | 12 months ago | |
comp | 12 months ago | |
captcha.js | 2 years ago | |
citation.js | 1 year ago | |
clipboard.js | 12 months ago | |
code-frequency.js | 12 months ago | |
codeeditor.js | 1 year ago | |
colorpicker.js | 2 years ago | |
common-global.js | 11 months ago | |
common-issue-list.js | 12 months ago | |
common-issue-list.test.js | 1 year ago | |
common-organization.js | 12 months ago | |
contextpopup.js | 12 months ago | |
contributors.js | 12 months ago | |
copycontent.js | 1 year ago | |
dropzone.js | 2 years ago | |
emoji.js | 1 year ago | |
eventsource.sharedworker.js | 3 years ago | |
file-fold.js | 1 year ago | |
heatmap.js | 1 year ago | |
imagediff.js | 1 year ago | |
install.js | 12 months ago | |
notification.js | 11 months ago | |
org-team.js | 1 year ago | |
pull-view-file.js | 11 months ago | |
recent-commits.js | 12 months ago | |
repo-branch.js | 2 years ago | |
repo-code.js | 12 months ago | |
repo-code.test.js | 1 year ago | |
repo-commit.js | 11 months ago | |
repo-common.js | 12 months ago | |
repo-diff-commit.js | 1 year ago | |
repo-diff-commitselect.js | 2 years ago | |
repo-diff-filetree.js | 2 years ago | |
repo-diff.js | 11 months ago | |
repo-editor.js | 11 months ago | |
repo-findfile.js | 11 months ago | |
repo-findfile.test.js | 1 year ago | |
repo-graph.js | 12 months ago | |
repo-home.js | 11 months ago | |
repo-issue-content.js | 1 year ago | |
repo-issue-list.js | 12 months ago | |
repo-issue-pr-form.js | 2 years ago | |
repo-issue-pr-status.js | 1 year ago | |
repo-issue.js | 11 months ago | |
repo-legacy.js | 11 months ago | |
repo-migrate.js | 12 months ago | |
repo-migration.js | 12 months ago | |
repo-projects.js | 1 year ago | |
repo-release.js | 11 months ago | |
repo-search.js | 11 months ago | |
repo-settings.js | 12 months ago | |
repo-template.js | 2 years ago | |
repo-unicode-escape.js | 12 months ago | |
repo-wiki.js | 12 months ago | |
sshkey-helper.js | 12 months ago | |
stopwatch.js | 11 months ago | |
tablesort.js | 2 years ago | |
tribute.js | 2 years ago | |
user-auth-webauthn.js | 1 year ago | |
user-auth.js | 11 months ago | |
user-settings.js | 12 months ago |