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