Media browser: recursive scan entire content/ tree, /-media/ URL prefix, editor change detection fix

- handleMediaList() now scans content/ recursively for all media files
- URLs use /-media/ prefix mapping directly to content/ (no special cases)
- index.php: added /-media/ route, kept /-assets/ for backward compat
- editor-toolbar.js: fixed editor.on('change') placement (was inside switchMode)
- content-edit.php and content-new.php: back-btn unsaved-changes detection
- Removed unused __editorCleanup global
This commit is contained in:
2026-06-24 17:00:59 +02:00
parent d97c67c6a9
commit dc0d370e65
50 changed files with 2796 additions and 140 deletions

View File

@@ -30,7 +30,7 @@ Een lichtgewicht, file-based content management systeem gebouwd met PHP.
```
codepress/
├── engine/
├── cms/ # Core CMS engine
│ ├── core/
│ │ ├── config.php # Configuratie loader
│ │ └── index.php # CMS engine
@@ -43,18 +43,17 @@ codepress/
│ ├── markdown_content.mustache
│ ├── php_content.mustache
│ └── html_content.mustache
├── content/ # Content bestanden
│ ├── map1/
│ │ ├── pagina1.md
│ │ └── pagina2.php
│ └── homepage.md
├── admin-console/ # Admin paneel
├── admin/ # Admin paneel
│ ├── config/
│ │ ├── app.php # Admin configuratie
│ │ └── admin.json # Gebruikers & security
│ ├── src/
│ │ └── AdminAuth.php # Authenticatie service
│ └── templates/ # Admin templates
├── cli/ # CLI scripts & tests
│ └── test/
├── content/ # Content bestanden
├── plugins/ # CMS plugins
├── public/ # Web root
│ ├── assets/
│ │ ├── css/
@@ -62,6 +61,7 @@ codepress/
│ │ └── favicon.svg
│ ├── index.php # Website entry point
│ └── admin.php # Admin entry point
├── docs/ # Documentatie
├── config.json # Configuratie
└── README.md
```
@@ -74,7 +74,7 @@ codepress/
{
"site_title": "CodePress",
"content_dir": "content",
"templates_dir": "engine/templates",
"templates_dir": "cms/templates",
"default_page": "auto",
"homepage": "homepage",
"author": {