WIP on htmx 4; change target from window to body (#60)

This commit is contained in:
2026-07-14 19:55:55 -04:00
parent e8ee236c1e
commit 76f0506de7
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -67,7 +67,7 @@ let dashboard (themes: Theme list) app = [
]
let webLogUrl = $"{cacheBaseUrl}web-log/"
form [ _method "post"; _class "container g-0"; hxInherited (_hxTarget "body")
hxInherited (_hxSwap $"{HxSwap.InnerHtml} show:top showTarget:window") ] [
hxInherited (_hxSwap $"{HxSwap.InnerHtml} show:top showTarget:body") ] [
antiCsrf app
button [ _type "submit"; _class "btn btn-sm btn-primary mb-2"
_hxPost $"{webLogUrl}all/refresh" ] [
@@ -88,7 +88,7 @@ let dashboard (themes: Theme list) app = [
raw "refreshing a theme with no cached templates will still refresh its asset cache"
]
form [ _method "post"; _class "container g-0"
hxInherited (_hxSwap $"{HxSwap.InnerHtml} show:top showTarget:window") ] [
hxInherited (_hxSwap $"{HxSwap.InnerHtml} show:top showTarget:body") ] [
antiCsrf app
button [ _type "submit"; _class "btn btn-sm btn-primary mb-2"
_hxPost $"{themeCacheUrl}all/refresh" ] [
@@ -126,7 +126,7 @@ let themeList (model: DisplayTheme list) app =
]
div [ _class "row mwl-table-detail"; _id "theme_new" ] []
form [ _method "post"; _id "themeList"; _class "container g-0"; _hxTarget "#theme_panel"
_hxSwap $"{HxSwap.OuterHtml} show:top showTarget:window" ] [
_hxSwap $"{HxSwap.OuterHtml} show:top showTarget:body" ] [
antiCsrf app
for theme in model do
let url = relUrl app $"admin/theme/{theme.Id}"