10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-11-04 21:24:00 +01:00

selectSelectAll is now a separate function

This commit is contained in:
Mickaël Véril 2020-01-29 17:41:38 +01:00
parent 47487c4d61
commit 6c5f082e3b

View File

@ -1,9 +1,12 @@
function selectSelectAll_click(e) {
const ctrl = $(e.target).next()
if (ctrl.prop('type') == 'select-multiple') {
ctrl.find("option").each(function () {
selectSelectAll(ctrl)
}
function selectSelectAll(target) {
if (target.prop('type') == 'select-multiple') {
target.find("option").each(function () {
$(this).prop('selected', true);
ctrl.trigger("change")
target.trigger("change")
});
}
}