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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
erp5
Commits
430f3245
Commit
430f3245
authored
Aug 23, 2016
by
Boris Kocherov
5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: speedup loading application use only one jio request for *.js files
parent
06154c63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
16 deletions
+28
-16
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_serviceworker_js.js
...eItem/web_page_module/gadget_officejs_serviceworker_js.js
+26
-14
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_serviceworker_js.xml
...Item/web_page_module/gadget_officejs_serviceworker_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_serviceworker_js.js
View file @
430f3245
...
...
@@ -253,20 +253,32 @@ var global = self,
var
find_queue
;
if
(
url_string
!==
undefined
)
{
erp5_id
=
'
web_page_module/
'
+
url_string
.
replace
(
/
\/
/g
,
'
_
'
).
replace
(
/
\.
/g
,
'
_
'
);
find_queue
=
storage
.
get
(
erp5_id
)
.
push
(
function
(
doc
)
{
doc
.
id
=
erp5_id
;
return
doc
;
})
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
return
find_and_get
({
query
:
query_portal_types
+
'
AND (url_string: ="
'
+
url_string
+
'
")
'
},
storage
);
}
else
{
throw
error
;
}
});
if
(
erp5_id
.
endsWith
(
'
_js
'
))
{
// for *.js files use only one request to jio
// bypass metadata request
find_queue
=
RSVP
.
Queue
()
.
push
(
function
()
{
return
{
id
:
erp5_id
,
portal_type
:
"
Web Script
"
};
});
}
else
{
find_queue
=
storage
.
get
(
erp5_id
)
.
push
(
function
(
doc
)
{
doc
.
id
=
erp5_id
;
return
doc
;
})
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
return
find_and_get
({
query
:
query_portal_types
+
'
AND (url_string: ="
'
+
url_string
+
'
")
'
},
storage
);
}
else
{
throw
error
;
}
});
}
if
(
!
self
.
jio_cache
.
development_mode
)
{
find_queue
=
find_queue
.
push
(
undefined
,
function
(
error
)
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_serviceworker_js.xml
View file @
430f3245
...
...
@@ -249,7 +249,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
953.2
7946.16374.60296
</string>
</value>
<value>
<string>
953.2
8310.57522.44253
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -267,7 +267,7 @@
</tuple>
<state>
<tuple>
<float>
14719
53747.55
</float>
<float>
14719
75157.32
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Boris Kocherov
@bk
mentioned in commit
e781c097
·
Sep 01, 2016
mentioned in commit
e781c097
mentioned in commit e781c09723cd1b2d97972b6170a54326488fd3f5
Toggle commit list
Boris Kocherov
@bk
mentioned in commit
bd02080c
·
Nov 20, 2016
mentioned in commit
bd02080c
mentioned in commit bd02080c224aaca898dfd06b427ab545630369d5
Toggle commit list
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