mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:04:53 +01:00
W.I.P. of new approach for mail winmail.dat attachment handling
- Try to use mail client cache and store resolved winmail.dat attachments, it will avoid resolve it again
This commit is contained in:
parent
bace5cc1fc
commit
6124a7fc21
@ -847,21 +847,28 @@ app.classes.mail = AppJS.extend(
|
|||||||
|
|
||||||
// Try to resolve winmail.data attachment
|
// Try to resolve winmail.data attachment
|
||||||
if (dataElem.data && dataElem.data.attachmentsBlock[0]
|
if (dataElem.data && dataElem.data.attachmentsBlock[0]
|
||||||
&& dataElem.data.attachmentsBlock[0].winmailFlag)
|
&& dataElem.data.attachmentsBlock[0].winmailFlag
|
||||||
|
&& (dataElem.data.attachmentsBlock[0].mimetype =='application/ms-tnef' ||
|
||||||
|
dataElem.data.attachmentsBlock[0].filename == "winmail.dat"))
|
||||||
{
|
{
|
||||||
attachmentArea.getDOMNode().classList.add('loading');
|
attachmentArea.getDOMNode().classList.add('loading');
|
||||||
this.egw.jsonq('mail.mail_ui.ajax_resolveWinmail',[_id], function(_data){
|
this.egw.jsonq('mail.mail_ui.ajax_resolveWinmail',[_id], jQuery.proxy(function(_data){
|
||||||
attachmentArea.getDOMNode().classList.remove('loading');
|
attachmentArea.getDOMNode().classList.remove('loading');
|
||||||
if (typeof _data == 'object')
|
if (typeof _data == 'object')
|
||||||
{
|
{
|
||||||
attachmentArea.set_value({content:_data});
|
attachmentArea.set_value({content:_data});
|
||||||
|
|
||||||
|
this.data.attachmentsBlock = _data;
|
||||||
|
// Update client cache to avoid resolving winmail.dat attachment again
|
||||||
|
egw.dataStoreUID(this.data.uid, this.data);
|
||||||
|
|
||||||
set_prev_iframe_top();
|
set_prev_iframe_top();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
console.log('Can not resolve the winmail.data!');
|
console.log('Can not resolve the winmail.data!');
|
||||||
}
|
}
|
||||||
});
|
},dataElem));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user