Search and search switches are functional

This commit is contained in:
Claude Brisson
2023-12-17 19:42:16 +01:00
parent ea44f6068e
commit 98192a1ebc
13 changed files with 228 additions and 82 deletions

View File

@@ -137,7 +137,7 @@ HTMLFormElement.prototype.val = function(name, value) {
ctl.checked = value !== 'false' && Boolean(value);
return;
}
else return ctl.checked;
else return ctl.checked && ctl.value ? ctl.value : ctl.checked;
}
console.error(`unhandled input tag or type for input ${name} (tag: ${tag}, type:${type}`);
return null;
@@ -171,12 +171,6 @@ onLoad(() => {
$('body').removeClass('dimmed');
}
});
$('.checkbox').on('click', e => {
let chk = e.target.closest('.checkbox');
chk.toggleClass('active');
let checkbox = chk.find('input')[0];
checkbox.checked = !checkbox.checked;
});
/* commented for now - do we want this?
$('#dimmer').on('click', e => $('.popup').removeClass('shown');
*/