Commit c40d5c5e authored by Boris Kocherov's avatar Boris Kocherov

erp5_officejs: erp5_web_renderjs_ui: schema_editor: autoupdate gadget panel on schema added

parent eb2edcfd
......@@ -20,6 +20,7 @@
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("updatePanel", "updatePanel")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("jio_putAttachment", "jio_putAttachment")
.declareAcquiredMethod("redirect", "redirect")
......@@ -48,6 +49,9 @@
.push(function (id) {
return gadget.jio_putAttachment(id, 'data',
new Blob(['{"$schema": "http://json-schema.org/draft-04/schema#" }']))
.push(function () {
return gadget.updatePanel({editable: true});
})
.push(function () {
return gadget.redirect({
command: 'display',
......
......@@ -472,10 +472,11 @@
});
})
.allowPublicAcquisition("updatePanel", function updatePanel(param_list) {
.allowPublicAcquisition("updatePanel", function (param_list) {
var gadget = this;
initPanelOptions(gadget);
gadget.props.panel_argument_list = param_list[0];
return updatePanel(gadget);
})
.allowPublicAcquisition('hidePanel', function hidePanel(param_list) {
......
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