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
alecs_myu
erp5
Commits
a072b4af
Commit
a072b4af
authored
May 11, 2017
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: simplify bootloader service worker
parent
549be085
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
24 deletions
+8
-24
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_serviceworker_js.js
...age_module/gadget_officejs_bootloader_serviceworker_js.js
+6
-22
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_serviceworker_js.xml
...ge_module/gadget_officejs_bootloader_serviceworker_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_serviceworker_js.js
View file @
a072b4af
...
...
@@ -5,6 +5,8 @@ var global = self, window = self;
(
function
(
self
,
fetch
,
Request
,
Response
)
{
"
use strict
"
;
self
.
IDBTransaction
=
self
.
IDBTransaction
||
self
.
webkitIDBTransaction
||
self
.
msIDBTransaction
||
{
READ_WRITE
:
"
readwrite
"
};
self
.
IDBKeyRange
=
self
.
IDBKeyRange
||
self
.
webkitIDBKeyRange
||
self
.
msIDBKeyRange
;
self
.
DOMParser
=
{};
self
.
sessionStorage
=
{};
self
.
localStorage
=
{};
...
...
@@ -20,16 +22,11 @@ var global = self, window = self;
function
createStorage
(
database
)
{
return
self
.
jIO
.
createJIO
({
type
:
"
uuid
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
database
}
type
:
"
indexeddb
"
,
database
:
database
});
}
self
.
setting_storage
=
createStorage
(
"
serviceWorker_settings
"
);
self
.
addEventListener
(
'
install
'
,
function
(
event
)
{
event
.
waitUntil
(
self
.
skipWaiting
());
});
...
...
@@ -41,12 +38,7 @@ var global = self, window = self;
var
relative_url
=
event
.
request
.
url
.
replace
(
self
.
registration
.
scope
,
""
)
.
replace
(
self
.
version_url
,
""
);
if
(
relative_url
===
""
)
{
relative_url
=
"
/
"
;
}
if
(
relative_url
.
indexOf
(
"
ooffice/
"
)
!==
-
1
)
{
if
(
self
.
cache_list
.
indexOf
(
relative_url
)
<
0
)
{
self
.
cache_list
.
push
(
relative_url
);
}
relative_url
=
self
.
registration
.
scope
;
}
event
.
respondWith
(
new
self
.
RSVP
.
Queue
()
...
...
@@ -54,7 +46,7 @@ var global = self, window = self;
if
(
self
.
storage
.
get
===
undefined
)
{
self
.
storage
=
createStorage
(
"
officejs_code_source
"
);
}
return
self
.
storage
.
getAttachment
(
self
.
registration
.
scope
,
relative_url
)
return
self
.
storage
.
getAttachment
(
"
/
"
,
relative_url
)
.
push
(
function
(
blob
)
{
return
new
Response
(
blob
,
{
'
headers
'
:
{
...
...
@@ -70,14 +62,6 @@ var global = self, window = self;
"
\n
Cause:
"
,
error
.
message
);
if
(
relative_url
===
"
cache_file_list
"
)
{
self
.
cache_list
.
sort
();
return
new
Response
(
self
.
cache_list
.
join
(
'
<br>
'
),
{
'
headers
'
:
{
'
content-type
'
:
'
text/html
'
}
});
}
return
fetch
(
event
.
request
);
})
);
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_serviceworker_js.xml
View file @
a072b4af
...
...
@@ -227,7 +227,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
958.
11550.13363.759
4
</string>
</value>
<value>
<string>
958.
43172.7083.1172
4
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -245,7 +245,7 @@
</tuple>
<state>
<tuple>
<float>
149
0260978.72
</float>
<float>
149
2095766.17
</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