diff options
| author | historia <[not public]> | 2026-07-05 18:52:51 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-05 18:52:51 -0400 |
| commit | 6bd5365cc22f84c047c1585e3f54571af46f53e5 (patch) | |
| tree | 72df0934c72baa1e31817d7db999832c6efb115f /internal/admin/static/dropeditor.js | |
| parent | 9b54188970c51070d86f4c87e909ea7836c86f07 (diff) | |
| download | thehouseoficarus-6bd5365cc22f84c047c1585e3f54571af46f53e5.tar.gz | |
feat: renameable directories and files in admin gui
Diffstat (limited to 'internal/admin/static/dropeditor.js')
| -rw-r--r-- | internal/admin/static/dropeditor.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/admin/static/dropeditor.js b/internal/admin/static/dropeditor.js index 8e463ec..c5da314 100644 --- a/internal/admin/static/dropeditor.js +++ b/internal/admin/static/dropeditor.js @@ -56,7 +56,7 @@ function loadDropEditor(id) { function loadItem(id) { loadDropEditor(id); } function renderDropEditor(id, data) { - var html = '<h2>Drop Table: ' + esc(id) + '</h2>'; + var html = renderRenameableHeader('Drop Table', id); html += '<div class="tabs"><button class="tab active" onclick="switchTab(event,\'fields\')">Fields</button>'; html += '<button class="tab" onclick="switchTab(event,\'yaml\')">Raw YAML</button></div>'; @@ -155,9 +155,10 @@ function addArrayItem(cardID) { function removeArrayItem(cardID, idx) { var sec = DROP_SECTIONS.find(function(s) { return s.id === cardID; }); if (!sec || !sec.isArray) return; + ced_syncDOMToData(dropData); var arr = dropData[sec.path] || []; arr.splice(idx, 1); - renderCurrent(); + renderDropEditor(dropID, dropData); } function saveDrop() { |
