Commit b02d9658 authored by Roque's avatar Roque

erp5_officejs_ooffice: enable readonly view for non-only-office documents

parent d4bccb9e
......@@ -119,28 +119,26 @@
name_list.push(view_gadget.state.mime_type);
content_dict.filename = name_list.join('.');
}
return gadget.getSetting("content_type");
})
.push(function (content_type) {
content_dict.content_type = content_type;
return child_gadget.submitContent(
child_gadget.state.jio_key, undefined, content_dict
);
})
.push(function () {
return gadget
.jio_putAttachment(child_gadget.state.jio_key, 'data',
jIO.util.dataURItoBlob(data))
.push(function () {
return gadget.declareGadget("gadget_ojs_cloudooo.html");
})
.push(function (cloudooo) {
return cloudooo
.putAllCloudoooConvertionOperation({
format: view_gadget.state.mime_type,
jio_key: child_gadget.state.jio_key
});
});
if (view_gadget.state.content_editable) {
return gadget
.jio_putAttachment(child_gadget.state.jio_key, 'data',
jIO.util.dataURItoBlob(data))
.push(function () {
return gadget.declareGadget("gadget_ojs_cloudooo.html");
})
.push(function (cloudooo) {
return cloudooo
.putAllCloudoooConvertionOperation({
format: view_gadget.state.mime_type,
jio_key: child_gadget.state.jio_key
});
});
}
}, function (error) {
console.log(error);
return gadget.notifySubmitted({
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment