Mail: Clicking "on vacation" opens vacation dialog

This commit is contained in:
nathan 2022-12-05 16:43:48 -07:00
parent 09ecd29a91
commit c9186240c8
2 changed files with 14 additions and 3 deletions

View File

@ -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)

View File

@ -125,7 +125,8 @@
<buttononly id="button[mailcreate]" onclick="app.mail.mail_compose(false);" label="Compose" image="add"/>
</template>
<template id="mail.index.header_right" template="" lang="" group="0" version="1.9.001">
<et2-details id="mail.index.vacationnotice" disabled="true" summary="on vacation" toggleOnHover="true" hoist="true" class="vacationnotice">
<et2-details id="mail.index.vacationnotice" disabled="true" summary="on vacation" toggleOnHover="true"
hoist="true" class="vacationnotice" onclick="app.mail.edit_vacation">
<description id="nm[vacationnotice]" class="@nm[vacationclass]"/>
<description id="nm[vacationrange]" class="@nm[vacationrangeclass]"/>
</et2-details>