From 9b54188970c51070d86f4c87e909ea7836c86f07 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sun, 5 Jul 2026 16:42:01 -0400 Subject: fix: restructure steal yaml, update admin web gui --- internal/admin/static/mobeditor.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'internal/admin/static/mobeditor.js') diff --git a/internal/admin/static/mobeditor.js b/internal/admin/static/mobeditor.js index c564088..73dd16b 100644 --- a/internal/admin/static/mobeditor.js +++ b/internal/admin/static/mobeditor.js @@ -202,6 +202,7 @@ function renderMobEditor(id, data) { } function renderCurrent() { + ced_syncDOMToData(mobData); if (!mobData || !mobID) return; renderMobEditor(mobID, mobData); } @@ -425,16 +426,17 @@ function renderMobSubField(sec, stKey, idx, f, val) { else if (f[4] === 'grow') extraCls = ' obj-grow'; var defaultPh = ''; if (f[3]) defaultPh = ' placeholder="' + escAttr(f[3]) + '"'; + var dp = mobCardPath(sec) + '.' + stKey + '[' + idx + '].' + f[0]; + var dpAttr = ' data-field-path="' + escAttr(dp) + '"'; if (f[2] === 'search') { var entity = f[6] || 'items'; var ph = f[3] ? ' placeholder="' + escAttr(f[3]) + '"' : ' placeholder="Search ' + entity + '..."'; - var dp = mobCardPath(sec) + '.' + stKey + '[' + idx + '].' + f[0]; - return ''; + return ''; } if (f[2] === 'checkbox') { - return ''; + return ''; } - return ''; + return ''; } function renderMobSubtable(sec, st, data) { @@ -529,11 +531,12 @@ function renderMobTableSubtable(sec, st, arr) { st.fields.forEach(function(f) { var fid = mobFieldIDSub(sec, st.key, idx, f[0]); var val = item[f[0]]; + var dp = mobCardPath(sec) + '.' + st.key + '[' + idx + '].' + f[0]; if (f[2] === 'search') { var entity = f[6] || 'items'; var sval = (val === undefined || val === null) ? '' : String(val); h += '
'; } else { var hasPh = !!f[3]; @@ -543,7 +546,7 @@ function renderMobTableSubtable(sec, st, arr) { else nval = String(val); var ph = hasPh ? ' placeholder="' + escAttr(f[3]) + '"' : ''; h += '
' + - '' + + '' + '
'; } }); -- cgit v1.2.3