From a509bb677ca626315d71e07afc8342a0690b6859 Mon Sep 17 00:00:00 2001 From: alecpl Date: Mon, 16 May 2011 13:53:08 +0000 Subject: - Add option to set default action of Forward button to "Forward as attachment" --- program/js/app.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'program/js/app.js') diff --git a/program/js/app.js b/program/js/app.js index 3f103de65..c4aa50995 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -931,10 +931,13 @@ function rcube_webmail() 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': -- cgit v1.2.3