W.I.P. collab editor:

- fix edit item in contextmenu not working
This commit is contained in:
Hadi Nategh 2016-08-23 13:56:36 +02:00
parent b7eb55f6fa
commit 4b880bdf89
2 changed files with 15 additions and 16 deletions

View File

@ -1017,11 +1017,25 @@ app.classes.filemanager = AppJS.extend(
* @todo: creating new empty odt file * @todo: creating new empty odt file
*/ */
editor_new: function (_egwAction) { editor_new: function (_egwAction) {
var self = this,
template_url = '/api/js/webodf/template.odt'; template_url = '/api/js/webodf/template.odt';
egw.open_link(egw.link('/index.php', { egw.open_link(egw.link('/index.php', {
menuaction: 'filemanager.filemanager_ui.editor', menuaction: 'filemanager.filemanager_ui.editor',
path: template_url path: template_url
}), '', egw.link_get_registry('filemanager','view_popup')); }), '', egw.link_get_registry('filemanager','view_popup'));
},
/**
* Function to check wheter selected file is editable. ATM only .odt is supported.
*
* @param {object} _egwAction egw action object
* @param {object} _senders object of selected row
*
* @returns {boolean} returns true if is editable otherwise false
*/
isEditable: function (_egwAction, _senders) {
var data = egw.dataGetUIDdata(_senders[0].id),
mime = this.et2._inst.widgetContainer.getWidgetById('$row');
return data.data.mime.match(mime.mime_odf_regex)?true:false;
} }
}); });

View File

@ -359,21 +359,6 @@ app.classes.filemanager = app.classes.filemanager.extend({
jQuery.ajax(ajaxObj); jQuery.ajax(ajaxObj);
}, },
/**
* Function to check wheter selected file is editable. ATM only .odt is supported.
*
* @param {object} _egwAction egw action object
* @param {object} _senders object of selected row
*
* @returns {boolean} returns true if is editable otherwise false
*/
isEditable: function (_egwAction, _senders) {
var data = egw.dataGetUIDdata(_senders[0].id),
mime = this.et2._inst.widgetContainer.getWidgetById('$row');
return data.data.mime.match(mime.mime_odf_regex)?true:false;
},
/** /**
* Function to get full file path * Function to get full file path
* *