From a8fca38038dfbf27d83eb59e3e5fb0fdf91515ed Mon Sep 17 00:00:00 2001 From: neckfire Date: Wed, 15 Jul 2026 11:51:58 +0200 Subject: [PATCH] =?UTF-8?q?admin:=20fix=20empty=20tables=20=E2=80=94=20def?= =?UTF-8?q?ine=20DT=20engine=20before=20page=20init=20scripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DT table engine lived in the page footer, after the per-page in the body, so DT was undefined when init ran (ReferenceError, nothing rendered). Move the engine into a DtScript const injected right after
, before any body content, so it is always defined first. Co-Authored-By: Claude Opus 4.8 --- .../Controllers/AdminController.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Prospect.Server.Api/Controllers/AdminController.cs b/src/Prospect.Server.Api/Controllers/AdminController.cs index ccd0b86..8000d61 100644 --- a/src/Prospect.Server.Api/Controllers/AdminController.cs +++ b/src/Prospect.Server.Api/Controllers/AdminController.cs @@ -342,7 +342,7 @@ public class AdminController : ControllerBase $"
{Esc(value)}
{Esc(label)}
"; private static string Layout(string title, string body) => - Head.Replace("__TITLE__", Esc(title)) + body + Foot; + Head.Replace("__TITLE__", Esc(title)) + DtScript + body + Foot; // Static shell (no C# interpolation → JS braces/quotes stay literal). Single quotes only. private const string Head = @" @@ -380,8 +380,11 @@ th.dth{cursor:pointer;user-select:none;white-space:nowrap}th.dth:hover{color:var read-only · LAN
"; - private const string Foot = @"
-"; +"; } -- 2.54.0