mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-08-14 06:58:53 +00:00

tying to meake better use of empty space Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
39 lines
883 B
JavaScript
39 lines
883 B
JavaScript
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.util.Format.ellipsis(Ext.htmlEncode(value), 103);
|
|
}
|
|
me.items.each((item) => item.update(escaped));
|
|
},
|
|
|
|
layout: {
|
|
type: 'vbox',
|
|
align: 'stretch',
|
|
},
|
|
|
|
defaults: {
|
|
xtype: 'tbtext',
|
|
margin: '2 2 0 0 ',
|
|
},
|
|
|
|
items: [
|
|
{
|
|
tpl: `<b class="bold">${gettext("From")}:</b> {from}`
|
|
+ `<span style="float:right;white-space:normal;overflow-wrap:break-word;">`
|
|
+ `<b class="bold">${gettext("Receiver")}:</b> {receiver}</span>`,
|
|
},
|
|
{ tpl: `<b class="bold">${gettext("Subject")}:</b> {subject}` },
|
|
],
|
|
});
|