From c9186240c825a09ba33433d29b88056d1cdc0786 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 5 Dec 2022 16:43:48 -0700 Subject: [PATCH] Mail: Clicking "on vacation" opens vacation dialog --- mail/js/app.js | 14 ++++++++++++-- mail/templates/default/index.xet | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index 22b616d46a..6daa5d0066 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -4316,8 +4316,18 @@ app.classes.mail = AppJS.extend( */ edit_vacation: function(_action, _senders) { - var acc_id = parseInt(_senders[0].id); - this.egw.open_link('mail.mail_sieve.editVacation&acc_id='+acc_id,'_blank','700x560'); + let acc_id; + if (!Array.isArray(_senders)) + { + // Coming from "on vacation" in nm header + acc_id = parseInt(this.et2.getWidgetById('nm[foldertree]').value); + } + else + { + // Coming from tree + acc_id = parseInt(_senders[0].id); + } + this.egw.open_link('mail.mail_sieve.editVacation&acc_id=' + acc_id, '_blank', '700x560'); }, subscription_refresh: function(_data) diff --git a/mail/templates/default/index.xet b/mail/templates/default/index.xet index 3276de3ae2..ce15232f2f 100644 --- a/mail/templates/default/index.xet +++ b/mail/templates/default/index.xet @@ -125,7 +125,8 @@