diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-24 13:04:57 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-24 13:04:57 +0000 |
| commit | 33bc6cc7b44fd09d6d887e3ca0428911ac66f67e (patch) | |
| tree | b8229a3f96b905c82cfb66484b21c6b6f9c1d155 /roundcubemail/program/js | |
| parent | c1b3b039ec49ffd3a9f961728d10fbaffda2a04e (diff) | |
- Allow trash/junk subfolders to be purged (#1485085)
git-svn-id: https://svn.roundcube.net/trunk@1570 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index abd5ca748..74e027403 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -203,7 +203,10 @@ function rcube_webmail() if (this.env.messagecount) this.enable_command('select-all', 'select-none', 'expunge', true); - if (this.env.messagecount && (this.env.mailbox==this.env.trash_mailbox || this.env.mailbox==this.env.junk_mailbox)) + if (this.env.messagecount + && (this.env.mailbox == this.env.trash_mailbox || this.env.mailbox == this.env.junk_mailbox + || this.env.mailbox.match('^' + RegExp.escape(this.env.trash_mailbox) + RegExp.escape(this.env.delimiter)) + || this.env.mailbox.match('^' + RegExp.escape(this.env.junk_mailbox) + RegExp.escape(this.env.delimiter)))) this.enable_command('purge', true); this.set_page_buttons(); @@ -3559,7 +3562,11 @@ function rcube_webmail() case 'check-recent': case 'getunread': this.enable_command('show', 'expunge', 'select-all', 'select-none', 'sort', (this.env.messagecount > 0)); - this.enable_command('purge', (this.env.messagecount && (this.env.mailbox==this.env.trash_mailbox || this.env.mailbox==this.env.junk_mailbox))); + var mailboxtest = (this.env.mailbox == this.env.trash_mailbox || this.env.mailbox == this.env.junk_mailbox + || this.env.mailbox.match('^' + RegExp.escape(this.env.trash_mailbox) + RegExp.escape(this.env.delimiter)) + || this.env.mailbox.match('^' + RegExp.escape(this.env.junk_mailbox) + RegExp.escape(this.env.delimiter))) ? true : false; + + this.enable_command('purge', (this.env.messagecount && mailboxtest)); break; |
