mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 23:19:04 +01:00
Open Office Editor W.I.P:
- Implement Save As action
This commit is contained in:
parent
ef6bc4c7ce
commit
744d0bd305
@ -1489,7 +1489,7 @@ class filemanager_ui
|
|||||||
$actions = array (
|
$actions = array (
|
||||||
'save' => array(
|
'save' => array(
|
||||||
'caption' => 'Save',
|
'caption' => 'Save',
|
||||||
'icon' => 'save',
|
'icon' => 'apply',
|
||||||
'group' => ++$group,
|
'group' => ++$group,
|
||||||
'onExecute' => 'javaScript:app.filemanager.editor_save',
|
'onExecute' => 'javaScript:app.filemanager.editor_save',
|
||||||
'allowOnMultiple' => false,
|
'allowOnMultiple' => false,
|
||||||
@ -1511,6 +1511,14 @@ class filemanager_ui
|
|||||||
'allowOnMultiple' => false,
|
'allowOnMultiple' => false,
|
||||||
'toolbarDefault' => true
|
'toolbarDefault' => true
|
||||||
),
|
),
|
||||||
|
'saveas' => array(
|
||||||
|
'caption' => 'Save As',
|
||||||
|
'icon' => 'save_all',
|
||||||
|
'group' => ++$group,
|
||||||
|
'onExecute' => 'javaScript:app.filemanager.editor_save',
|
||||||
|
'allowOnMultiple' => false,
|
||||||
|
'toolbarDefault' => true
|
||||||
|
),
|
||||||
'delete' => array(
|
'delete' => array(
|
||||||
'caption' => 'Delete',
|
'caption' => 'Delete',
|
||||||
'icon' => 'delete',
|
'icon' => 'delete',
|
||||||
|
@ -1145,7 +1145,7 @@ app.classes.filemanager = AppJS.extend(
|
|||||||
/**
|
/**
|
||||||
* Method call for saving edited document
|
* Method call for saving edited document
|
||||||
*/
|
*/
|
||||||
editor_save: function () {
|
editor_save: function (_egwAction) {
|
||||||
var self = this,
|
var self = this,
|
||||||
widgetFilePath = this.et2.getWidgetById('file_path'),
|
widgetFilePath = this.et2.getWidgetById('file_path'),
|
||||||
file_path = widgetFilePath.value;
|
file_path = widgetFilePath.value;
|
||||||
@ -1176,7 +1176,7 @@ app.classes.filemanager = AppJS.extend(
|
|||||||
}
|
}
|
||||||
|
|
||||||
//existed file
|
//existed file
|
||||||
if (file_path != '') {
|
if (file_path != '' && _egwAction.id != 'saveas') {
|
||||||
this.editor.getDocumentAsByteArray(saveByteArrayLocally);
|
this.editor.getDocumentAsByteArray(saveByteArrayLocally);
|
||||||
}
|
}
|
||||||
// new file
|
// new file
|
||||||
@ -1187,7 +1187,7 @@ app.classes.filemanager = AppJS.extend(
|
|||||||
id:'savefile',
|
id:'savefile',
|
||||||
mode: 'saveas',
|
mode: 'saveas',
|
||||||
button_caption:"",
|
button_caption:"",
|
||||||
button_label:"save",
|
button_label:_egwAction.id == 'saveas'?"save as":"save",
|
||||||
value: "doc.odt"
|
value: "doc.odt"
|
||||||
}, this.et2);
|
}, this.et2);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user