Bypass Trash folder if Shift-Del was pressed.

release-0.6
svncommit 18 years ago
parent d170085600
commit 31c171846e

@ -1342,6 +1342,13 @@ function rcube_webmail()
// 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())
// 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())

@ -32,6 +32,8 @@ function rcube_list_widget(list, p)
this.rows = [];
this.selection = [];
this.shiftkey = false;
this.multiselect = false;
this.draggable = false;
this.keyboard = false;
@ -504,6 +506,8 @@ key_press: function(e)
if (this.focused != true)
return true;
this.shiftkey = e.shiftKey;
var keyCode = document.layers ? e.which : document.all ? event.keyCode : document.getElementById ? e.keyCode : 0;
var mod_key = rcube_event.get_modifier(e);
switch (keyCode)

@ -68,6 +68,8 @@ $messages['errordeleting'] = 'Could not delete the message';
$messages['deletecontactconfirm'] = 'Do you really want to delete the selected contact(s)?';
$messages['deletemessagesconfirm'] = 'Do you really want to delete the selected message(s)?';
$messages['deletefolderconfirm'] = 'Do you really want to delete this folder?';
$messages['purgefolderconfirm'] = 'Do you really want to delete all messages in this folder?';

@ -79,6 +79,7 @@ function rcmail_mailbox_list($attrib)
// add some labels to client
rcube_add_label('purgefolderconfirm');
rcube_add_label('deletemessagesconfirm');
// $mboxlist_start = rcube_timer();

Loading…
Cancel
Save