Mail: Multiple attachments changes

- Offer to open in Collabora any file, not just editable (PDF)
- Put collabora option first in the option list if user prefers to open in collabora
- Change label to "Open with Collabora Office" with translation from Birgit
This commit is contained in:
nathan
2023-02-09 10:39:12 -07:00
parent 1387988eff
commit bf764df720
4 changed files with 27 additions and 3 deletions

View File

@ -545,6 +545,24 @@ egw.extend('links', egw.MODULE_GLOBAL, function()
return false;
}
return ['edit'].indexOf(fe.mime[mime].name) !== -1;
},
/**
* Check if a mimetype is openable in Collabora
* (without needing to have Collabora JS loaded)
*
* @param mime
*
* @return string|false
*/
isCollaborable: function (mime)
{
// Additional check to see if Collabora can open the file at all, not just edit it
let fe = this.file_editor_prefered_mimes(mime);
if (fe && fe.mime && fe.mime[mime] && fe.mime[mime].name || this.isEditable(mime))
{
return fe.mime[mime].name;
}
}
}
});