fix: PushNotification service show/hide animation bug
All checks were successful
gitea-sync/antos-frontend/pipeline/head This commit looks good

This commit is contained in:
DanyLE 2024-04-30 16:30:33 +02:00
parent 45b019725d
commit 9fa3ab92bf
3 changed files with 9 additions and 4 deletions

View File

@ -172,15 +172,19 @@ namespace OS {
} else { } else {
$(this.nzone).show(); $(this.nzone).show();
} }
console.log(evt, evt.data.item.aid);
this.view = !this.view; this.view = !this.view;
if (!this.cb) { if (!this.cb) {
this.cb = (e) => { this.cb = (e) => {
const list_id = $(evt.data.item).attr("list-id");
console.log(e.target, list_id);
if ( if (
!$(e.target).closest($(this.nzone)).length && !$(e.target).closest($(this.nzone)).length &&
!$(e.target).closest(evt.data.item).length !$(e.target).closest(`[list-id="${list_id}"]`).length
//!$(e.target).closest($(evt.data.item)).length
) { ) {
$(this.nzone).hide(); $(this.nzone).hide();
$(document).unbind("click", this.cb); $(document).off("click", this.cb);
this.view = !this.view; this.view = !this.view;
} }
}; };
@ -188,7 +192,7 @@ namespace OS {
if (this.view) { if (this.view) {
$(document).on("click", this.cb); $(document).on("click", this.cb);
} else { } else {
$(document).unbind("click", this.cb); $(document).off("click", this.cb);
} }
} }

View File

@ -6,4 +6,5 @@ Basic services:
- Calendar service - Calendar service
### change logs ### change logs
- 0.1.2-b: fix show/hide animation bug
- 0.1.1-a: use system css variables in theme - 0.1.1-a: use system css variables in theme

View File

@ -8,7 +8,7 @@
"email": "xsang.le@gmail.com", "email": "xsang.le@gmail.com",
"licences": "GPLv3" "licences": "GPLv3"
}, },
"version": "0.1.1-a", "version": "0.1.2-b",
"category": "System", "category": "System",
"iconclass": "fa fa-cog", "iconclass": "fa fa-cog",
"mimes": [] "mimes": []