showDownloads: true,
+ title: gettext('Attachments'),
+ iconCls: 'fa fa-paperclip',
+
minHeight: 50,
maxHeight: 250,
scrollable: true,
+ collapsible: true,
+ titleCollapse: true,
+
store: {
autoDestroy: true,
fields: ['name', 'content-type', 'size'],
},
],
},
- {
- xtype: 'pmgAttachmentGrid',
- reference: 'attachmentlist',
- },
{
xtype: 'pmgMailInfo',
hidden: true,
reference: 'mailinfo',
},
+ {
+ xtype: 'pmgAttachmentGrid',
+ reference: 'attachmentlist',
+ dock: 'bottom',
+ collapsible: false,
+ },
],
},
],
enableToggle: true,
iconCls: 'fa fa-bullhorn',
},
- {
- xtype: 'button',
- reference: 'attachments',
- text: gettext('Toggle Attachments'),
- enableToggle: true,
- pressed: true,
- iconCls: 'fa fa-paperclip',
- },
'->',
{
xtype: 'button',
reference: 'spaminfo',
border: false,
},
- {
- xtype: 'pmgAttachmentGrid',
- reference: 'attachmentlist',
- showDownloads: false,
- border: false,
- },
{
xtype: 'pmgMailInfo',
hidden: true,
reference: 'mailinfo',
border: false,
},
+ {
+ xtype: 'pmgAttachmentGrid',
+ reference: 'attachmentlist',
+ showDownloads: false,
+ border: false,
+ dock: 'bottom',
+ },
],
},
],
enableToggle: true,
iconCls: 'fa fa-file-code-o',
},
- {
- xtype: 'button',
- reference: 'attachments',
- text: gettext('Toggle Attachments'),
- enableToggle: true,
- pressed: true,
- iconCls: 'fa fa-paperclip',
- },
'->',
{
xtype: 'button',
},
],
},
- {
- xtype: 'pmgAttachmentGrid',
- reference: 'attachmentlist',
- showDownloads: false,
- border: false,
- },
{
xtype: 'pmgMailInfo',
hidden: true,
reference: 'mailinfo',
border: false,
},
+ {
+ xtype: 'pmgAttachmentGrid',
+ reference: 'attachmentlist',
+ showDownloads: false,
+ border: false,
+ dock: 'bottom',
+ },
],
},
],
me.lookupReference('raw').setDisabled(true);
me.lookupReference('download').setDisabled(true);
me.lookupReference('mailinfo').setVisible(false);
+ me.lookup('attachmentlist')?.setVisible(false);
let preview = me.lookupReference('preview');
preview.setDisabled(false);
me.updatePreview(me.raw, rec);
},
- toggleAttachments: function(button) {
- var grid = this.lookup('attachmentlist');
- grid?.setVisible(!grid?.isVisible());
- },
-
btnHandler: function(button, e) {
let me = this;
let action = button.reference;
let rec = selection[0] || {};
me.lookup('spaminfo')?.setID(rec);
me.lookup('attachmentlist')?.setID(rec);
+ me.lookup('attachmentlist')?.setVisible(!!rec.data);
me.getViewModel().set('mailid', rec.data ? rec.data.id : '');
me.updatePreview(me.raw || false, rec);
'button[reference=raw]': {
click: 'toggleRaw',
},
- 'button[reference=attachments]': {
- click: 'toggleAttachments',
- },
'pmgQuarantineList': {
selectionChange: 'onSelectMail',
itemkeypress: 'keyPress',