4,554
edits
No edit summary |
No edit summary |
||
Line 264: | Line 264: | ||
} | } | ||
function closeModal() { | function closeModal() { | ||
showArticleWrapper.hide(); | showArticleWrapper.hide(); | ||
Line 272: | Line 271: | ||
// Revert width of filtered-list-items in #list | // Revert width of filtered-list-items in #list | ||
filteredListItems.css('width', 'calc(20% - 2px)'); | filteredListItems.css('width', 'calc(20% - 2px)'); | ||
checkBlockFiltersCleared(); | |||
checkListFiltersCleared(); | |||
} | } | ||
// Delegate the mousedown event for both block view and list view pages | // Delegate the mousedown event for both block view and list view pages | ||
Line 330: | Line 333: | ||
}); | }); | ||
$('#close-button').on('click', function () { | |||
$('#list, #list-list').removeClass('fade-out'); | $('#list, #list-list').removeClass('fade-out'); | ||
closeModal(); | |||
}); | }); | ||
// Revert changes when clicking outside the modal | // Revert changes when clicking outside the modal | ||
$(document).on('mousedown', function(event) { | $(document).on('mousedown', function(event) { | ||
if (!showArticleWrapper.is(event.target) && showArticleWrapper.has(event.target).length === 0) { | |||
closeModal(); | |||
} | |||
}); | |||
// Hover effect for scrolling | // Hover effect for scrolling |