Merge pull request #2947 from aignatov-bio/ai-sci-4579-update-add-highlight-to-report-table

Add highlight to report table [SCI-4579]
This commit is contained in:
aignatov-bio 2020-11-11 09:47:55 +01:00 committed by GitHub
commit 193c7bb1f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -63,9 +63,11 @@
$('input[name="select_all"]').change(function() {
if($(this).is(':checked')) {
$("[data-action='toggle']").prop('checked', true);
$('.report-row').addClass('selected');
addAllItems();
} else {
$("[data-action='toggle']").prop('checked', false);
$('.report-row').removeClass('selected');
removeAllItems();
}
updateButtons();
@ -99,9 +101,11 @@
$("[data-action='toggle']").change(function() {
var id = $(this).attr('data-report-id');
if($(this).is(':checked')) {
$(this).closest('.report-row').addClass('selected');
CHECKED_REPORTS.push(id);
} else {
var index = CHECKED_REPORTS.indexOf(id);
$(this).closest('.report-row').removeClass('selected');
if(index != -1) {
CHECKED_REPORTS.splice(index, 1);
}

View file

@ -4,6 +4,10 @@
/* Index page */
.report-table {
margin-top: 20px;
.report-row.selected {
background: $color-alto;
}
}
/* New page navbar */