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 @@
.push(function (result) {
setting_gadget = result;
return setting_gadget.createJio({
type: "indexeddb",
database: "setting"
type: "fallback",
sub_storage: {
type: "indexeddb",
database: "setting"
},
fallback_storage: {
type: "memory"
}
});
})
.push(function () {
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>994.35438.36279.54937</string> </value>
<value> <string>994.54001.34070.45704</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1630683787.8</float>
<float>1631797534.82</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -1069,8 +1069,14 @@
return jio_gadget.createJio({
type: "sha",
sub_storage: {
type: "indexeddb",
database: "selection"
type: "fallback",
sub_storage: {
type: "indexeddb",
database: "selection"
},
fallback_storage: {
type: "memory"
}
}
});
});
......@@ -1082,8 +1088,14 @@
return jio_gadget.createJio({
type: "query",
sub_storage: {
type: "indexeddb",
database: "navigation_history"
type: "fallback",
sub_storage: {
type: "indexeddb",
database: "navigation_history"
},
fallback_storage: {
type: "memory"
}
}
});
});
......@@ -1093,8 +1105,14 @@
.push(function (jio_gadget) {
gadget.props.jio_state_gadget = jio_gadget;
return jio_gadget.createJio({
type: "indexeddb",
database: "document_state"
type: "fallback",
sub_storage: {
type: "indexeddb",
database: "document_state"
},
fallback_storage: {
type: "memory"
}
});
});
}()),
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>991.63596.55319.30839</string> </value>
<value> <string>994.53726.18332.61542</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1620663195.92</float>
<float>1631797697.91</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