forked from wallabag/wallabag
Added mass actions for Material design in list view
This commit is contained in:
@ -2,6 +2,42 @@
|
||||
* Entries
|
||||
* ========================================================================== */
|
||||
|
||||
.mass-buttons {
|
||||
margin: 5px;
|
||||
|
||||
#selectAll {
|
||||
position: relative;
|
||||
opacity: initial;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
span {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
button {
|
||||
i {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.card-stacked {
|
||||
input[type=checkbox] {
|
||||
position: relative;
|
||||
opacity: initial;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.entry-checkbox {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.collection {
|
||||
margin: 15px 15px 0;
|
||||
|
||||
|
||||
@ -105,4 +105,17 @@ $(document).ready(() => {
|
||||
$('.nav-panels').css('background', 'transparent');
|
||||
return false;
|
||||
});
|
||||
|
||||
const mainCheckboxes = document.querySelectorAll('[data-js="checkboxes-toggle"]');
|
||||
if (mainCheckboxes.length) {
|
||||
[...mainCheckboxes].forEach((el) => {
|
||||
el.addEventListener('click', () => {
|
||||
const checkboxes = document.querySelectorAll(el.dataset.toggle);
|
||||
[...checkboxes].forEach((checkbox) => {
|
||||
const checkboxClone = checkbox;
|
||||
checkboxClone.checked = el.checked;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user