mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 10:45:56 +00:00
add Lists.select() and make filter dialogs use it
This commit is contained in:
18
js/common.js
18
js/common.js
@@ -56,7 +56,23 @@ const Lists = {
|
||||
|
||||
if (row)
|
||||
checked ? row.addClassName("Selected") : row.removeClassName("Selected");
|
||||
}
|
||||
},
|
||||
select: function(elemId, selected) {
|
||||
$(elemId).select("li").each((row) => {
|
||||
const checkNode = row.select(".dijitCheckBox,input[type=checkbox]")[0];
|
||||
if (checkNode) {
|
||||
const widget = dijit.getEnclosingWidget(checkNode);
|
||||
|
||||
if (widget) {
|
||||
widget.attr("checked", selected);
|
||||
} else {
|
||||
checkNode.checked = selected;
|
||||
}
|
||||
|
||||
this.onRowChecked(widget);
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
|
||||
Reference in New Issue
Block a user