Commit c8c50b83 authored by David Stutz's avatar David Stutz

Fixes #412.

parent 6b6afe6f
...@@ -775,18 +775,25 @@ ...@@ -775,18 +775,25 @@
showElement = true; showElement = true;
} }
// Toggle current element (group or group item) according to showElement boolean // Toggle current element (group or group item) according to showElement boolean.
$(element).toggle(showElement).toggleClass('filter-hidden', !showElement); $(element).toggle(showElement).toggleClass('filter-hidden', !showElement);
// Differentiate groups and group items
if ($(this).hasClass('multiselect-group')) { // Differentiate groups and group items.
// Remember group status if ($(element).hasClass('multiselect-group')) {
// Remember group status.
currentGroup = element; currentGroup = element;
currentGroupVisible = showElement; currentGroupVisible = showElement;
} else { }
// show group name when at least one of its items is visible else {
if (showElement) $(currentGroup).show().removeClass('filter-hidden'); // Show group name when at least one of its items is visible.
// show all group items when group name satisfies filter if (showElement) {
if (!showElement && currentGroupVisible) $(element).show().removeClass('filter-hidden'); $(currentGroup).show().removeClass('filter-hidden');
}
// Show all group items when group name satisfies filter.
if (!showElement && currentGroupVisible) {
$(element).show().removeClass('filter-hidden');
}
} }
} }
}, this)); }, this));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment