4,396
edits
No edit summary |
No edit summary |
||
Line 152: | Line 152: | ||
// Event delegation for filter changes in list view | // Event delegation for filter changes in list view | ||
$('#list-list').on('change', '.filtered-value-option input[type="checkbox"]', function() { | $('#list-list').on('change', '.filtered-value-option input[type="checkbox"]', function() { | ||
checkFiltersCleared('#list-list', | checkFiltersCleared('#list-list', communityFeatured); // Call the function directly without delay | ||
}); | }); | ||
// Initial checks | // Initial checks | ||
checkFiltersCleared('#list', communityFeatured); | checkFiltersCleared('#list', communityFeatured); | ||
checkFiltersCleared('#list-list', | checkFiltersCleared('#list-list', communityFeatured); | ||
// Function to check if all filters are cleared and return boolean | // Function to check if all filters are cleared and return boolean | ||
Line 182: | Line 182: | ||
// Hide communityFeatured | // Hide communityFeatured | ||
communityFeatured.hide(); | communityFeatured.hide(); | ||
communityListFeatured.hide(); | // communityListFeatured.hide(); | ||
// Clear existing content in modal | // Clear existing content in modal | ||
Line 397: | Line 397: | ||
if (checkedFilters.length === 0) { | if (checkedFilters.length === 0) { | ||
console.log("All filters are cleared in list view"); | console.log("All filters are cleared in list view"); | ||
communityFeatured.show(); | |||
} else { | } else { | ||
console.log("Some filters are still active in list view"); | console.log("Some filters are still active in list view"); | ||
Line 412: | Line 412: | ||
if ($('#list-list .filtered-value-option input[type="checkbox"]:checked').length === 0) { | if ($('#list-list .filtered-value-option input[type="checkbox"]:checked').length === 0) { | ||
communityFeatured.show(); | |||
} else { | } else { | ||
communityFeatured.hide(); | |||
} | } | ||
} | } |