From a509bb677ca626315d71e07afc8342a0690b6859 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Mon, 16 May 2011 09:53:08 -0400 Subject: [PATCH] - Add option to set default action of Forward button to "Forward as attachment" --- program/js/app.js | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 3f103de..c4aa509 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -931,10 +931,13 @@ case 'forward-attachment': case 'forward': - var uid; - if (uid = this.get_single_uid()) - this.goto_url('compose', '_forward_uid='+uid+'&_mbox='+urlencode(this.env.mailbox) - + (command == 'forward-attachment' ? '&_attachment=1' : ''), true); + var uid, url; + if (uid = this.get_single_uid()) { + url = '_forward_uid='+uid+'&_mbox='+urlencode(this.env.mailbox); + if (command == 'forward-attachment' || (!props && this.env.forward_attachment)) + url += '&_attachment=1'; + this.goto_url('compose', url, true); + } break; case 'print': -- Gitblit v1.9.1