refactor: extract inline JS into app/ modules, remove dead overtype-webcomponent

- Remove overtype-webcomponent.min.js (zero references)
- Extract copyLogContent + fallbackCopy + HTMX tab-updater → app/admin-logs.js
  (removes duplicate from both system.php and parametres.php)
- Extract copyUrl → app/clipboard.js (shared by acces.php)
- Extract tag/language pill-search logic → app/pill-search.js
  Generalized with data-pill-search attributes, auto-inits via
  DOMContentLoaded + htmx:afterSwap
- Extract access-request form handler → app/access-request.js
  (was inline in templates/public/tfe.php)

Files created: admin-logs.js, clipboard.js, pill-search.js, access-request.js
Files modified: 9 templates/controllers to drop inline scripts and
  reference external JS files
This commit is contained in:
Pontoporeia
2026-05-11 19:37:31 +02:00
parent 04094d802d
commit b56d073210
31 changed files with 430 additions and 1724 deletions

View File

@@ -32,6 +32,15 @@
- [x] Add `hx-target` response divs to the three fieldsets in contenus.php
- [x] Update settings.php to return HTML toast on HTMX requests
## JS Refactoring — Extract inline scripts into app/ files
- [x] Remove overtype-webcomponent.min.js (unused)
- [x] Extract copyLogContent + fallbackCopy + tab-updater → app/admin-logs.js
- [x] Extract copyUrl → app/clipboard.js
- [x] Extract tag-search inline script → app/pill-search.js (generalized for tag + language)
- [x] Extract tfe.php access-request form → app/access-request.js
- [x] Update all templates to use new external JS files
## Production Error Fixes (2026-05-11 remote logs)
- [x] **413 Request Entity Too Large** — bumped `client_max_body_size` to 256M, PHP post/upload to 256M, timeouts to 300s