mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-08 07:21:03 +08:00
Add highlight to report table
This commit is contained in:
parent
a71e8ef9cf
commit
71ddf680b2
2 changed files with 8 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue