Add select all button to the selection bar

This commit is contained in:
Alex Ling
2020-08-02 09:28:31 +00:00
parent 1719335d02
commit 8dc60ac2ea
2 changed files with 15 additions and 2 deletions

View File

@@ -191,6 +191,18 @@ const deselectAll = () => {
$('#select-bar')[0].__x.$data['count'] = 0;
};
const selectAll = () => {
let count = 0;
$('.item .uk-card').each((i, e) => {
const data = e.__x.$data;
if (!data['disabled']) {
data['selected'] = true;
count++;
}
});
$('#select-bar')[0].__x.$data['count'] = count;
};
const selectedIDs = () => {
const ary = [];
$('.item .uk-card').each((i, e) => {