From 6bd5365cc22f84c047c1585e3f54571af46f53e5 Mon Sep 17 00:00:00 2001
From: historia <[not public]>
Date: Sun, 5 Jul 2026 18:52:51 -0400
Subject: feat: renameable directories and files in admin gui
---
internal/admin/static/mobeditor.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
(limited to 'internal/admin/static/mobeditor.js')
diff --git a/internal/admin/static/mobeditor.js b/internal/admin/static/mobeditor.js
index 73dd16b..debe7e0 100644
--- a/internal/admin/static/mobeditor.js
+++ b/internal/admin/static/mobeditor.js
@@ -149,7 +149,7 @@ function loadMob(id) {
}
function renderMobEditor(id, data) {
- var html = '
Mob: ' + esc(id) + '
';
+ var html = renderRenameableHeader('Mob', id);
html += '';
html += '
';
@@ -574,6 +574,7 @@ function toggleMobCardWidth(id) {
function removeMobSection(id) {
var sec = MOB_SECTIONS.find(function(s) { return s.id === id; });
if (!sec) return;
+ ced_syncDOMToData(mobData);
if (sec.path) {
delete mobData[sec.path];
} else {
@@ -582,7 +583,7 @@ function removeMobSection(id) {
if (sec.subtables) sec.subtables.forEach(function(st) { delete mobData[st.key]; });
}
delete addedSections[id];
- renderCurrent();
+ renderMobEditor(mobID, mobData);
}
function mobAddSection() {
@@ -635,8 +636,9 @@ function addMobSubRow(cardID, subKey) {
function removeMobSubRow(cardID, subKey, idx) {
var sec = MOB_SECTIONS.find(function(s) { return s.id === cardID; });
if (!sec) return;
+ ced_syncDOMToData(mobData);
ced_removeSubRow(sec, subKey, idx, mobData, mobCardPath);
- renderCurrent();
+ renderMobEditor(mobID, mobData);
}
function addMobLootRow(kind) {
--
cgit v1.2.3