WIP hide From in mail compose header

This commit is contained in:
milan 2025-02-20 18:17:05 +01:00
parent 327c72413e
commit f3632670fe
4 changed files with 21 additions and 3 deletions

View File

@ -224,7 +224,11 @@ class mail_hooks
'replyto_expander' => array(
'id' => 'replyto_expander',
'label' => lang('Reply to')
)
),
'from_expander' => array(
'id' => 'from_expander',
'label' => lang('hide from')
)
);
foreach($allActions as $name => $action)

View File

@ -4820,20 +4820,29 @@ app.classes.mail = AppJS.extend(
replyto:{
widget:{},
jQClass: '.mailComposeJQueryReplyto'
}};
},
from:{
widget:{},
jQClass: '.mailComposeJQueryFrom'
}
};
var actions = egw.preference('toggledOnActions', 'mail');
actions = actions ? actions.split(',') : [];
for(var widget in widgets)
{
var expanderBtn = widget + '_expander';
widgets[widget].widget = this.et2.getWidgetById(widget);
if(widget === 'from')
widgets['from'].widget = this.et2.getWidgetById('mailaccount');
// Add expander button widget to the widgets object
widgets[expanderBtn] = {widget:this.et2.getWidgetById(expanderBtn)};
if (typeof widgets[widget].widget != 'undefined'
if ((typeof widgets[widget].widget != 'undefined'
&& typeof widgets[expanderBtn].widget != 'undefined'
&& (!widgets[widget].widget.value || !widgets[widget].widget.value.length)
&& actions.indexOf(expanderBtn)<0)
|| expanderBtn ==='from_expander'
)
{
widgets[expanderBtn].widget.set_disabled(false);
jQuery(widgets[widget].jQClass).hide();
@ -4892,6 +4901,9 @@ app.classes.mail = AppJS.extend(
//expWidgets.replyto.set_disabled(true);
}
break;
case 'from_expander':
document.querySelector('.mailComposeHideFrom').style.display=''
break;
}
widget.parentElement.hide()
}

View File

@ -273,6 +273,7 @@ ham folder mail de Ordner für nicht Spam-Nachrichten
handling of external http images / mixed content in mails mail de Behandlung von externen Bilder per http / gemischter Inhalt in E-Mails
header mail de Kopfzeilen
header lines mail de Kopfzeilen anzeigen
hide from mail de Von ausblenden
high mail de hoch
high priority mail de Hohe Priorität
hold %1 to drag files to your computer mail de %1 halten um Dateien auf Ihren Computer zu ziehen

View File

@ -273,6 +273,7 @@ ham folder mail en Ham folder
handling of external http images / mixed content in mails mail en Handling of external images / mixed content in emails
header mail en Header
header lines mail en Header lines
hide from mail en Hide from
high mail en High
high priority mail en High priority
hold %1 to drag files to your computer mail en Hold %1 to drag files to your computer