mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
@@ -9,14 +9,22 @@ $(document).ready(function () {
|
||||
|
||||
$(document).on('click', function (e) {
|
||||
$(".filter-form").each(function () {
|
||||
if ($(this).parent().hasClass("show-filter-dropdown") &&
|
||||
$(this).parent().has(e.target).length === 0 &&
|
||||
!$(this).parent().is(e.target) &&
|
||||
!$("#addLinkedAlbum").is(e.target) &&
|
||||
$("#addLinkedAlbum").has(e.target).length === 0) {
|
||||
$(this).parent().trigger('click');
|
||||
if ($(".filter").has(e.target).length !== 0) {
|
||||
$(e.target).trigger('click');
|
||||
if ($(this).parent().hasClass("show-filter-dropdown")) {
|
||||
// Filter is open
|
||||
|
||||
if ($(this).parent().has(e.target).length === 0 && !$(this).parent().is(e.target)) {
|
||||
// We don't click on a filter or filter's form
|
||||
// $(this).parent().trigger('click');
|
||||
|
||||
if ($("#addLinkedAlbum").has(e.target).length === 0 && !$("#addLinkedAlbum").is(e.target)) {
|
||||
console.log("We don't click in filter manager");
|
||||
$(this).parent().trigger('click');
|
||||
}
|
||||
|
||||
//if target if a filter, open it
|
||||
if ($(".filter").has(e.target).length !== 0) {
|
||||
$(e.target).trigger('click');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user