Commit aa0a7c72 authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: add compatibility for Firefox in private mode

Firefox disables IndexedDB in private mode.
Use memory storage in such case. This allows user to have a normal erp5js usage until the window is reloaded.
parent 72046a82
...@@ -387,8 +387,14 @@ ...@@ -387,8 +387,14 @@
.push(function (result) { .push(function (result) {
setting_gadget = result; setting_gadget = result;
return setting_gadget.createJio({ return setting_gadget.createJio({
type: "indexeddb", type: "fallback",
database: "setting" sub_storage: {
type: "indexeddb",
database: "setting"
},
fallback_storage: {
type: "memory"
}
}); });
}) })
.push(function () { .push(function () {
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>994.35438.36279.54937</string> </value> <value> <string>994.54001.34070.45704</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1630683787.8</float> <float>1631797534.82</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -1069,8 +1069,14 @@ ...@@ -1069,8 +1069,14 @@
return jio_gadget.createJio({ return jio_gadget.createJio({
type: "sha", type: "sha",
sub_storage: { sub_storage: {
type: "indexeddb", type: "fallback",
database: "selection" sub_storage: {
type: "indexeddb",
database: "selection"
},
fallback_storage: {
type: "memory"
}
} }
}); });
}); });
...@@ -1082,8 +1088,14 @@ ...@@ -1082,8 +1088,14 @@
return jio_gadget.createJio({ return jio_gadget.createJio({
type: "query", type: "query",
sub_storage: { sub_storage: {
type: "indexeddb", type: "fallback",
database: "navigation_history" sub_storage: {
type: "indexeddb",
database: "navigation_history"
},
fallback_storage: {
type: "memory"
}
} }
}); });
}); });
...@@ -1093,8 +1105,14 @@ ...@@ -1093,8 +1105,14 @@
.push(function (jio_gadget) { .push(function (jio_gadget) {
gadget.props.jio_state_gadget = jio_gadget; gadget.props.jio_state_gadget = jio_gadget;
return jio_gadget.createJio({ return jio_gadget.createJio({
type: "indexeddb", type: "fallback",
database: "document_state" sub_storage: {
type: "indexeddb",
database: "document_state"
},
fallback_storage: {
type: "memory"
}
}); });
}); });
}()), }()),
......
...@@ -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.63596.55319.30839</string> </value> <value> <string>994.53726.18332.61542</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>1620663195.92</float> <float>1631797697.91</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