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

@@ -102,7 +102,7 @@ a:not(.btn):hover { color: var(--c-text-link-hover); }
/* Cards */
.card { border-radius: 0.75rem; background: var(--c-surface); border: 1px solid var(--c-border); }
.card-flush { border-radius: 0.75rem; background: var(--c-surface); border: 1px solid var(--c-border); padding: 0; }
.card-flush { border-radius: 0.75rem; background: var(--c-surface); border: 1px solid var(--c-border); padding: 0; overflow: hidden; }
.card-body { padding: 1.5rem; }
/* Grid */
@@ -302,6 +302,36 @@ code.code { padding: 0.125rem 0.5rem; border-radius: 0.25rem; font-family: monos
.ac-item { padding: 0.4rem 0.6rem; cursor: pointer; font-size: 0.875rem; }
.ac-item:hover, .ac-item.active { background: var(--c-bg); }
.ac-empty { padding: 0.4rem 0.6rem; font-size: 0.875rem; color: var(--c-text-muted); }
/* Ячейка матрицы: вариант и кнопки действий под ним; кнопки в шапке ЛР */
.cell-stack { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.variant-btn {
display: inline-block; padding: 0.18rem 0.5rem; border-radius: 0.4rem;
border: 1px solid var(--c-border); background: var(--c-bg);
font-size: 0.8rem; white-space: nowrap;
}
.variant-btn.manual { border-color: var(--c-border-strong, var(--c-border)); font-weight: 600; }
.cell-btns { display: flex; gap: 0.2rem; }
.cell-btn {
display: inline-flex; align-items: center; justify-content: center; gap: 0.15rem;
min-width: 1.6rem; height: 1.6rem; padding: 0 0.35rem; cursor: pointer;
border: 1px solid var(--c-border); border-radius: 0.35rem;
background: var(--c-surface); color: var(--c-text); text-decoration: none; font-size: 0.85rem;
}
.cell-btn:hover { background: var(--c-bg); }
.cell-btn.dim { color: var(--c-text-muted); }
.cell-btn.warn { color: #d97706; }
.cell-btn.ok { color: #16a34a; }
.lab-head-actions { display: flex; gap: 0.2rem; }
.mini-btn {
display: inline-flex; align-items: center; justify-content: center;
min-width: 1.5rem; height: 1.5rem; padding: 0 0.3rem; cursor: pointer;
border: 1px solid var(--c-border); border-radius: 0.35rem;
background: var(--c-surface); color: var(--c-text); text-decoration: none; font-size: 0.85rem;
}
.mini-btn:hover { background: var(--c-bg); }
.mini-btn.ok { color: #16a34a; }
.mini-btn.warn { color: #d97706; }
/* Увеличенный диалог (оценка + комментарии) */
dialog.modal.modal-lg { width: min(56rem, calc(100vw - 2rem)); }
dialog.modal.modal-lg .modal-body { max-height: 78vh; }

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 ? 'по возрастанию' : 'по убыванию');