Fix logic; focus on base window when deleting/reporting
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 18 Nov 2009 17:05:47 +0000 (10:05 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 18 Nov 2009 17:25:56 +0000 (10:25 -0700)
imp/js/fullmessage-dimp.js

index f09a7e9..8a87eee 100644 (file)
@@ -92,8 +92,9 @@ var DimpFullmessage = {
             case 'button_deleted':
             case 'button_ham':
             case 'button_spam':
-                if (id == 'button_deleted') {
-                    if (DIMP.baseWindow && DIMP.baseWindow.DimpBase) {
+                if (DIMP.baseWindow && DIMP.baseWindow.DimpBase) {
+                    DIMP.baseWindow.focus();
+                    if (id == 'button_deleted') {
                         DIMP.baseWindow.DimpBase.deleteMsg({ uid: this.uid, mailbox: this.mailbox });
                     } else {
                         DIMP.baseWindow.DimpBase.reportSpam(id == 'button_spam', { uid: this.uid, mailbox: this.mailbox });