Commit 000a8bce authored by Romain Courteaud's avatar Romain Courteaud

XXX erp5_web_renderjs_ui: offline support

parent 9d98cd39
......@@ -906,16 +906,24 @@
.push(undefined, function (error) {
// couscous
if (!navigator.onLine) {
window.addEventListener('online',
console.log('not online');
return gadget.changeState({
error_text: 'Offline',
// request_error_text: request_error_text,
url: undefined
})
.push(function () {
return rJS.loopEventListener(window, 'online', false,
function backOnline() {
return location.reload();
console.log('let reload');
return gadget.render(route_result, keep_message);
// return location.reload();
});
});
return;
}
throw error;
})
.push(undefined, function (error) {
return displayError(gadget, error);
});
})
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>993.36084.15186.27323</string> </value>
<value> <string>993.36177.33163.46728</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1626790595.79</float>
<float>1626796612.69</float>
<string>UTC</string>
</tuple>
</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