Admin group: rework lab cells/columns, fix sort toggle and card rounding

This commit is contained in:
2026-09-28 16:39:18 +03:00
parent 6890967ce5
commit f2f1f7dd41
3 changed files with 74 additions and 48 deletions

View File

@@ -39,9 +39,9 @@
return table.__headerRow || table.tHead.rows[table.tHead.rows.length - 1];
}
function clearMarkers(table, keep) {
Array.prototype.forEach.call(headerRow(table).cells, function (th, i) {
if (i !== keep) th.classList.remove('is-asc', 'is-desc');
function clearAllMarkers(table) {
Array.prototype.forEach.call(headerRow(table).cells, function (th) {
th.classList.remove('is-asc', 'is-desc');
});
}
@@ -161,7 +161,7 @@
th.addEventListener('click', function (event) {
if (event.target.closest('form, button, a, select, input')) return;
var asc = !th.classList.contains('is-asc');
clearMarkers(table, index);
clearAllMarkers(table);
th.classList.add(asc ? 'is-asc' : 'is-desc');
sortColumn(table, index, asc ? 1 : -1);
th.title = (th.textContent.trim() || 'Столбец') + ' — ' + (asc ? 'по возрастанию' : 'по убыванию');