4,554
edits
No edit summary |
No edit summary |
||
Line 463: | Line 463: | ||
} | } | ||
// Close modal with Close button | |||
$('#close-button').on('click', function () { | |||
$('#list, #list-list, #list-list-1, #list-list-2, #list-list-3, #list-block-1, #list-block-2, #list-block-3').removeClass('fade-out'); | |||
closeModal(); | |||
}); | |||
// Alternative way to Close modal and remove fade out when clicking outside of card | |||
$(document).on('mousedown', function (event) { | $(document).on('mousedown', function (event) { | ||
var isOutsideWrapper = !showArticleWrapper.is(event.target) && showArticleWrapper.has(event.target).length === 0; | var isOutsideWrapper = !showArticleWrapper.is(event.target) && showArticleWrapper.has(event.target).length === 0; | ||
var isOnCard = $(event.target).closest('.card, .list-card').length > 0; | var isOnCard = $(event.target).closest('.card, .list-card').length > 0; | ||
if (isOutsideWrapper && !isOnCard) { | if (isOutsideWrapper && !isOnCard) { | ||
console.log('Hiding fixed column'); | console.log('Hiding fixed column'); | ||
$('#list, #list-list, #list-list-1, #list-list-2, #list-list-3, #list-block-1, #list-block-2, #list-block-3').removeClass('fade-out'); | $('#list, #list-list, #list-list-1, #list-list-2, #list-list-3, #list-block-1, #list-block-2, #list-block-3').removeClass('fade-out'); | ||
showArticleWrapper.css('display', 'none'); | showArticleWrapper.css('display', 'none'); | ||
} | } | ||
}); | }); | ||