Auto-populate groups based on highlighted entries

This commit is contained in:
Ian Gulliver
2019-07-11 04:25:06 +00:00
parent b6c8441f61
commit 057856a2d2
5 changed files with 39 additions and 13 deletions

14
List.js
View File

@@ -14,6 +14,20 @@ class List {
return ret;
}
queryEntries(query, type) {
let ret = [];
for (let elem of this.container_.querySelectorAll(query)) {
if (!elem.xArchObj) {
continue;
}
if (type && !(elem.xArchObj instanceof type)) {
continue;
}
ret.push(elem.xArchObj);
}
return ret;
}
getSelected() {
let iter = document.activeElement;
while (iter) {