Commit f6d5e976 authored by Roque's avatar Roque

Officejs appstore improvements

See merge request nexedi/erp5!1544
parents e89e053a dcc4ac73
Pipeline #19573 failed with stage
in 0 seconds
/*globals window, document, RSVP, rJS, navigator*/
/*globals window, document, RSVP, rJS, navigator, console*/
/*jslint indent: 2, maxlen: 80, nomen: true*/
(function (window, document, RSVP, rJS, navigator) {
(function (window, document, RSVP, rJS, navigator, console) {
"use strict";
rJS(window)
......@@ -13,9 +13,14 @@
// Make this redirection compatible with no-service-worker browsers
if ('serviceWorker' in navigator) {
queue.push(function () {
return navigator.serviceWorker.register(
"gadget_erp5_serviceworker.js");
});
return navigator.serviceWorker
.register("gadget_erp5_serviceworker.js");
})
.push(undefined, function (error) {
// If service worker installation is rejected,
// do not prevent the site to be usable, even if slower
console.warn("Service worker registration failed", error);
});
}
return queue
.push(function () {
......@@ -24,4 +29,4 @@
});
});
}(window, document, RSVP, rJS, navigator));
\ No newline at end of file
}(window, document, RSVP, rJS, navigator, console));
\ No newline at end of file
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>996.52764.3468.58419</string> </value>
<value> <string>997.60607.41300.1194</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1639416568.49</float>
<float>1643817599.53</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -190,7 +190,7 @@
<value>
<tuple>
<string>aggregate/web_page_module/gadget_ojs_appstore_redirect_page_html</string>
<string>caching_policy/one-hour-max-modification-date</string>
<string>caching_policy/must-revalidate</string>
</tuple>
</value>
</item>
......@@ -453,7 +453,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>996.31313.30780.31453</string> </value>
<value> <string>997.52157.222.47308</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -471,7 +471,7 @@
</tuple>
<state>
<tuple>
<float>1639493797.36</float>
<float>1643636982.9</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -14,4 +14,5 @@ response.setHeader('Content-Type', 'text/cache-manifest')
response.setHeader('Cache-Control', 'max-age=600, stale-while-revalidate=360000, stale-if-error=31536000, public')
return """CACHE MANIFEST
# %s / %s""" % (context.getLayoutProperty("configuration_latest_version", default="development"), modification_date)
CACHE:
NETWORK:"""
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