Commit 89005c87 authored by Vincent Bechu's avatar Vincent Bechu

erp5_officejs: remove service worker setting storage and application cache on bootloader

parent e1a47e31
<!DOCTYPE html> <!DOCTYPE html>
<html manifest="${application_appcache}"> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
......
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>958.11494.19014.6587</string> </value> <value> <string>958.44234.50599.921</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1490198316.47</float> <float>1492159460.13</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -5,13 +5,7 @@ var repair = false; ...@@ -5,13 +5,7 @@ var repair = false;
ProgressEvent, console) { ProgressEvent, console) {
"use strict"; "use strict";
var serviceWorker_setting_storage = jIO.createJIO({ var remote_storage = {
type: "uuid",
sub_storage: {
type: "indexeddb",
database: "serviceWorker_settings"
}
}), remote_storage = {
type: "erp5", type: "erp5",
url: window.location.origin + url: window.location.origin +
window.location.pathname + "hateoasnoauth", window.location.pathname + "hateoasnoauth",
...@@ -149,7 +143,6 @@ var repair = false; ...@@ -149,7 +143,6 @@ var repair = false;
} }
}) })
.push(undefined, function (error) { .push(undefined, function (error) {
console.log(error);
if (error instanceof ProgressEvent) { if (error instanceof ProgressEvent) {
if (gadget.props.sub === undefined) { if (gadget.props.sub === undefined) {
window.location.pathname += gadget.props.version_url; window.location.pathname += gadget.props.version_url;
...@@ -183,12 +176,9 @@ var repair = false; ...@@ -183,12 +176,9 @@ var repair = false;
document.querySelector("base") document.querySelector("base")
); );
} }
navigator.serviceWorker.onerror = function (event) {
console.log(event);
};
return navigator.serviceWorker.register( return navigator.serviceWorker.register(
"gadget_officejs_bootloader_serviceworker.js", "gadget_officejs_bootloader_serviceworker.js",
{"scope": gadget.props.version_url } {"scope": gadget.props.version_url}
); );
}) })
.push(function (registration) { .push(function (registration) {
...@@ -206,7 +196,7 @@ var repair = false; ...@@ -206,7 +196,7 @@ var repair = false;
var gadget = this; var gadget = this;
function redirect() { function redirect() {
window.location.href = gadget.props.redirect_url; window.location.pathname += gadget.props.version_url;
} }
if (navigator.serviceWorker === undefined) { if (navigator.serviceWorker === undefined) {
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>958.34399.34294.34662</string> </value> <value> <string>958.43127.34376.48742</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>1491570174.38</float> <float>1492093057.34</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