mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 20:01:36 +02:00
Add collabora action into default and set attachments label
This commit is contained in:
parent
bd8198d230
commit
5ade68dd76
@ -792,19 +792,13 @@ class mail_hooks
|
|||||||
*/
|
*/
|
||||||
public static function attachmentsBlockActions()
|
public static function attachmentsBlockActions()
|
||||||
{
|
{
|
||||||
return [
|
$actions = [
|
||||||
'downloadOneAsFile' => [
|
'downloadOneAsFile' => [
|
||||||
'id' => 'downloadOneAsFile',
|
'id' => 'downloadOneAsFile',
|
||||||
'label' => 'Download',
|
'label' => 'Download',
|
||||||
'icon' => 'fileexport',
|
'icon' => 'fileexport',
|
||||||
'value' => 'downloadOneAsFile'
|
'value' => 'downloadOneAsFile'
|
||||||
],
|
],
|
||||||
'collabora' => [
|
|
||||||
'id' => 'collabora',
|
|
||||||
'label' => 'Open with Collabora',
|
|
||||||
'icon' => 'open',
|
|
||||||
'value' => 'collabora'
|
|
||||||
],
|
|
||||||
'saveOneToVfs' => [
|
'saveOneToVfs' => [
|
||||||
'id' => 'saveOneToVfs',
|
'id' => 'saveOneToVfs',
|
||||||
'label' => 'Save in Filemanager',
|
'label' => 'Save in Filemanager',
|
||||||
@ -824,5 +818,15 @@ class mail_hooks
|
|||||||
'value' => 'downloadAllToZip'
|
'value' => 'downloadAllToZip'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
if (file_exists(EGW_SERVER_ROOT.'/collabora'))
|
||||||
|
{
|
||||||
|
$actions['collabora'] = [
|
||||||
|
'id' => 'collabora',
|
||||||
|
'label' => 'Open with Collabora',
|
||||||
|
'icon' => 'open',
|
||||||
|
'value' => 'collabora'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return $actions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2525,7 +2525,8 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
|||||||
$attachmentHTML[$key]['mail_id'] = $rowID;
|
$attachmentHTML[$key]['mail_id'] = $rowID;
|
||||||
$attachmentHTML[$key]['winmailFlag']=$value['is_winmail'];
|
$attachmentHTML[$key]['winmailFlag']=$value['is_winmail'];
|
||||||
$attachmentHTML[$key]['smime_type'] = $value['smime_type'];
|
$attachmentHTML[$key]['smime_type'] = $value['smime_type'];
|
||||||
$attachmentHTML[$key]['actions'] = 'downloadOneAsFile';
|
$attachmentHTML[$key]['actions'] = $GLOBALS['egw_info']['user']['preferences']['filemanager']['document_doubleclick_action'] === 'collabora' ?
|
||||||
|
'collabora' : 'downloadOneAsFile';
|
||||||
$attachmentHTML[$key]['actionsDefaultLabel'] = 'Download';
|
$attachmentHTML[$key]['actionsDefaultLabel'] = 'Download';
|
||||||
|
|
||||||
// reset mode array as it should be considered differently for
|
// reset mode array as it should be considered differently for
|
||||||
|
@ -1141,6 +1141,11 @@ app.classes.mail = AppJS.extend(
|
|||||||
|
|
||||||
if (typeof this.egw.user('apps')['collabora'] !== "undefined" && this.egw.isEditable(_item.type))
|
if (typeof this.egw.user('apps')['collabora'] !== "undefined" && this.egw.isEditable(_item.type))
|
||||||
{
|
{
|
||||||
|
if (egw.preference('document_doubleclick_action', 'filemanager') === 'collabora')
|
||||||
|
{
|
||||||
|
_item.actions = 'downloadOneAsFile';
|
||||||
|
_item.actionsDefaultLabel = 'Collabora';
|
||||||
|
}
|
||||||
sel_options.attachmentsBlock[_item.attachment_number + "[actions]"] = [...actions, collabora];
|
sel_options.attachmentsBlock[_item.attachment_number + "[actions]"] = [...actions, collabora];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<column disabled="!@showtempname"/>
|
<column disabled="!@showtempname"/>
|
||||||
<column disabled="!@showtempname"/>
|
<column disabled="!@showtempname"/>
|
||||||
<column width="70%" />
|
<column width="70%" />
|
||||||
<column width="11%" />
|
<column width="20%" />
|
||||||
<column width="10%"/>
|
<column width="10%"/>
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
@ -70,7 +70,8 @@
|
|||||||
<et2-description id="attachmentsBlock[0][type]"></et2-description>
|
<et2-description id="attachmentsBlock[0][type]"></et2-description>
|
||||||
<et2-description id="attachmentsBlock[0][winmailFlag]"></et2-description>
|
<et2-description id="attachmentsBlock[0][winmailFlag]"></et2-description>
|
||||||
<et2-description-expose class="et2_link useEllipsis" id="attachmentsBlock[0][filename]" mime="@attachmentsBlock[0][type]" href="@attachmentsBlock[0][mime_url]" noLang="1" mimeData="@attachmentsBlock[0][mime_data]"></et2-description-expose>
|
<et2-description-expose class="et2_link useEllipsis" id="attachmentsBlock[0][filename]" mime="@attachmentsBlock[0][type]" href="@attachmentsBlock[0][mime_url]" noLang="1" mimeData="@attachmentsBlock[0][mime_data]"></et2-description-expose>
|
||||||
<et2-description align="right" id="attachmentsBlock[0][size]"></et2-description>
|
<et2-description value="@attachmentsBlockTitle"></et2-description>
|
||||||
|
<et2-button align="right" label="@attachmentsBlock[0][actionsDefaultLabel]" onchange="app.mail.attachmentsBlockActions" onclick="app.mail.attachmentsBlockActions"/>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user