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
1
Issues
1
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
Roque
erp5
Commits
d4cfe2ce
Commit
d4cfe2ce
authored
Sep 24, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: reload only when app is sure not losing data
parent
fc73422d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
...mplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
+4
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
...plateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
View file @
d4cfe2ce
...
...
@@ -11,6 +11,7 @@
default_state_json_string
=
JSON
.
stringify
({
panel_visible
:
false
,
service_worker_claimed
:
false
,
app_reload_requested
:
false
,
setting_id
:
"
setting/
"
+
document
.
head
.
querySelector
(
'
script[data-renderjs-configuration="application_title"]
'
).
textContent
,
...
...
@@ -579,7 +580,7 @@
return
route
(
this
,
'
router
'
,
'
redirect
'
,
param_list
);
})
.
allowPublicAcquisition
(
'
reload
'
,
function
reload
()
{
return
location
.
reload
()
;
this
.
state
.
app_reload_requested
=
true
;
})
.
allowPublicAcquisition
(
"
getUrlParameter
"
,
function
getUrlParameter
(
param_list
...
...
@@ -707,7 +708,8 @@
.
allowPublicAcquisition
(
"
renderApplication
"
,
function
renderApplication
(
param_list
)
{
if
(
this
.
state
.
service_worker_claimed
&&
if
((
this
.
state
.
service_worker_claimed
||
this
.
state
.
app_reload_requested
)
&&
(
this
.
state
.
notification_options
===
undefined
))
{
// As a new service worker claimed the client,
// reload the page to ensure it uses the lastest gadget versions
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
d4cfe2ce
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
994.
54001.34070.45704
</string>
</value>
<value>
<string>
994.
65209.11376.49681
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
163
1797534.82
</float>
<float>
163
2469996.87
</float>
<string>
UTC
</string>
</tuple>
</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