fix criteria toggle

Signed-off-by: faissaloux <fwahabali@gmail.com>
This commit is contained in:
faissaloux 2023-03-05 20:11:15 +01:00 committed by William Desportes
parent f17ba4badf
commit 5e7717f4c8
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -195,7 +195,10 @@ AJAX.registerOnload('database/multi_table_query.js', function () {
$('.criteria_col').each(function () {
$(this).on('change', function () {
var $anchor = $(this).siblings('.jsCriteriaButton').first();
if ($(this).is(':checked') && ! $anchor.hasClass('collapsed')) {
if (
($(this).is(':checked') && ! $anchor.hasClass('collapsed'))
|| (! $(this).is(':checked') && $anchor.hasClass('collapsed'))
) {
// Do not collapse on checkbox tick as it does not make sense
// The user has it open and wants to tick the box
return;