Improve Set-Struktur editor: show parent set inline, clamp long descriptions
Playwright Tests / test (push) Canceled after 0s
Playwright Tests / test (push) Canceled after 0s
Removes the per-row indentation (span.ind) in favor of a small "belongs to set" tag shown above each row's title, so membership is visible without tracing indentation depth even while sets are expanded. Description text is now clamped to 2 lines with ellipsis by default and expands to a scrollable ~12-line view on click. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
4386a6336a
commit
6cc79122b3
@@ -123,7 +123,9 @@ $inv.sets = {
|
|||||||
}
|
}
|
||||||
typ.append($$.s($inv.sets.typLbl(co)));
|
typ.append($$.s($inv.sets.typLbl(co)));
|
||||||
$$.tdc('qty', tr).text(co.q || '');
|
$$.tdc('qty', tr).text(co.q || '');
|
||||||
let ttl = $$.tdc('ttl', tr).append($$.sc('ind').css('width', (lvl * 1.4).toString() + 'rem')).append($$.s($inv.sets.title(co)));
|
let ttl = $$.tdc('ttl', tr);
|
||||||
|
if (parent !== '') { ttl.append($$.sc('seti', $inv.sets.title(byId[parent]))); }
|
||||||
|
ttl.append($$.sc('txt', $inv.sets.title(co)).click(function (ev) { ev.stopPropagation(); $(this).tC('exp'); }));
|
||||||
if (isSet) {
|
if (isSet) {
|
||||||
let n = itms.filter((x) => $inv.sets.parentOf(x, byId) === id).length;
|
let n = itms.filter((x) => $inv.sets.parentOf(x, byId) === id).length;
|
||||||
ttl.append($$.sc('cnt', ' (' + n + ')'));
|
ttl.append($$.sc('cnt', ' (' + n + ')'));
|
||||||
|
|||||||
@@ -588,8 +588,23 @@
|
|||||||
span.fold { cursor: pointer; margin-right: 0.35rem; color: #555; display: inline-block; width: 1rem; }
|
span.fold { cursor: pointer; margin-right: 0.35rem; color: #555; display: inline-block; width: 1rem; }
|
||||||
}
|
}
|
||||||
td.ttl {
|
td.ttl {
|
||||||
span.ind { display: inline-block; }
|
span.seti {
|
||||||
span.seti { margin-right: 0.3rem; color: #888; }
|
display: block;
|
||||||
|
margin-bottom: 0.15rem;
|
||||||
|
color: #888;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
&::before { content: '\21B3\0020'; }
|
||||||
|
}
|
||||||
|
span.txt {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: normal;
|
||||||
|
line-height: 1.3rem;
|
||||||
|
cursor: pointer;
|
||||||
|
&.exp { -webkit-line-clamp: unset; display: block; max-height: 15.6rem; overflow-y: auto; }
|
||||||
|
}
|
||||||
span.cnt { color: #999; font-weight: normal; font-size: 0.85rem; }
|
span.cnt { color: #999; font-weight: normal; font-size: 0.85rem; }
|
||||||
}
|
}
|
||||||
td.act { width: 7.5rem; white-space: nowrap; text-align: right;
|
td.act { width: 7.5rem; white-space: nowrap; text-align: right;
|
||||||
|
|||||||
@@ -650,12 +650,29 @@ table.if td.num {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
}
|
}
|
||||||
.modal .setstruct div.sblock table.stbl td.ttl span.ind {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
.modal .setstruct div.sblock table.stbl td.ttl span.seti {
|
.modal .setstruct div.sblock table.stbl td.ttl span.seti {
|
||||||
margin-right: 0.3rem;
|
display: block;
|
||||||
|
margin-bottom: 0.15rem;
|
||||||
color: #888;
|
color: #888;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
.modal .setstruct div.sblock table.stbl td.ttl span.seti::before {
|
||||||
|
content: "↳ ";
|
||||||
|
}
|
||||||
|
.modal .setstruct div.sblock table.stbl td.ttl span.txt {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: normal;
|
||||||
|
line-height: 1.3rem;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.modal .setstruct div.sblock table.stbl td.ttl span.txt.exp {
|
||||||
|
-webkit-line-clamp: unset;
|
||||||
|
display: block;
|
||||||
|
max-height: 15.6rem;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
.modal .setstruct div.sblock table.stbl td.ttl span.cnt {
|
.modal .setstruct div.sblock table.stbl td.ttl span.cnt {
|
||||||
color: #999;
|
color: #999;
|
||||||
|
|||||||
@@ -2656,7 +2656,9 @@ $inv.sets = {
|
|||||||
}
|
}
|
||||||
typ.append($$.s($inv.sets.typLbl(co)));
|
typ.append($$.s($inv.sets.typLbl(co)));
|
||||||
$$.tdc('qty', tr).text(co.q || '');
|
$$.tdc('qty', tr).text(co.q || '');
|
||||||
let ttl = $$.tdc('ttl', tr).append($$.sc('ind').css('width', (lvl * 1.4).toString() + 'rem')).append($$.s($inv.sets.title(co)));
|
let ttl = $$.tdc('ttl', tr);
|
||||||
|
if (parent !== '') { ttl.append($$.sc('seti', $inv.sets.title(byId[parent]))); }
|
||||||
|
ttl.append($$.sc('txt', $inv.sets.title(co)).click(function (ev) { ev.stopPropagation(); $(this).tC('exp'); }));
|
||||||
if (isSet) {
|
if (isSet) {
|
||||||
let n = itms.filter((x) => $inv.sets.parentOf(x, byId) === id).length;
|
let n = itms.filter((x) => $inv.sets.parentOf(x, byId) === id).length;
|
||||||
ttl.append($$.sc('cnt', ' (' + n + ')'));
|
ttl.append($$.sc('cnt', ' (' + n + ')'));
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -787,12 +787,29 @@ table.if th.keep, table.if td.keep {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
}
|
}
|
||||||
.modal .setstruct div.sblock table.stbl td.ttl span.ind {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
.modal .setstruct div.sblock table.stbl td.ttl span.seti {
|
.modal .setstruct div.sblock table.stbl td.ttl span.seti {
|
||||||
margin-right: 0.3rem;
|
display: block;
|
||||||
|
margin-bottom: 0.15rem;
|
||||||
color: #888;
|
color: #888;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
.modal .setstruct div.sblock table.stbl td.ttl span.seti::before {
|
||||||
|
content: "↳ ";
|
||||||
|
}
|
||||||
|
.modal .setstruct div.sblock table.stbl td.ttl span.txt {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: normal;
|
||||||
|
line-height: 1.3rem;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.modal .setstruct div.sblock table.stbl td.ttl span.txt.exp {
|
||||||
|
-webkit-line-clamp: unset;
|
||||||
|
display: block;
|
||||||
|
max-height: 15.6rem;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
.modal .setstruct div.sblock table.stbl td.ttl span.cnt {
|
.modal .setstruct div.sblock table.stbl td.ttl span.cnt {
|
||||||
color: #999;
|
color: #999;
|
||||||
|
|||||||
@@ -2637,7 +2637,9 @@ $inv.sets = {
|
|||||||
}
|
}
|
||||||
typ.append($$.s($inv.sets.typLbl(co)));
|
typ.append($$.s($inv.sets.typLbl(co)));
|
||||||
$$.tdc('qty', tr).text(co.q || '');
|
$$.tdc('qty', tr).text(co.q || '');
|
||||||
let ttl = $$.tdc('ttl', tr).append($$.sc('ind').css('width', (lvl * 1.4).toString() + 'rem')).append($$.s($inv.sets.title(co)));
|
let ttl = $$.tdc('ttl', tr);
|
||||||
|
if (parent !== '') { ttl.append($$.sc('seti', $inv.sets.title(byId[parent]))); }
|
||||||
|
ttl.append($$.sc('txt', $inv.sets.title(co)).click(function (ev) { ev.stopPropagation(); $(this).tC('exp'); }));
|
||||||
if (isSet) {
|
if (isSet) {
|
||||||
let n = itms.filter((x) => $inv.sets.parentOf(x, byId) === id).length;
|
let n = itms.filter((x) => $inv.sets.parentOf(x, byId) === id).length;
|
||||||
ttl.append($$.sc('cnt', ' (' + n + ')'));
|
ttl.append($$.sc('cnt', ' (' + n + ')'));
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user