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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
erp5
Commits
7c8fc367
Commit
7c8fc367
authored
Jan 02, 2017
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_xhtml_style/erp5_web_renderjs_ui] Activate RSVP native promise async
parent
44f24691
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1052 additions
and
1002 deletions
+1052
-1002
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.js
...nderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.js
+1025
-1000
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.xml
...derjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.xml
+2
-2
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/rsvp.js.js
...SkinTemplateItem/portal_skins/erp5_xhtml_style/rsvp.js.js
+25
-0
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.js
View file @
7c8fc367
...
...
@@ -135,6 +135,29 @@ define("rsvp/async",
var
async
;
var
local
=
(
typeof
global
!==
'
undefined
'
)
?
global
:
this
;
function
checkNativePromise
()
{
if
(
typeof
Promise
===
"
function
"
&&
typeof
Promise
.
resolve
===
"
function
"
)
{
try
{
/* global Promise */
var
promise
=
new
Promise
(
function
(){});
if
({}.
toString
.
call
(
promise
)
===
"
[object Promise]
"
)
{
return
true
;
}
}
catch
(
e
)
{}
}
return
false
;
}
function
useNativePromise
()
{
var
nativePromise
=
Promise
.
resolve
();
return
function
(
callback
,
arg
)
{
nativePromise
.
then
(
function
()
{
callback
(
arg
);
});
};
}
// old node
function
useNextTick
()
{
return
function
(
callback
,
arg
)
{
...
...
@@ -196,6 +219,8 @@ define("rsvp/async",
async
=
useNextTick
();
}
else
if
(
BrowserMutationObserver
)
{
async
=
useMutationObserver
();
}
else
if
(
checkNativePromise
())
{
async
=
useNativePromise
();
}
else
{
async
=
useSetTimeout
();
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.xml
View file @
7c8fc367
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
47.51153.11549.27255
</string>
</value>
<value>
<string>
9
56.24426.45217.3157
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
14
50107607.48
</float>
<float>
14
84729690.52
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/rsvp.js.js
View file @
7c8fc367
...
...
@@ -135,6 +135,29 @@ define("rsvp/async",
var
async
;
var
local
=
(
typeof
global
!==
'
undefined
'
)
?
global
:
this
;
function
checkNativePromise
()
{
if
(
typeof
Promise
===
"
function
"
&&
typeof
Promise
.
resolve
===
"
function
"
)
{
try
{
/* global Promise */
var
promise
=
new
Promise
(
function
(){});
if
({}.
toString
.
call
(
promise
)
===
"
[object Promise]
"
)
{
return
true
;
}
}
catch
(
e
)
{}
}
return
false
;
}
function
useNativePromise
()
{
var
nativePromise
=
Promise
.
resolve
();
return
function
(
callback
,
arg
)
{
nativePromise
.
then
(
function
()
{
callback
(
arg
);
});
};
}
// old node
function
useNextTick
()
{
return
function
(
callback
,
arg
)
{
...
...
@@ -196,6 +219,8 @@ define("rsvp/async",
async
=
useNextTick
();
}
else
if
(
BrowserMutationObserver
)
{
async
=
useMutationObserver
();
}
else
if
(
checkNativePromise
())
{
async
=
useNativePromise
();
}
else
{
async
=
useSetTimeout
();
}
...
...
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