From f601a40776843f6196221e74ba502c571a5b1bcd Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sun, 12 Jul 2026 21:16:58 -0400 Subject: fix(admin): standardize most search dropdowns and radio buttons --- internal/admin/static/moduleeditor.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'internal/admin/static/moduleeditor.js') diff --git a/internal/admin/static/moduleeditor.js b/internal/admin/static/moduleeditor.js index 739fc2e..fe71f88 100644 --- a/internal/admin/static/moduleeditor.js +++ b/internal/admin/static/moduleeditor.js @@ -13,11 +13,11 @@ var MODULE_SECTIONS = [ ['max_hit', 'Max Hit', 'number', '10', 'narrow'], ['base_xp', 'Base XP', 'number', '50', 'narrow'], ['category', 'Category', 'select', 'combat|utility|enchant|processing|transport'], - ['element', 'Element', 'text', 'e.g. fire'], + ['element', 'Element', 'select', '|bio|eco|hydro|solar|chaos'], ['destination', 'Destination', 'number', '5', 'narrow'], ], inline: [ - {label:'Junk Cost', key:'junk_cost', type:'kv', valType:'number'}, + {label:'Junk Cost', key:'junk_cost', type:'kv_search', searchEntity:'items', valType:'number'}, ] }, { @@ -144,6 +144,8 @@ function renderCard(sec, data) { sec.inline.forEach(function(il) { if (il.type === 'kv') { h += ced_renderKV(sec, il, data); + } else if (il.type === 'kv_search') { + h += ced_renderKVSearch(sec, il, data); } }); } @@ -274,7 +276,7 @@ function saveModule() { if (sec.inline) { sec.inline.forEach(function(il) { - if (il.type === 'kv') { + if (il.type === 'kv' || il.type === 'kv_search') { var kvEl = document.querySelector('.obj-kv-list[data-sec="' + sec.id + '"][data-key="' + il.key + '"]'); if (kvEl) { var map = {}; -- cgit v1.2.3