10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 13:53:48 +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) { function selectSelectAll_click(e) {
const ctrl = $(e.target).next() const ctrl = $(e.target).next()
if (ctrl.prop('type') == 'select-multiple') { selectSelectAll(ctrl)
ctrl.find("option").each(function () { }
function selectSelectAll(target) {
if (target.prop('type') == 'select-multiple') {
target.find("option").each(function () {
$(this).prop('selected', true); $(this).prop('selected', true);
ctrl.trigger("change") target.trigger("change")
}); });
} }
} }