MDL-77932 gradereport_grader: simplify range/average cell collapsing.

This commit is contained in:
Paul Holden 2023-04-19 10:36:27 +01:00
parent 078e0fd885
commit f2f44e5ec9
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164
3 changed files with 5 additions and 9 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -394,13 +394,9 @@ export default class ColumnSearch extends GradebookSearchClass {
// If it's not a content cell, it must be an overall average or a range cell.
const rowCell = avgRowCell ?? rangeRowCell;
if (rowCell.classList.contains('d-none')) {
rowCell?.classList.remove('d-none');
rowCell?.setAttribute('aria-hidden', 'false');
} else {
rowCell?.classList.add('d-none');
rowCell?.setAttribute('aria-hidden', 'true');
}
rowCell?.classList.toggle('d-none');
rowCell?.setAttribute('aria-hidden',
rowCell?.classList.contains('d-none') ? 'true' : 'false');
} else if (content.classList.contains('d-none')) {
// We should always have content but some cells do not contain menus or other actions.
element.classList.remove('collapsed');