Commit bba6c4fd authored by Boris Kocherov's avatar Boris Kocherov

erp5_officejs: schema_editor: create undefined json_document insteat clean string

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