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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alexander Emmerich
erp5
Commits
172d416c
Commit
172d416c
authored
Nov 17, 2021
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_appstore_base: appstore service worker
parent
eed0e738
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
497 additions
and
22 deletions
+497
-22
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.html
...b_page_module/gadget_ojs_appstore_redirect_page_html.html
+10
-17
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.xml
...eb_page_module/gadget_ojs_appstore_redirect_page_html.xml
+2
-2
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_js.js
...m/web_page_module/gadget_ojs_appstore_redirect_page_js.js
+27
-0
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_js.xml
.../web_page_module/gadget_ojs_appstore_redirect_page_js.xml
+342
-0
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template.xml
...emplateItem/web_site_module/application-list/template.xml
+31
-3
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebSection_getAppstorePrecacheManifest.py
...s_appstore_base/WebSection_getAppstorePrecacheManifest.py
+11
-0
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebSection_getAppstorePrecacheManifest.xml
..._appstore_base/WebSection_getAppstorePrecacheManifest.xml
+74
-0
No files found.
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.html
View file @
172d416c
<!DOCTYPE html>
<html
manifest=
"WebSection_renderOfficeJSRedirectAppCache"
>
<body>
<script
language=
"JavaScript"
>
function
redirect_version
()
{
document
.
location
.
replace
(
"
${latest_version}/
"
+
document
.
location
.
hash
)
};
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"officejs-redirect.js"
></script>
<title>
OfficeJS Redirect
</title>
<script
data-appconfig=
"latest_version"
type=
"text/x-renderjs-configuration"
>
$
{
latest_version
}
</script>
</head>
var
timeout_duration
=
10000
;
try
{
window
.
applicationCache
.
addEventListener
(
'
cached
'
,
redirect_version
);
window
.
applicationCache
.
addEventListener
(
'
noupdate
'
,
redirect_version
);
window
.
applicationCache
.
addEventListener
(
'
error
'
,
redirect_version
);
window
.
applicationCache
.
addEventListener
(
'
updateready
'
,
function
(){
window
.
location
.
reload
()});
}
catch
(
e
)
{
timeout_duration
=
1
;
}
// XXX This is a hack for when the network is too slow, or if appcache is not supported anymore
window
.
setTimeout
(
redirect_version
,
timeout_duration
);
</script>
<body>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.xml
View file @
172d416c
...
...
@@ -248,7 +248,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
84.41193.2075.29252
</string>
</value>
<value>
<string>
9
96.46889.45254.33041
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
1
599639175.46
</float>
<float>
1
639062670.98
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_js.js
0 → 100644
View file @
172d416c
/*globals window, document, RSVP, rJS, navigator*/
/*jslint indent: 2, maxlen: 80, nomen: true*/
(
function
(
window
,
document
,
RSVP
,
rJS
,
navigator
)
{
"
use strict
"
;
rJS
(
window
)
.
declareService
(
function
()
{
var
latest_version
=
document
.
head
.
querySelector
(
'
script[data-appconfig="latest_version"]
'
).
textContent
,
queue
=
new
RSVP
.
Queue
();
// 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
queue
.
push
(
function
()
{
document
.
location
.
replace
(
latest_version
+
"
/
"
+
document
.
location
.
hash
);
});
});
}(
window
,
document
,
RSVP
,
rJS
,
navigator
));
\ No newline at end of file
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_js.xml
0 → 100644
View file @
172d416c
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template.xml
View file @
172d416c
...
...
@@ -144,6 +144,26 @@
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
configuration_latest_version
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
configuration_precache_manifest_script
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
...
...
@@ -176,7 +196,15 @@
</item>
<item>
<key>
<string>
configuration_content_security_policy
</string>
</key>
<value>
<string>
default-src \'self\'; script-src \'unsafe-inline\';
</string>
</value>
<value>
<string>
default-src \'self\';
</string>
</value>
</item>
<item>
<key>
<string>
configuration_latest_version
</string>
</key>
<value>
<string>
development
</string>
</value>
</item>
<item>
<key>
<string>
configuration_precache_manifest_script
</string>
</key>
<value>
<string>
WebSection_getAppstorePrecacheManifest
</string>
</value>
</item>
<item>
<key>
<string>
configuration_x_frame_options
</string>
</key>
...
...
@@ -425,7 +453,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
75.65259.47363.59801
</string>
</value>
<value>
<string>
9
96.31313.30780.31453
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -443,7 +471,7 @@
</tuple>
<state>
<tuple>
<float>
1
559055460.25
</float>
<float>
1
639493797.36
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebSection_getAppstorePrecacheManifest.py
0 → 100644
View file @
172d416c
# minimum list of required files for appstore service worker
url_list
=
[
'./'
,
'rsvp.js'
,
'renderjs.js'
,
'officejs-redirect.js'
,
'favicon.ico'
]
return
list
(
set
(
url_list
))
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebSection_getAppstorePrecacheManifest.xml
0 → 100644
View file @
172d416c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_Cacheable__manager_id
</string>
</key>
<value>
<string>
must_revalidate_http_cache
</string>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WebSection_getAppstorePrecacheManifest
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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