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
577c9566
Commit
577c9566
authored
Feb 11, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: jslint
parent
1f1cb574
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 @
577c9566
...
@@ -317,7 +317,8 @@
...
@@ -317,7 +317,8 @@
throw
error
;
throw
error
;
})
})
.
push
(
function
(
doc
)
{
.
push
(
function
(
doc
)
{
for
(
var
key
in
setting_dict
)
{
var
key
;
for
(
key
in
setting_dict
)
{
if
(
setting_dict
.
hasOwnProperty
(
key
))
{
if
(
setting_dict
.
hasOwnProperty
(
key
))
{
if
(
!
doc
.
hasOwnProperty
(
key
)
||
if
(
!
doc
.
hasOwnProperty
(
key
)
||
doc
[
key
]
!==
setting_dict
[
key
])
{
doc
[
key
]
!==
setting_dict
[
key
])
{
...
@@ -942,34 +943,34 @@
...
@@ -942,34 +943,34 @@
navigator
.
serviceWorker
navigator
.
serviceWorker
.
register
(
service_worker_url
)
.
register
(
service_worker_url
)
.
then
(
function
(
registration
)
{
.
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
// 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
// XXX Not promise based, but we do not want to add a new dependency
navigator
.
serviceWorker
navigator
.
serviceWorker
.
addEventListener
(
'
message
'
,
.
addEventListener
(
'
message
'
,
function
handleMessage
(
event
)
{
function
handleMessage
(
event
)
{
if
(
event
.
data
==
'
claim
'
)
{
if
(
event
.
data
=
==
'
claim
'
)
{
gadget
.
state
.
service_worker_claimed
=
true
;
gadget
.
state
.
service_worker_claimed
=
true
;
}
}
})
})
]);
]);
}
}
})
})
.
declareJob
(
'
deferServiceWorkerUpdate
'
,
.
declareJob
(
'
deferServiceWorkerUpdate
'
,
function
deferServiceWorkerUpdate
(
registration
)
{
function
deferServiceWorkerUpdate
(
registration
)
{
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
// Delay service worker update, so that:
// Delay service worker update, so that:
// * it does not slow down the current page rendering
// * it does not slow down the current page rendering
// * it is not triggered too often if user click on multiple links
// * it is not triggered too often if user click on multiple links
// * it is triggered only if the user browse the site
// * it is triggered only if the user browse the site
return
RSVP
.
delay
(
60000
);
return
RSVP
.
delay
(
60000
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
return
registration
.
update
();
return
registration
.
update
();
});
});
});
});
}(
window
,
document
,
RSVP
,
rJS
,
}(
window
,
document
,
RSVP
,
rJS
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
577c9566
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
158143
4645.85
</float>
<float>
158143
5244.54
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_serviceworker.js
View file @
577c9566
...
@@ -124,10 +124,10 @@
...
@@ -124,10 +124,10 @@
})
})
.
then
(
function
(
client_list
)
{
.
then
(
function
(
client_list
)
{
// Notify all clients that they can reload the page
// Notify all clients that they can reload the page
var
i
,
var
j
,
len
=
client_list
.
length
;
client_
len
=
client_list
.
length
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
for
(
j
=
0
;
j
<
client_len
;
j
+=
1
)
{
client_list
[
i
].
postMessage
(
'
claim
'
);
client_list
[
j
].
postMessage
(
'
claim
'
);
}
}
})
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_serviceworker.xml
View file @
577c9566
...
@@ -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.507
23.46947.51387
</string>
</value>
<value>
<string>
981.507
54.31879.22749
</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>
158143
3826.93
</float>
<float>
158143
5049.45
</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