Commit 5134dd20 authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: speed up router ready

parent bd5f84af
...@@ -1055,13 +1055,12 @@ ...@@ -1055,13 +1055,12 @@
rJS(window) rJS(window)
.ready(function createProps(gadget) { .ready(function routerReady(gadget) {
gadget.props = { gadget.props = {
options: {} options: {}
}; };
}) return RSVP.all([
(function createJioSelection() {
.ready(function createJioSelection(gadget) {
return gadget.getDeclaredGadget("jio_selection") return gadget.getDeclaredGadget("jio_selection")
.push(function (jio_gadget) { .push(function (jio_gadget) {
gadget.props.jio_gadget = jio_gadget; gadget.props.jio_gadget = jio_gadget;
...@@ -1073,9 +1072,8 @@ ...@@ -1073,9 +1072,8 @@
} }
}); });
}); });
}) }()),
(function createJioNavigationHistory() {
.ready(function createJioNavigationHistory(gadget) {
return gadget.getDeclaredGadget("jio_navigation_history") return gadget.getDeclaredGadget("jio_navigation_history")
.push(function (jio_gadget) { .push(function (jio_gadget) {
gadget.props.jio_navigation_gadget = jio_gadget; gadget.props.jio_navigation_gadget = jio_gadget;
...@@ -1087,9 +1085,8 @@ ...@@ -1087,9 +1085,8 @@
} }
}); });
}); });
}) }()),
(function createJioDocumentState() {
.ready(function createJioDocumentState(gadget) {
return gadget.getDeclaredGadget("jio_document_state") return gadget.getDeclaredGadget("jio_document_state")
.push(function (jio_gadget) { .push(function (jio_gadget) {
gadget.props.jio_state_gadget = jio_gadget; gadget.props.jio_state_gadget = jio_gadget;
...@@ -1098,16 +1095,18 @@ ...@@ -1098,16 +1095,18 @@
database: "document_state" database: "document_state"
}); });
}); });
}) }()),
.ready(function createJioForContent(g) { (function createJioForContent() {
return g.getDeclaredGadget("jio_form_content") return gadget.getDeclaredGadget("jio_form_content")
.push(function (jio_form_content) { .push(function (jio_form_content) {
g.props.jio_form_content = jio_form_content; gadget.props.jio_form_content = jio_form_content;
return jio_form_content.createJio({ return jio_form_content.createJio({
type: "local", type: "local",
sessiononly: true sessiononly: true
}); });
}); });
}())
]);
}) })
.declareMethod('getCommandUrlForList', function getCommandUrlForList( .declareMethod('getCommandUrlForList', function getCommandUrlForList(
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>991.63470.31913.42018</string> </value> <value> <string>991.63474.14071.31470</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1620655812.82</float> <float>1620656308.36</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