From 694980c869ba0fe12cbaa509b820f1ac24198aa9 Mon Sep 17 00:00:00 2001 From: serversdown Date: Mon, 15 Jun 2026 19:14:27 +0000 Subject: [PATCH] refactor(reports): namespace the FTP browser partial behind window.FtpBrowser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Proper fix superseding the fb* prefix band-aid (1801d4e): wrap ftp_browser.html's script in an IIFE and expose only window.FtpBrowser. Its ~11 helpers no longer leak to global scope, so the partial is safe to co-load with other FTP-browsing partials (e.g. slm_live_view's Command Center) without name collisions in either direction. Inline onclick handlers call FtpBrowser.*; showFTPSettings stays global (it's from the included settings modal). Behaviour unchanged — verified full Jinja render + balanced delimiters. Co-Authored-By: Claude Opus 4.8 (1M context) --- templates/partials/projects/ftp_browser.html | 54 +++++++++++++------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/templates/partials/projects/ftp_browser.html b/templates/partials/projects/ftp_browser.html index 5c7373b..29ebda4 100644 --- a/templates/partials/projects/ftp_browser.html +++ b/templates/partials/projects/ftp_browser.html @@ -32,19 +32,19 @@ Settings - - -