mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +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 (
|
||||
'save' => array(
|
||||
'caption' => 'Save',
|
||||
'icon' => 'save',
|
||||
'icon' => 'apply',
|
||||
'group' => ++$group,
|
||||
'onExecute' => 'javaScript:app.filemanager.editor_save',
|
||||
'allowOnMultiple' => false,
|
||||
@ -1511,6 +1511,14 @@ class filemanager_ui
|
||||
'allowOnMultiple' => false,
|
||||
'toolbarDefault' => true
|
||||
),
|
||||
'saveas' => array(
|
||||
'caption' => 'Save As',
|
||||
'icon' => 'save_all',
|
||||
'group' => ++$group,
|
||||
'onExecute' => 'javaScript:app.filemanager.editor_save',
|
||||
'allowOnMultiple' => false,
|
||||
'toolbarDefault' => true
|
||||
),
|
||||
'delete' => array(
|
||||
'caption' => 'Delete',
|
||||
'icon' => 'delete',
|
||||
|
@ -1145,7 +1145,7 @@ app.classes.filemanager = AppJS.extend(
|
||||
/**
|
||||
* Method call for saving edited document
|
||||
*/
|
||||
editor_save: function () {
|
||||
editor_save: function (_egwAction) {
|
||||
var self = this,
|
||||
widgetFilePath = this.et2.getWidgetById('file_path'),
|
||||
file_path = widgetFilePath.value;
|
||||
@ -1176,7 +1176,7 @@ app.classes.filemanager = AppJS.extend(
|
||||
}
|
||||
|
||||
//existed file
|
||||
if (file_path != '') {
|
||||
if (file_path != '' && _egwAction.id != 'saveas') {
|
||||
this.editor.getDocumentAsByteArray(saveByteArrayLocally);
|
||||
}
|
||||
// new file
|
||||
@ -1187,7 +1187,7 @@ app.classes.filemanager = AppJS.extend(
|
||||
id:'savefile',
|
||||
mode: 'saveas',
|
||||
button_caption:"",
|
||||
button_label:"save",
|
||||
button_label:_egwAction.id == 'saveas'?"save as":"save",
|
||||
value: "doc.odt"
|
||||
}, this.et2);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user