mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-07-27 03:35:50 +00:00
add 'MailInfo' Widget
This will be used to show the Subject and From on E-Mail Previews. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
816483a244
commit
54d0de79a7
33
js/MailInfo.js
Normal file
33
js/MailInfo.js
Normal file
@ -0,0 +1,33 @@
|
||||
Ext.define('PMG.MailInfoBox', {
|
||||
extend: 'Ext.container.Container',
|
||||
xtype: 'pmgMailInfo',
|
||||
|
||||
cls: 'x-toolbar-default',
|
||||
style: {
|
||||
'border-left': '0px',
|
||||
'border-right': '0px',
|
||||
},
|
||||
|
||||
update: function(data) {
|
||||
let me = this;
|
||||
let escaped = {};
|
||||
for (const [key, value] of Object.entries(data)) {
|
||||
escaped[key] = Ext.htmlEncode(value);
|
||||
}
|
||||
me.items.each((item) => item.update(escaped));
|
||||
},
|
||||
|
||||
layout: {
|
||||
type: 'vbox',
|
||||
align: 'stretch',
|
||||
},
|
||||
|
||||
defaults: {
|
||||
xtype: 'tbtext',
|
||||
},
|
||||
|
||||
items: [
|
||||
{ tpl: `<b>${gettext("From")}:</b> {from}` },
|
||||
{ tpl: `<b>${gettext("Subject")}:</b> {subject}` },
|
||||
],
|
||||
});
|
@ -22,6 +22,7 @@ JSSRC= \
|
||||
MainView.js \
|
||||
QuarantineList.js \
|
||||
SpamInfoGrid.js \
|
||||
MailInfo.js \
|
||||
SpamQuarantine.js \
|
||||
UserBlackWhiteList.js \
|
||||
QuarantineView.js \
|
||||
|
Loading…
Reference in New Issue
Block a user