diff --git a/src/packages/SystemServices/PushNotification.ts b/src/packages/SystemServices/PushNotification.ts index 23c7acd..1ee0a7d 100644 --- a/src/packages/SystemServices/PushNotification.ts +++ b/src/packages/SystemServices/PushNotification.ts @@ -172,15 +172,19 @@ namespace OS { } else { $(this.nzone).show(); } + console.log(evt, evt.data.item.aid); this.view = !this.view; if (!this.cb) { this.cb = (e) => { + const list_id = $(evt.data.item).attr("list-id"); + console.log(e.target, list_id); if ( !$(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(); - $(document).unbind("click", this.cb); + $(document).off("click", this.cb); this.view = !this.view; } }; @@ -188,7 +192,7 @@ namespace OS { if (this.view) { $(document).on("click", this.cb); } else { - $(document).unbind("click", this.cb); + $(document).off("click", this.cb); } } diff --git a/src/packages/SystemServices/README.md b/src/packages/SystemServices/README.md index acf7e7e..012bef8 100644 --- a/src/packages/SystemServices/README.md +++ b/src/packages/SystemServices/README.md @@ -6,4 +6,5 @@ Basic services: - Calendar service ### change logs +- 0.1.2-b: fix show/hide animation bug - 0.1.1-a: use system css variables in theme \ No newline at end of file diff --git a/src/packages/SystemServices/package.json b/src/packages/SystemServices/package.json index 217302c..055f39b 100644 --- a/src/packages/SystemServices/package.json +++ b/src/packages/SystemServices/package.json @@ -8,7 +8,7 @@ "email": "xsang.le@gmail.com", "licences": "GPLv3" }, - "version": "0.1.1-a", + "version": "0.1.2-b", "category": "System", "iconclass": "fa fa-cog", "mimes": []