diff --git a/index.html b/index.html index eecd514..7c0e80f 100644 --- a/index.html +++ b/index.html @@ -820,7 +820,7 @@
- +
@@ -2998,6 +2998,7 @@ async function pysimFsRead() { let html = ''; for (const r of data.records) { html += '
' + + '' + '' + r.num + '' + '' + '
'; @@ -3033,8 +3034,14 @@ function pysimFsEdit() { document.getElementById('pysim-fs-save-btn').classList.remove('hidden'); document.getElementById('pysim-fs-cancel-btn').classList.remove('hidden'); const out = document.getElementById('pysim-fs-content'); - out.querySelectorAll('textarea, input').forEach(el => el.removeAttribute('readonly')); - // Store current data for save + out.querySelectorAll('textarea, input:not([type=checkbox])').forEach(el => el.removeAttribute('readonly')); + out.querySelectorAll('.pysim-fs-record-cb').forEach(cb => cb.classList.remove('hidden')); + out.querySelectorAll('input:not([type=checkbox])').forEach(el => { + el.addEventListener('input', function() { + const cb = this.closest('div')?.querySelector('.pysim-fs-record-cb'); + if (cb) cb.checked = true; + }); + }); pysimFsEditData = out.innerHTML; } @@ -3072,9 +3079,14 @@ async function pysimFsSave() { } } else { // Record file - const inputs = out.querySelectorAll('input'); + const inputs = out.querySelectorAll('input:not([type=checkbox])'); + let wroteAny = false; for (const inp of inputs) { - const num = inp.closest('div')?.querySelector('span')?.textContent; + const row = inp.closest('div'); + const cb = row?.querySelector('.pysim-fs-record-cb'); + if (cb && !cb.checked) continue; + wroteAny = true; + const num = row?.querySelector('span')?.textContent; if (num) { const body = { name: rawName, fid: node ? node.fid : null, data: inp.value.replace(/[^0-9a-fA-F]/g, ''), record_nr: parseInt(num) }; const parentSel = getParentSel(node); @@ -3086,6 +3098,10 @@ async function pysimFsSave() { } } } + if (!wroteAny) { + statusEl.textContent = 'No records selected — check the ones you want to update'; + return; + } statusEl.textContent = 'SW: 9000 OK'; pysimFsCancel(); pysimFsRead(); diff --git a/style.css b/style.css index bee4e3e..fc0f9cd 100644 --- a/style.css +++ b/style.css @@ -715,8 +715,12 @@ video { min-width: 0px; } -.max-w-4xl { - max-width: 56rem; +.max-w-7xl { + max-width: 80rem; +} + +.max-w-md { + max-width: 28rem; } .flex-1 {