From 31c171846ec7c387fb7fc3e979a63330420002b0 Mon Sep 17 00:00:00 2001
From: svncommit <devs@roundcube.net>
Date: Tue, 21 Nov 2006 03:18:29 -0500
Subject: [PATCH] Bypass Trash folder if Shift-Del was pressed.

---
 program/js/app.js |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 6485a98..1f0e3ee 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1342,7 +1342,14 @@
 
     // 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();

--
Gitblit v1.9.1