diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-05-25 13:11:17 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-05-25 13:11:17 +0000 |
| commit | 09d1c0af2cbb6d4dba079298b078cb7a12d540f8 (patch) | |
| tree | 46fefd3e361141ac75980e3aa6eb54cc54383a7a /roundcubemail/program | |
| parent | 12db2dc486f83fd481bb40720aba71d846f40821 (diff) | |
- Trigger listupdate event after message removal from list (#1486734)
git-svn-id: https://svn.roundcube.net/trunk@3664 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/js/app.js | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index d948be82a..18cabc246 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -4953,18 +4953,26 @@ function rcube_webmail() // re-enable commands on move/delete error this.enable_command(this.env.message_commands, true); } + else if (this.task == 'mail') { + this.triggerEvent('listupdate', { folder:this.env.mailbox, rowcount:this.message_list.rowcount }); + } + else if (this.task == 'addressbook') { + this.triggerEvent('listupdate', { folder:this.env.source, rowcount:this.contact_list.rowcount }); + } break; case 'purge': case 'expunge': - if (!this.env.messagecount && this.task == 'mail') { - // clear preview pane content - if (this.env.contentframe) - this.show_contentframe(false); - // disable commands useless when mailbox is empty - this.enable_command(this.env.message_commands, - 'purge', 'expunge', 'select-all', 'select-none', 'sort', - 'expand-all', 'expand-unread', 'collapse-all', false); + if (this.task == 'mail') { + if (!this.env.messagecount) { + // clear preview pane content + if (this.env.contentframe) + this.show_contentframe(false); + // disable commands useless when mailbox is empty + this.enable_command(this.env.message_commands, 'purge', 'expunge', + 'select-all', 'select-none', 'sort', 'expand-all', 'expand-unread', 'collapse-all', false); + } + this.triggerEvent('listupdate', { folder:this.env.mailbox, rowcount:this.message_list.rowcount }); } break; |
