Skip to content

Commit

Permalink
[FIX] views: app.js has parameters for HTMX request,
Browse files Browse the repository at this point in the history
setClickAll() performs new ontent from event.target & process HTMX
new styles for file inputs & tables sticky
  • Loading branch information
ruslanBik4 committed Jun 2, 2024
1 parent 9c94f59 commit 8d05f04
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion views/js/forms.js.qtpl.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion views/js/src/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,19 @@ function saveForm(thisForm, successFunction, errorFunction) {
}

function OverHijack($out, resp) {
var evtSource = new EventSource(resp.url, {WithCredentials: true})
var evtSource = new EventSource(resp.url)
console.log(evtSource.withCredentials);
console.log(evtSource.readyState);
console.log(evtSource.url);
evtSource.onopen = (event) => {
console.log(JSON.stringify(event));
console.log("source open");
};
evtSource.onmessage = (event) => {
$out.append(`<pre>${event.data}</pre>`);
if (event.data === "closed") {
evtSource.close();
}
}
evtSource.onerror = (err) => {
var msg = JSON.stringify(err)
Expand Down

0 comments on commit 8d05f04

Please sign in to comment.