mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 23:19:04 +01:00
Open Office Editor W.I.P:
- Add New action into context menu as well - Fix calling cancel on save dialog set a wrong path
This commit is contained in:
parent
1c5c1e407b
commit
748e861580
@ -138,6 +138,17 @@ class filemanager_ui
|
|||||||
'onExecute' => 'javaScript:app.filemanager.open',
|
'onExecute' => 'javaScript:app.filemanager.open',
|
||||||
'enabled' => 'javaScript:app.filemanager.isEditable',
|
'enabled' => 'javaScript:app.filemanager.isEditable',
|
||||||
),
|
),
|
||||||
|
'new' => array(
|
||||||
|
'caption' => 'New',
|
||||||
|
'group' => $group,
|
||||||
|
'children' => array (
|
||||||
|
'document' => array (
|
||||||
|
'caption' => 'Document',
|
||||||
|
'icon' => 'new',
|
||||||
|
'onExecute' => 'javaScript:app.filemanager.editor_new',
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
'saveas' => array(
|
'saveas' => array(
|
||||||
'caption' => lang('Save as'),
|
'caption' => lang('Save as'),
|
||||||
'group' => $group,
|
'group' => $group,
|
||||||
|
@ -1194,10 +1194,13 @@ app.classes.filemanager = AppJS.extend(
|
|||||||
// bind change handler for setting the selected path and calling save
|
// bind change handler for setting the selected path and calling save
|
||||||
jQuery(vfs_select.getDOMNode()).on('change', function (){
|
jQuery(vfs_select.getDOMNode()).on('change', function (){
|
||||||
file_path = '/webdav.php'+vfs_select.get_value();
|
file_path = '/webdav.php'+vfs_select.get_value();
|
||||||
// Add odt extension if not exist
|
if (vfs_select.get_value())
|
||||||
if (!file_path.match(/\.odt$/,'ig')) file_path += '.odt';
|
{
|
||||||
widgetFilePath.set_value(file_path);
|
// Add odt extension if not exist
|
||||||
self.editor.getDocumentAsByteArray(saveByteArrayLocally);
|
if (!file_path.match(/\.odt$/,'ig')) file_path += '.odt';
|
||||||
|
widgetFilePath.set_value(file_path);
|
||||||
|
self.editor.getDocumentAsByteArray(saveByteArrayLocally);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// start the file selector dialog
|
// start the file selector dialog
|
||||||
jQuery(vfs_select.getDOMNode()).click();
|
jQuery(vfs_select.getDOMNode()).click();
|
||||||
|
Loading…
Reference in New Issue
Block a user