Commit 7da6c4c7 authored by Boris Kocherov's avatar Boris Kocherov

erp5_officejs: schema_editor: create undefined json_document insteat clean string

parent c7060439
/*global window, rJS, RSVP */ /*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, Blob) { (function (window, rJS, RSVP) {
"use strict"; "use strict";
var content_type = { var content_type = {
...@@ -47,16 +47,13 @@ ...@@ -47,16 +47,13 @@
return gadget.jio_post(ret); return gadget.jio_post(ret);
}) })
.push(function (id) { .push(function (id) {
return gadget.jio_putAttachment(id, 'data', new Blob(['""'])) return gadget.redirect({
.push(function () { command: 'display',
return gadget.redirect({ options: {
command: 'display', jio_key: id,
options: { editable: true
jio_key: id, }
editable: true });
}
});
});
}); });
}); });
}(window, rJS, RSVP, Blob)); }(window, rJS, RSVP));
...@@ -125,7 +125,10 @@ ...@@ -125,7 +125,10 @@
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
gadget.getDeclaredGadget('form_view'), gadget.getDeclaredGadget('form_view'),
gadget.jio_getAttachment(gadget.state.jio_key, 'data', {format: "json"}), gadget.jio_getAttachment(gadget.state.jio_key, 'data', {format: "json"})
.push(undefined, function () {
return;
}),
gadget.jio_get(gadget.state.doc.schema) gadget.jio_get(gadget.state.doc.schema)
]); ]);
}) })
......
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