diff options
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() { |
