Commit b02d9658 authored by Roque's avatar Roque

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

parent d4bccb9e
...@@ -119,15 +119,12 @@ ...@@ -119,15 +119,12 @@
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 () {
if (view_gadget.state.content_editable) {
return gadget return gadget
.jio_putAttachment(child_gadget.state.jio_key, 'data', .jio_putAttachment(child_gadget.state.jio_key, 'data',
jIO.util.dataURItoBlob(data)) jIO.util.dataURItoBlob(data))
...@@ -141,6 +138,7 @@ ...@@ -141,6 +138,7 @@
jio_key: child_gadget.state.jio_key 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