v3.11.0 editor polish: keyset editor as a header table, in sync with TAR
The keyset rows were a stack of flex divs with no column labels. They are now a fixed-layout table like the TAR table: a thead with # (keyset number, with its tooltip), KIc, KID, KIc key, KID key, Counter and the action column, and <tr> rows of py-1 px-2 cells with w-full inputs (the columns drive the widths: 40/56/56 px, the two key columns split the remainder, 112 px for the 10-digit counter). Ids and behaviour are unchanged (the number span still toggles its red flag, the inputs keep their handlers). Guards: html.test.js checks the keyset table headers and tbody; cards_form.test.js checks the row markup. sw cache simple-v366. Tests: 665 Python + 788 frontend green; the whole inline PWA script syntax-checked.
This commit is contained in:
@@ -539,6 +539,16 @@ test('the TAR row values are left-aligned like the headers', () => {
|
||||
assert.match(out, /<td class="py-1 px-2"><input id="cards-tr-3-msl" class="w-full/);
|
||||
});
|
||||
|
||||
test('the keyset row renders as a table row with full-width inputs', () => {
|
||||
const out = cardsKeysetRowHtml({ kic: '15', kid: '15', kicKey: 'AA', kidKey: 'BB', cntr: '0000000001' }, 0);
|
||||
assert.match(out, /^<tr>/);
|
||||
assert.match(out, /<td class="py-1 px-2"><span id="cards-ks-0-kvn"/);
|
||||
assert.match(out, /<td class="py-1 px-2"><input id="cards-ks-0-kic" class="w-full/);
|
||||
assert.match(out, /<td class="py-1 px-2"><input id="cards-ks-0-kic-key" class="w-full/);
|
||||
assert.match(out, /<td class="py-1 px-2"><input id="cards-ks-0-cntr" class="w-full/);
|
||||
assert.match(out, /cardsKeysetRemove\(0\)/);
|
||||
});
|
||||
|
||||
test('the TAR table renders the role rows and adds/removes free rows', () => {
|
||||
const els = setup();
|
||||
cardsTarRowsRender([{ tar: 'AF4D01', msl: '0A', desc: 'one' },
|
||||
|
||||
Reference in New Issue
Block a user