| | |
| | | |
| | | // if there is a trash mailbox defined and we're not currently in it: |
| | | if (this.env.trash_mailbox && String(this.env.mailbox).toLowerCase()!=String(this.env.trash_mailbox).toLowerCase()) |
| | | this.move_messages(this.env.trash_mailbox); |
| | | // if shift was pressed delete it immediately |
| | | if (this.message_list.shiftkey) |
| | | { |
| | | if (confirm(this.get_label('deletemessagesconfirm'))) |
| | | this.permanently_remove_messages(); |
| | | } |
| | | else |
| | | this.move_messages(this.env.trash_mailbox); |
| | | // if there is a trash mailbox defined but we *are* in it: |
| | | else if (this.env.trash_mailbox && String(this.env.mailbox).toLowerCase() == String(this.env.trash_mailbox).toLowerCase()) |
| | | this.permanently_remove_messages(); |
| | |
| | | |
| | | case 'list': |
| | | if (this.env.messagecount) |
| | | this.enable_command('purge', (this.env.mailbox==this.env.trash_mailbox)); |
| | | this.enable_command('purge', (this.env.mailbox==this.env.trash_mailbox || this.env.mailbox==this.env.junk_mailbox)); |
| | | |
| | | case 'expunge': |
| | | this.enable_command('select-all', 'select-none', 'expunge', this.env.messagecount ? true : false); |