mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
W.I.P. collab editor:
- Fix path indicator shows webdav.php as prefix
This commit is contained in:
parent
4b880bdf89
commit
521c0e74fe
@ -1497,7 +1497,7 @@ class filemanager_ui
|
||||
if ($file_path)
|
||||
{
|
||||
$content['es_id'] = md5 ($file_path);
|
||||
$content['file_path'] = $file_path;
|
||||
$content['file_path'] = $paths[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1017,7 +1017,7 @@ app.classes.filemanager = AppJS.extend(
|
||||
* @todo: creating new empty odt file
|
||||
*/
|
||||
editor_new: function (_egwAction) {
|
||||
template_url = '/api/js/webodf/template.odt';
|
||||
var template_url = '/api/js/webodf/template.odt';
|
||||
egw.open_link(egw.link('/index.php', {
|
||||
menuaction: 'filemanager.filemanager_ui.editor',
|
||||
path: template_url
|
||||
|
@ -237,6 +237,7 @@ app.classes.filemanager = app.classes.filemanager.extend({
|
||||
widgetFilePath = this.et2.getWidgetById('file_path'),
|
||||
file_path = widgetFilePath.value;
|
||||
|
||||
|
||||
if (this.editor)
|
||||
{
|
||||
function saveByteArrayLocally(err, data) {
|
||||
@ -245,15 +246,14 @@ app.classes.filemanager = app.classes.filemanager.extend({
|
||||
return;
|
||||
}
|
||||
|
||||
var filename = file_path.split('/webdav.php'),
|
||||
blob = new Blob([data.buffer], {type: self.editor_mime});
|
||||
var blob = new Blob([data.buffer], {type: self.editor_mime});
|
||||
|
||||
self.editor_file_operation({
|
||||
url: egw.webserverUrl+file_path,
|
||||
url: egw.webserverUrl+'/webdav.php'+file_path,
|
||||
method: 'PUT',
|
||||
processData: false,
|
||||
success: function(data) {
|
||||
egw(window).message(egw.lang('Document %1 successfully has been saved.', filename[1]));
|
||||
egw(window).message(egw.lang('Document %1 successfully has been saved.', file_path));
|
||||
self.editor.setDocumentModified(false);
|
||||
egw.json('filemanager.filemanager_collab.ajax_actions',[self.collab_server.es_id, 'save']).sendRequest();
|
||||
},
|
||||
@ -281,7 +281,7 @@ app.classes.filemanager = app.classes.filemanager.extend({
|
||||
|
||||
// bind change handler for setting the selected path and calling save
|
||||
jQuery(vfs_select.getDOMNode()).on('change', function (){
|
||||
file_path = '/webdav.php'+vfs_select.get_value();
|
||||
file_path = vfs_select.get_value();
|
||||
if (vfs_select.get_value())
|
||||
{
|
||||
// Add odt extension if not exist
|
||||
@ -289,7 +289,8 @@ app.classes.filemanager = app.classes.filemanager.extend({
|
||||
widgetFilePath.set_value(file_path);
|
||||
self.editor.getDocumentAsByteArray(saveByteArrayLocally);
|
||||
self.editor_leaveSession(function(){
|
||||
self._init_odf_collab_editor();
|
||||
var path = window.location.href.split('&path=');
|
||||
window.location.href = path[0]+'&path='+self.editor_getFilePath();
|
||||
});
|
||||
egw.refresh('','filemanager');
|
||||
}
|
||||
@ -368,7 +369,7 @@ app.classes.filemanager = app.classes.filemanager.extend({
|
||||
{
|
||||
var widgetFilePath = this.et2.getWidgetById('file_path'),
|
||||
file_path = widgetFilePath.value,
|
||||
path = egw.webserverUrl+file_path;
|
||||
path = egw.webserverUrl+'/webdav.php'+file_path;
|
||||
return path;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user