MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: Manual revert
No edit summary
Line 268: Line 268:
     // Function to close the modal and revert the list changes
     // Function to close the modal and revert the list changes
     function closeModal() {
     function closeModal() {
        showArticleWrapper.hide();
    showArticleWrapper.hide();
        list.width(originalListWidth).css('margin-right', '0');
    list.width(originalListWidth).css('margin-right', '0');
        listList.width(originalListListWidth).css('margin-right', '0');
    listList.width(originalListListWidth).css('margin-right', '0');
       
   
        // 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)');
       
   
        // Show communityFeatured
    // Check if any filters are active
        communityFeatured.show();
    var areFiltersActive = $('#list-list .filtered-value-option input[type="checkbox"]:checked').length > 0;
        communityListFeatured.show();
    }
    // Show communityFeatured only if no filters are active
   
    if (!areFiltersActive) {
        communityFeatured.show();
        communityListFeatured.show();
    }
}
 
     // Delegate the mousedown event for both block view and list view pages
     // Delegate the mousedown event for both block view and list view pages
$('#list, #list-list').on('mousedown', '.card, .list-card', function (event) {
$('#list, #list-list').on('mousedown', '.card, .list-card', function (event) {

Navigation menu