Toggle tasks and edit view settings via htmx
Task checkboxes post themselves (hx-post="?toggle=N") and flip back when the save fails, replacing tasks.js. View settings are a server-rendered form dialog with real radios and a select, replacing view-settings.js; with that, postReplace has no callers left. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -302,7 +302,7 @@ func (h *handler) serveDir(w http.ResponseWriter, r *http.Request, urlPath, fsPa
|
||||
return
|
||||
}
|
||||
if r.URL.Query().Has("dialog") {
|
||||
h.serveDialog(w, r, urlPath)
|
||||
h.serveDialog(w, r, urlPath, fsPath)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -406,8 +406,6 @@ func (h *handler) serveDir(w http.ResponseWriter, r *http.Request, urlPath, fsPa
|
||||
Content: rendered,
|
||||
Entries: entries,
|
||||
View: view,
|
||||
Sort: sortKey,
|
||||
Order: order,
|
||||
SpecialContent: specialContent,
|
||||
SidebarWidget: sidebarWidget,
|
||||
SuppressTOC: suppressTOC,
|
||||
|
||||
Reference in New Issue
Block a user