Commit 4c986964 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Add "refresh" acquisition method to rerender the main page gadget

parent 404e2c86
......@@ -123,6 +123,7 @@
scope: MAIN_SCOPE\n
.push(function (page_gadget) {\n
gadget.props.m_options_string = JSON.stringify(options);\n
if (page_gadget.render === undefined) {\n
return [page_gadget];\n
......@@ -411,6 +412,21 @@
.allowPublicAcquisition(\'notifyChange\', function () {\n
return route(this, "header", \'notifyChange\');\n
.allowPublicAcquisition(\'refresh\', function () {\n
var gadget = this;\n
return gadget.getDeclaredGadget(MAIN_SCOPE)\n
.push(function (main) {\n
if (main.render !== undefined) {\n
return main.render(JSON.parse(gadget.props.m_options_string))\n
.push(function () {\n
}, function () {\n
.allowPublicAcquisition("translate", function (argument_list) {\n
return this.getDeclaredGadget("translation_gadget")\n
......@@ -788,7 +804,7 @@
<key> <string>serial</string> </key>
<value> <string>948.30082.49058.20804</string> </value>
<value> <string>949.35490.40299.23381</string> </value>
<key> <string>state</string> </key>
......@@ -806,7 +822,7 @@
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