Commit a4e63da9 authored by Roque's avatar Roque Committed by Roque

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

parent 20f0dae9
...@@ -119,28 +119,26 @@ ...@@ -119,28 +119,26 @@
name_list.push(view_gadget.state.mime_type); name_list.push(view_gadget.state.mime_type);
content_dict.filename = name_list.join('.'); 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( return child_gadget.submitContent(
child_gadget.state.jio_key, undefined, content_dict child_gadget.state.jio_key, undefined, content_dict
); );
}) })
.push(function () { .push(function () {
return gadget if (view_gadget.state.content_editable) {
.jio_putAttachment(child_gadget.state.jio_key, 'data', return gadget
jIO.util.dataURItoBlob(data)) .jio_putAttachment(child_gadget.state.jio_key, 'data',
.push(function () { jIO.util.dataURItoBlob(data))
return gadget.declareGadget("gadget_ojs_cloudooo.html"); .push(function () {
}) return gadget.declareGadget("gadget_ojs_cloudooo.html");
.push(function (cloudooo) { })
return cloudooo .push(function (cloudooo) {
.putAllCloudoooConvertionOperation({ return cloudooo
format: view_gadget.state.mime_type, .putAllCloudoooConvertionOperation({
jio_key: child_gadget.state.jio_key format: view_gadget.state.mime_type,
}); jio_key: child_gadget.state.jio_key
}); });
});
}
}, function (error) { }, function (error) {
console.log(error); console.log(error);
return gadget.notifySubmitted({ 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