mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 23:16:15 +08:00
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:
commit
193c7bb1f8
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
/* Index page */
|
||||
.report-table {
|
||||
margin-top: 20px;
|
||||
|
||||
.report-row.selected {
|
||||
background: $color-alto;
|
||||
}
|
||||
}
|
||||
|
||||
/* New page navbar */
|
||||
|
|
Loading…
Reference in a new issue