Commit 5a128e1c authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_web_renderjs_ui: Wait the jio database creation before render the panel...

erp5_web_renderjs_ui: Wait the jio database creation before render the panel because createJio is an asynchronous method

In erp5_launcher_nojqm.js, panel is rendered without wait the jio database
creation. Then, if we call any jio method in panel, the application raises an
exception because there is no storage.
parent da571a6a
...@@ -185,10 +185,12 @@ ...@@ -185,10 +185,12 @@
return gadget.getDeclaredGadget("setting_gadget") return gadget.getDeclaredGadget("setting_gadget")
.push(function (result) { .push(function (result) {
setting_gadget = result; setting_gadget = result;
setting_gadget.createJio({ return setting_gadget.createJio({
type: "indexeddb", type: "indexeddb",
database: "setting" database: "setting"
}); });
})
.push(function () {
return setting_gadget.get("setting") return setting_gadget.get("setting")
.push(undefined, function (error) { .push(undefined, function (error) {
...@@ -230,7 +232,9 @@ ...@@ -230,7 +232,9 @@
}) })
.push(function (jio_gadget) { .push(function (jio_gadget) {
jio_gadget.createJio(setting.jio_storage_description); return jio_gadget.createJio(setting.jio_storage_description);
})
.push(function () {
return gadget.getDeclaredGadget('panel'); return gadget.getDeclaredGadget('panel');
}) })
......
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