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
fdc2737c
Commit
fdc2737c
authored
Nov 17, 2016
by
Boris Kocherov
Committed by
Boris Kocherov
Nov 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: jslint cleanup
parent
b175dc91
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
26 deletions
+22
-26
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.js
...TemplateItem/web_page_module/gadget_officejs_router_js.js
+20
-24
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.xml
...emplateItem/web_page_module/gadget_officejs_router_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.js
View file @
fdc2737c
...
...
@@ -199,7 +199,7 @@
}
}
if
(
'
serviceWorker
'
in
navigator
)
{
if
(
navigator
.
serviceWorker
!==
undefined
)
{
// importatant register service worker
// for client reconnect if url change
queue
.
push
(
function
()
{
...
...
@@ -271,16 +271,15 @@
if
(
options
!==
undefined
&&
options
.
toExternal
)
{
window
.
location
.
replace
(
options
.
url
);
return
RSVP
.
timeout
(
REDIRECT_TIMEOUT
);
// timeout if not redirected
}
else
{
return
this
.
getCommandUrlFor
(
options
)
.
push
(
function
(
hash
)
{
window
.
location
.
replace
(
hash
);
// prevent returning unexpected response
// wait for the hash change to occur
// fail if nothing happens
return
RSVP
.
timeout
(
REDIRECT_TIMEOUT
);
});
}
return
this
.
getCommandUrlFor
(
options
)
.
push
(
function
(
hash
)
{
window
.
location
.
replace
(
hash
);
// prevent returning unexpected response
// wait for the hash change to occur
// fail if nothing happens
return
RSVP
.
timeout
(
REDIRECT_TIMEOUT
);
});
})
.
declareMethod
(
'
route
'
,
function
(
options
)
{
...
...
@@ -356,7 +355,7 @@
return
gadget
.
props
.
start_deferred
.
promise
;
})
.
push
(
function
()
{
if
((
'
serviceWorker
'
in
navigator
)
&&
(
NAME
!==
"
web page
"
))
{
if
((
navigator
.
serviceWorker
!==
undefined
)
&&
(
NAME
!==
"
web page
"
))
{
return
gadget
.
getSetting
(
'
jio_
'
+
NAME
+
'
_modification_date
'
)
.
push
(
function
(
modification_date
)
{
return
gadget
.
getSetting
(
'
jio_
'
+
NAME
+
'
_cache_description
'
)
...
...
@@ -364,15 +363,14 @@
var
jio_store
=
get_jio_replicate_storage
(
NAME
);
if
(
jio_store
.
__storage
.
_query_options
.
query
===
query
&&
modification_date
)
{
return
get_jio_replicate_storage
(
NAME
,
modification_date
).
repair
();
}
else
{
return
gadget
.
setSetting
(
'
jio_
'
+
NAME
+
'
_cache_description
'
,
jio_store
.
__storage
.
_query_options
.
query
)
.
push
(
function
()
{
return
jio_store
.
repair
();
});
}
return
gadget
.
setSetting
(
'
jio_
'
+
NAME
+
'
_cache_description
'
,
jio_store
.
__storage
.
_query_options
.
query
)
.
push
(
function
()
{
return
jio_store
.
repair
();
});
})
.
push
(
undefined
,
function
(
error
)
{
// fix offline mode bypass network errors
...
...
@@ -380,9 +378,8 @@
error
.
srcElement
instanceof
XMLHttpRequest
&&
error
.
type
===
"
error
"
)
{
return
{};
}
else
{
throw
error
;
}
throw
error
;
})
.
push
(
function
()
{
jIO
.
createJIO
(
get_jio_cache_storage
(
NAME
)).
allDocs
({
...
...
@@ -411,13 +408,12 @@
return
{};
});
});
}
else
{
return
{};
}
return
{};
})
.
push
(
function
()
{
return
listenHashChange
(
gadget
);
});
});
}(
window
,
rJS
));
\ No newline at end of file
}(
window
,
rJS
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.xml
View file @
fdc2737c
...
...
@@ -224,7 +224,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
955.
19276.22837.65433
</string>
</value>
<value>
<string>
955.
22065.61366.57770
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -242,7 +242,7 @@
</tuple>
<state>
<tuple>
<float>
1479
212571.34
</float>
<float>
1479
378360.51
</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