Admin group: rework lab cells/columns, fix sort toggle and card rounding
This commit is contained in:
@@ -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 ? 'по возрастанию' : 'по убыванию');
|
||||
|
||||
Reference in New Issue
Block a user