Table columns: dropdown/text filters per column
- tablekit builds a filter row under the headers for every th with data-filter; distinct cell values become a select (label from data-filter-label), or a text substring filter with data-filter="text" - filters combine with the global table search; placeholder rows (colspan) are not filtered away; filter row follows the lab-focus column hiding - enabled on: matrix lab columns (by variant), defense table (ЛР, status with readable values), students (Основа, Пароль), lab assignment lists (Уровень, Источник, Сдача), labs list (Статус)
This commit is contained in:
@@ -104,7 +104,7 @@ function focusLab() {
|
||||
var s = $id('lab-focus');
|
||||
if (!s) return;
|
||||
var labId = s.value;
|
||||
document.querySelectorAll('th.lab-col[data-lab], td.cell-lab[data-lab]').forEach(function (el) {
|
||||
document.querySelectorAll('th.lab-col[data-lab], td.cell-lab[data-lab], .filter-row th[data-lab]').forEach(function (el) {
|
||||
el.style.display = (!labId || el.getAttribute('data-lab') === labId) ? '' : 'none';
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user