MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 250: Line 250:
     }
     }


     // Delegate the mousedown event for the block view page
     // Delegate the mousedown event for both block view and list view pages
    $('#list').on('mousedown', '.card', function (event) {
$('#list, #list-list').on('mousedown', '.card, .list-card', function (event) {
        if ($(event.target).closest('.people a, .type a').length) {
    if ($(event.target).closest('.people a, .type a').length) {
            return; // Clicked on a link inside '.people' or '.type', do nothing
        return; // Clicked on a link inside '.people' or '.type', do nothing
        }
    }
        openModal(this);
    openModal(this);
    });
});


    // Delegate the mousedown event for the list view page
    $('#list-list').on('mousedown', '.list-card', function (event) {
        if ($(event.target).closest('.people a, .type a').length) {
            return; // Clicked on a link inside '.people' or '.type', do nothing
        }
        openModal(this);
    });


   
     function setupImageToggle(images) {
     function setupImageToggle(images) {
         var currentIndex = 0;
         var currentIndex = 0;

Navigation menu