Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
9c0c4061
Commit
9c0c4061
authored
Feb 10, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: do not hammer zope during installation
parent
4f524b1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_serviceworker.js
...lateItem/web_page_module/rjs_gadget_erp5_serviceworker.js
+13
-7
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_serviceworker.xml
...ateItem/web_page_module/rjs_gadget_erp5_serviceworker.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_serviceworker.js
View file @
9c0c4061
...
@@ -21,21 +21,27 @@
...
@@ -21,21 +21,27 @@
var
required_file_dict
=
result_list
[
0
],
var
required_file_dict
=
result_list
[
0
],
cache
=
result_list
[
1
],
cache
=
result_list
[
1
],
key
,
key
,
promise
_list
=
[]
,
promise
=
Promise
.
resolve
()
,
url
;
url
;
function
append
(
url
)
{
promise
=
promise
.
then
(
function
()
{
// Use cache.add because safari does not support cache.addAll.
return
cache
.
add
(
url
);
});
}
for
(
key
in
required_file_dict
)
{
for
(
key
in
required_file_dict
)
{
if
(
required_file_dict
.
hasOwnProperty
(
key
))
{
if
(
required_file_dict
.
hasOwnProperty
(
key
))
{
url
=
new
URL
(
key
,
location
.
toString
()).
toString
();
url
=
new
URL
(
key
,
location
.
toString
()).
toString
();
// Add all offline dependencies to the cache
// One by one, to not hammer zopes
required_url_list
.
push
(
url
);
required_url_list
.
push
(
url
);
// Use cache.add because safari does not support cache.addAll.
append
(
url
);
// console.log("Install " + CACHE_NAME + " = " + url);
promise_list
.
push
(
cache
.
add
(
url
));
}
}
}
}
return
promise
;
// Add all offline dependencies to the cache
return
Promise
.
all
(
promise_list
);
})
})
.
then
(
function
()
{
.
then
(
function
()
{
// When user accesses ERP5JS web site first time, service worker is
// When user accesses ERP5JS web site first time, service worker is
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_serviceworker.xml
View file @
9c0c4061
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
981.4
8930.15634.60876
</string>
</value>
<value>
<string>
981.4
9192.3036.63283
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15813
25589.75
</float>
<float>
15813
41953.03
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment