forked from extern/egroupware
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:
parent
1387988eff
commit
bf764df720
@ -545,6 +545,24 @@ egw.extend('links', egw.MODULE_GLOBAL, function()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return ['edit'].indexOf(fe.mime[mime].name) !== -1;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
@ -1127,7 +1127,7 @@ app.classes.mail = AppJS.extend(
|
|||||||
];
|
];
|
||||||
const collabora = {
|
const collabora = {
|
||||||
id: 'collabora',
|
id: 'collabora',
|
||||||
label: 'Open',
|
label: 'Open with Collabora Office',
|
||||||
icon: 'collabora/navbar',
|
icon: 'collabora/navbar',
|
||||||
value: 'collabora'
|
value: 'collabora'
|
||||||
};
|
};
|
||||||
@ -1139,14 +1139,18 @@ app.classes.mail = AppJS.extend(
|
|||||||
// for some reason label needs to be set explicitly for the dropdown button. It needs more investigation.
|
// for some reason label needs to be set explicitly for the dropdown button. It needs more investigation.
|
||||||
_item.actionsDefaultLabel = 'Download';
|
_item.actionsDefaultLabel = 'Download';
|
||||||
|
|
||||||
if (typeof this.egw.user('apps')['collabora'] !== "undefined" && this.egw.isEditable(_item.type))
|
if (typeof this.egw.user('apps')['collabora'] !== "undefined" && this.egw.isCollaborable(_item.type))
|
||||||
{
|
{
|
||||||
|
// Start with download on top, Collabora on bottom
|
||||||
|
sel_options.attachmentsBlock[_item.attachment_number + "[actions]"] = [...actions, collabora];
|
||||||
|
|
||||||
if (egw.preference('document_doubleclick_action', 'filemanager') === 'collabora')
|
if (egw.preference('document_doubleclick_action', 'filemanager') === 'collabora')
|
||||||
{
|
{
|
||||||
_item.actions = 'collabora';
|
_item.actions = 'collabora';
|
||||||
_item.actionsDefaultLabel = 'Collabora';
|
_item.actionsDefaultLabel = 'Collabora';
|
||||||
|
// Put Collabora on top
|
||||||
|
sel_options.attachmentsBlock[_item.attachment_number + "[actions]"] = [collabora, ...actions];
|
||||||
}
|
}
|
||||||
sel_options.attachmentsBlock[_item.attachment_number + "[actions]"] = [...actions, collabora];
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -414,6 +414,7 @@ only one window mail de nur ein einziges Fenster
|
|||||||
only send message, do not copy a version of the message to the configured sent folder mail de Versende Nachricht, kopiere sie nicht in den konfigurierten Gesendet Ordner
|
only send message, do not copy a version of the message to the configured sent folder mail de Versende Nachricht, kopiere sie nicht in den konfigurierten Gesendet Ordner
|
||||||
open in html mode mail de In HTML-Modus öffnen
|
open in html mode mail de In HTML-Modus öffnen
|
||||||
open in text mode mail de In Text-Modus öffnen
|
open in text mode mail de In Text-Modus öffnen
|
||||||
|
open with collabora office mail de Mit Collabora Online öffnen
|
||||||
organisation admin de Organisation
|
organisation admin de Organisation
|
||||||
organization mail de Organisation
|
organization mail de Organisation
|
||||||
original message mail de ursprüngliche Nachricht
|
original message mail de ursprüngliche Nachricht
|
||||||
|
@ -414,6 +414,7 @@ only one window mail en only one window
|
|||||||
only send message, do not copy a version of the message to the configured sent folder mail en only send message, do not copy a version of the message to the configured sent folder
|
only send message, do not copy a version of the message to the configured sent folder mail en only send message, do not copy a version of the message to the configured sent folder
|
||||||
open in html mode mail en Open in HTML mode
|
open in html mode mail en Open in HTML mode
|
||||||
open in text mode mail en Open in Text mode
|
open in text mode mail en Open in Text mode
|
||||||
|
open with collabora office mail en Open with Collabora Office
|
||||||
organisation admin en organisation
|
organisation admin en organisation
|
||||||
organization mail en organization
|
organization mail en organization
|
||||||
original message mail en original message
|
original message mail en original message
|
||||||
|
Loading…
Reference in New Issue
Block a user