Fix vfsUpload didn't open mail files

This commit is contained in:
nathan 2023-01-18 13:07:04 -07:00
parent ac8fe33f19
commit 3f5cb42c96

View File

@ -904,14 +904,14 @@ export class et2_vfsUpload extends et2_file
if (file_data && (typeof file_data.download_url != 'undefined'))
{
var fe_mime = egw.file_editor_prefered_mimes(file_data.mime);
// Check if the link entry is mime with media type, in order to open it in expose view
if (typeof file_data.mime === 'string' &&
(file_data.mime.match(mime.mime_regexp,'ig') || (fe_mime && fe_mime.mime[file_data.mime])))
// Pass off opening responsibility to the Et2VfsMime widget
if(typeof file_data.mime === 'string' && mime.isExposable())
{
vfs_attrs.onclick = function(ev) {
vfs_attrs.onclick = function(ev)
{
ev.stopPropagation();
// Pass it off to the associated vfsMime widget
jQuery('img',this.parentNode.parentNode).trigger("click");
jQuery('img', this.parentNode.parentNode).trigger("click");
return false;
};
}