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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
9791a957
Commit
9791a957
authored
Feb 11, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: jslint
parent
c30c9dd9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
27 deletions
+28
-27
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
+20
-19
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
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_serviceworker.js
...lateItem/web_page_module/rjs_gadget_erp5_serviceworker.js
+4
-4
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_launcher_js.js
View file @
9791a957
...
...
@@ -317,7 +317,8 @@
throw
error
;
})
.
push
(
function
(
doc
)
{
for
(
var
key
in
setting_dict
)
{
var
key
;
for
(
key
in
setting_dict
)
{
if
(
setting_dict
.
hasOwnProperty
(
key
))
{
if
(
!
doc
.
hasOwnProperty
(
key
)
||
doc
[
key
]
!==
setting_dict
[
key
])
{
...
...
@@ -942,34 +943,34 @@
navigator
.
serviceWorker
.
register
(
service_worker_url
)
.
then
(
function
(
registration
)
{
gadget
.
state
.
service_worker_registration
=
registration
;
}),
gadget
.
state
.
service_worker_registration
=
registration
;
}),
// Check when a new worker has been activated from another tab
// XXX Not promise based, but we do not want to add a new dependency
navigator
.
serviceWorker
.
addEventListener
(
'
message
'
,
function
handleMessage
(
event
)
{
if
(
event
.
data
==
'
claim
'
)
{
gadget
.
state
.
service_worker_claimed
=
true
;
}
})
if
(
event
.
data
=
==
'
claim
'
)
{
gadget
.
state
.
service_worker_claimed
=
true
;
}
})
]);
}
})
.
declareJob
(
'
deferServiceWorkerUpdate
'
,
function
deferServiceWorkerUpdate
(
registration
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
// Delay service worker update, so that:
// * it does not slow down the current page rendering
// * it is not triggered too often if user click on multiple links
// * it is triggered only if the user browse the site
return
RSVP
.
delay
(
60000
);
})
.
push
(
function
()
{
return
registration
.
update
();
});
});
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
// Delay service worker update, so that:
// * it does not slow down the current page rendering
// * it is not triggered too often if user click on multiple links
// * it is triggered only if the user browse the site
return
RSVP
.
delay
(
60000
);
})
.
push
(
function
()
{
return
registration
.
update
();
});
});
}(
window
,
document
,
RSVP
,
rJS
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
9791a957
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
981.507
47.28799.6519
</string>
</value>
<value>
<string>
981.507
58.795.2560
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
158143
4645.85
</float>
<float>
158143
5244.54
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_serviceworker.js
View file @
9791a957
...
...
@@ -124,10 +124,10 @@
})
.
then
(
function
(
client_list
)
{
// Notify all clients that they can reload the page
var
i
,
len
=
client_list
.
length
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
client_list
[
i
].
postMessage
(
'
claim
'
);
var
j
,
client_
len
=
client_list
.
length
;
for
(
j
=
0
;
j
<
client_len
;
j
+=
1
)
{
client_list
[
j
].
postMessage
(
'
claim
'
);
}
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_serviceworker.xml
View file @
9791a957
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
981.507
23.46947.51387
</string>
</value>
<value>
<string>
981.507
54.31879.22749
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
158143
3826.93
</float>
<float>
158143
5049.45
</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