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 @@ ...@@ -123,6 +123,7 @@
scope: MAIN_SCOPE\n scope: MAIN_SCOPE\n
})\n })\n
.push(function (page_gadget) {\n .push(function (page_gadget) {\n
gadget.props.m_options_string = JSON.stringify(options);\n
if (page_gadget.render === undefined) {\n if (page_gadget.render === undefined) {\n
return [page_gadget];\n return [page_gadget];\n
}\n }\n
...@@ -411,6 +412,21 @@ ...@@ -411,6 +412,21 @@
.allowPublicAcquisition(\'notifyChange\', function () {\n .allowPublicAcquisition(\'notifyChange\', function () {\n
return route(this, "header", \'notifyChange\');\n return route(this, "header", \'notifyChange\');\n
})\n })\n
\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
$(gadget.props.content_element).trigger("create");\n
});\n
}\n
}, function () {\n
return;\n
});\n
})\n
\n \n
.allowPublicAcquisition("translate", function (argument_list) {\n .allowPublicAcquisition("translate", function (argument_list) {\n
return this.getDeclaredGadget("translation_gadget")\n return this.getDeclaredGadget("translation_gadget")\n
...@@ -788,7 +804,7 @@ ...@@ -788,7 +804,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>948.30082.49058.20804</string> </value> <value> <string>949.35490.40299.23381</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -806,7 +822,7 @@ ...@@ -806,7 +822,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1452766839.17</float> <float>1456908114.56</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
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