mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
Open Office Editor W.I.P:
- Add Edit option in filemanager's contextmenu
This commit is contained in:
parent
fa5767d156
commit
40f3dce568
@ -131,6 +131,13 @@ class filemanager_ui
|
||||
'onExecute' => 'javaScript:app.filemanager.open',
|
||||
'default' => true
|
||||
),
|
||||
'modify' => array(
|
||||
'caption' => lang('Edit'),
|
||||
'group' => $group,
|
||||
'icon' => 'edit',
|
||||
'onExecute' => 'javaScript:app.filemanager.open',
|
||||
'enabled' => 'javaScript:app.filemanager.isEditable',
|
||||
),
|
||||
'saveas' => array(
|
||||
'caption' => lang('Save as'),
|
||||
'group' => $group,
|
||||
|
@ -781,6 +781,13 @@ app.classes.filemanager = AppJS.extend(
|
||||
{
|
||||
mime_dom.click();
|
||||
}
|
||||
else if (_action.id == 'modify' && mime && data.data.mime.match(mime.mime_odf_regex))
|
||||
{
|
||||
egw.open_link(egw.link('/index.php', {
|
||||
menuaction: 'filemanager.filemanager_ui.editor',
|
||||
path: data.data.download_url
|
||||
}), '', '800x600');
|
||||
}
|
||||
else
|
||||
{
|
||||
// Build ViewerJS url
|
||||
@ -1204,6 +1211,17 @@ app.classes.filemanager = AppJS.extend(
|
||||
break;
|
||||
}
|
||||
jQuery.ajax(ajaxObj);
|
||||
},
|
||||
|
||||
/**
|
||||
* Function to check wheter selected file is editable. ATM only .odt is supported.
|
||||
*
|
||||
* @returns {boolean} returns true if is editable otherwise false
|
||||
*/
|
||||
isEditable: function (_egwAction, _senders) {
|
||||
var data = egw.dataGetUIDdata(_senders[0].id);
|
||||
var mime = this.et2._inst.widgetContainer.getWidgetById('$row');
|
||||
return data.data.mime.match(mime.mime_odf_regex)?true:false;
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -120,4 +120,11 @@ table.egwGridView_grid .tile .file_tile {
|
||||
}
|
||||
|
||||
.mimeIcon {width:65px;}
|
||||
.previewImage {width:100%;}
|
||||
.previewImage {width:100%;}
|
||||
|
||||
#filemanager-editor_file_path {
|
||||
font-size: 11pt;
|
||||
display: inline-block;
|
||||
margin-top: 5px;
|
||||
margin-left: 10px;
|
||||
}
|
@ -6,12 +6,12 @@
|
||||
<grid width="100%" height="100%">
|
||||
<columns>
|
||||
<column width="100%"/>
|
||||
<column width="100%"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row height="30">
|
||||
<box>
|
||||
<row height="45" class="dialogHeader">
|
||||
<box height="30">
|
||||
<toolbar id="tools"/>
|
||||
<description id="file_path"/>
|
||||
</box>
|
||||
</row>
|
||||
<row>
|
||||
|
@ -165,6 +165,12 @@ input.displayNone {
|
||||
.previewImage {
|
||||
width: 100%;
|
||||
}
|
||||
#filemanager-editor_file_path {
|
||||
font-size: 11pt;
|
||||
display: inline-block;
|
||||
margin-top: 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
/*/*****************************************************************
|
||||
// sidebar
|
||||
|
||||
|
@ -153,6 +153,12 @@ input.displayNone {
|
||||
.previewImage {
|
||||
width: 100%;
|
||||
}
|
||||
#filemanager-editor_file_path {
|
||||
font-size: 11pt;
|
||||
display: inline-block;
|
||||
margin-top: 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
/*/*****************************************************************
|
||||
// sidebar
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user