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
Alexander Emmerich
erp5
Commits
99611f9b
Commit
99611f9b
authored
Feb 24, 2020
by
Romain Courteaud
Committed by
Xiaowu Zhang
Apr 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_xhtml_style/web_renderjs_ui] Update RSVP
parent
91ed54a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
58 deletions
+60
-58
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.js
...nderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.js
+29
-28
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
+29
-28
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.js
View file @
99611f9b
...
@@ -556,6 +556,7 @@ define("rsvp/promise",
...
@@ -556,6 +556,7 @@ define("rsvp/promise",
// For now, simply reject the promise and does not propagate the cancel
// For now, simply reject the promise and does not propagate the cancel
// to parent or children
// to parent or children
if
(
resolved
)
{
return
;
}
if
(
resolved
)
{
return
;
}
promise
.
isCancelled
=
true
;
if
(
canceller
!==
undefined
)
{
if
(
canceller
!==
undefined
)
{
try
{
try
{
canceller
();
canceller
();
...
@@ -587,6 +588,7 @@ define("rsvp/promise",
...
@@ -587,6 +588,7 @@ define("rsvp/promise",
if
(
promise
.
isFulfilled
)
{
return
;
}
if
(
promise
.
isFulfilled
)
{
return
;
}
if
(
promise
.
isRejected
)
{
return
;
}
if
(
promise
.
isRejected
)
{
return
;
}
if
(
promise
.
isCancelled
)
{
return
;
}
if
(
hasCallback
)
{
if
(
hasCallback
)
{
try
{
try
{
...
@@ -617,6 +619,7 @@ define("rsvp/promise",
...
@@ -617,6 +619,7 @@ define("rsvp/promise",
Promise
.
prototype
=
{
Promise
.
prototype
=
{
constructor
:
Promise
,
constructor
:
Promise
,
isCancelled
:
undefined
,
isRejected
:
undefined
,
isRejected
:
undefined
,
isFulfilled
:
undefined
,
isFulfilled
:
undefined
,
rejectedReason
:
undefined
,
rejectedReason
:
undefined
,
...
@@ -758,7 +761,7 @@ define("rsvp/queue",
...
@@ -758,7 +761,7 @@ define("rsvp/queue",
ResolvedQueueError
.
prototype
=
new
Error
();
ResolvedQueueError
.
prototype
=
new
Error
();
ResolvedQueueError
.
prototype
.
constructor
=
ResolvedQueueError
;
ResolvedQueueError
.
prototype
.
constructor
=
ResolvedQueueError
;
var
Queue
=
function
()
{
var
Queue
=
function
(
thenable
)
{
var
queue
=
this
,
var
queue
=
this
,
promise_list
=
[],
promise_list
=
[],
promise
,
promise
,
...
@@ -771,11 +774,31 @@ define("rsvp/queue",
...
@@ -771,11 +774,31 @@ define("rsvp/queue",
}
}
function
canceller
()
{
function
canceller
()
{
for
(
var
i
=
0
;
i
<
2
;
i
++
)
{
for
(
var
i
=
promise_list
.
length
;
i
>
0
;
i
--
)
{
promise_list
[
i
].
cancel
();
promise_list
[
i
-
1
].
cancel
();
}
}
}
}
function
checkPromise
(
next_promise
)
{
promise_list
.
push
(
next_promise
);
// Handle pop
promise_list
.
push
(
next_promise
.
then
(
function
(
fulfillmentValue
)
{
promise_list
.
splice
(
0
,
2
);
if
(
promise_list
.
length
===
0
)
{
fulfill
(
fulfillmentValue
);
}
else
{
return
fulfillmentValue
;
}
},
function
(
rejectedReason
)
{
promise_list
.
splice
(
0
,
2
);
if
(
promise_list
.
length
===
0
)
{
reject
(
rejectedReason
);
}
else
{
throw
rejectedReason
;
}
}));
}
promise
=
new
Promise
(
function
(
done
,
fail
)
{
promise
=
new
Promise
(
function
(
done
,
fail
)
{
fulfill
=
function
(
fulfillmentValue
)
{
fulfill
=
function
(
fulfillmentValue
)
{
if
(
resolved
)
{
return
;}
if
(
resolved
)
{
return
;}
...
@@ -793,13 +816,7 @@ define("rsvp/queue",
...
@@ -793,13 +816,7 @@ define("rsvp/queue",
};
};
},
canceller
);
},
canceller
);
promise_list
.
push
(
resolve
());
checkPromise
(
resolve
(
thenable
));
promise_list
.
push
(
promise_list
[
0
].
then
(
function
()
{
promise_list
.
splice
(
0
,
2
);
if
(
promise_list
.
length
===
0
)
{
fulfill
();
}
}));
queue
.
cancel
=
function
()
{
queue
.
cancel
=
function
()
{
if
(
resolved
)
{
return
;}
if
(
resolved
)
{
return
;}
...
@@ -822,25 +839,9 @@ define("rsvp/queue",
...
@@ -822,25 +839,9 @@ define("rsvp/queue",
throw
new
ResolvedQueueError
();
throw
new
ResolvedQueueError
();
}
}
next_promise
=
last_promise
.
then
(
done
,
fail
);
promise_list
.
push
(
next_promise
);
// Handle pop
// Handle pop
promise_list
.
push
(
next_promise
.
then
(
function
(
fulfillmentValue
)
{
checkPromise
(
last_promise
.
then
(
done
,
fail
));
promise_list
.
splice
(
0
,
2
);
if
(
promise_list
.
length
===
0
)
{
fulfill
(
fulfillmentValue
);
}
else
{
return
fulfillmentValue
;
}
},
function
(
rejectedReason
)
{
promise_list
.
splice
(
0
,
2
);
if
(
promise_list
.
length
===
0
)
{
reject
(
rejectedReason
);
}
else
{
throw
rejectedReason
;
}
}));
return
this
;
return
this
;
};
};
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.xml
View file @
99611f9b
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
77.38881.34981.23125
</string>
</value>
<value>
<string>
9
82.5438.65075.12680
</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>
15
76579789.68
</float>
<float>
15
82713688.85
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/rsvp.js.js
View file @
99611f9b
...
@@ -556,6 +556,7 @@ define("rsvp/promise",
...
@@ -556,6 +556,7 @@ define("rsvp/promise",
// For now, simply reject the promise and does not propagate the cancel
// For now, simply reject the promise and does not propagate the cancel
// to parent or children
// to parent or children
if
(
resolved
)
{
return
;
}
if
(
resolved
)
{
return
;
}
promise
.
isCancelled
=
true
;
if
(
canceller
!==
undefined
)
{
if
(
canceller
!==
undefined
)
{
try
{
try
{
canceller
();
canceller
();
...
@@ -587,6 +588,7 @@ define("rsvp/promise",
...
@@ -587,6 +588,7 @@ define("rsvp/promise",
if
(
promise
.
isFulfilled
)
{
return
;
}
if
(
promise
.
isFulfilled
)
{
return
;
}
if
(
promise
.
isRejected
)
{
return
;
}
if
(
promise
.
isRejected
)
{
return
;
}
if
(
promise
.
isCancelled
)
{
return
;
}
if
(
hasCallback
)
{
if
(
hasCallback
)
{
try
{
try
{
...
@@ -617,6 +619,7 @@ define("rsvp/promise",
...
@@ -617,6 +619,7 @@ define("rsvp/promise",
Promise
.
prototype
=
{
Promise
.
prototype
=
{
constructor
:
Promise
,
constructor
:
Promise
,
isCancelled
:
undefined
,
isRejected
:
undefined
,
isRejected
:
undefined
,
isFulfilled
:
undefined
,
isFulfilled
:
undefined
,
rejectedReason
:
undefined
,
rejectedReason
:
undefined
,
...
@@ -758,7 +761,7 @@ define("rsvp/queue",
...
@@ -758,7 +761,7 @@ define("rsvp/queue",
ResolvedQueueError
.
prototype
=
new
Error
();
ResolvedQueueError
.
prototype
=
new
Error
();
ResolvedQueueError
.
prototype
.
constructor
=
ResolvedQueueError
;
ResolvedQueueError
.
prototype
.
constructor
=
ResolvedQueueError
;
var
Queue
=
function
()
{
var
Queue
=
function
(
thenable
)
{
var
queue
=
this
,
var
queue
=
this
,
promise_list
=
[],
promise_list
=
[],
promise
,
promise
,
...
@@ -771,11 +774,31 @@ define("rsvp/queue",
...
@@ -771,11 +774,31 @@ define("rsvp/queue",
}
}
function
canceller
()
{
function
canceller
()
{
for
(
var
i
=
0
;
i
<
2
;
i
++
)
{
for
(
var
i
=
promise_list
.
length
;
i
>
0
;
i
--
)
{
promise_list
[
i
].
cancel
();
promise_list
[
i
-
1
].
cancel
();
}
}
}
}
function
checkPromise
(
next_promise
)
{
promise_list
.
push
(
next_promise
);
// Handle pop
promise_list
.
push
(
next_promise
.
then
(
function
(
fulfillmentValue
)
{
promise_list
.
splice
(
0
,
2
);
if
(
promise_list
.
length
===
0
)
{
fulfill
(
fulfillmentValue
);
}
else
{
return
fulfillmentValue
;
}
},
function
(
rejectedReason
)
{
promise_list
.
splice
(
0
,
2
);
if
(
promise_list
.
length
===
0
)
{
reject
(
rejectedReason
);
}
else
{
throw
rejectedReason
;
}
}));
}
promise
=
new
Promise
(
function
(
done
,
fail
)
{
promise
=
new
Promise
(
function
(
done
,
fail
)
{
fulfill
=
function
(
fulfillmentValue
)
{
fulfill
=
function
(
fulfillmentValue
)
{
if
(
resolved
)
{
return
;}
if
(
resolved
)
{
return
;}
...
@@ -793,13 +816,7 @@ define("rsvp/queue",
...
@@ -793,13 +816,7 @@ define("rsvp/queue",
};
};
},
canceller
);
},
canceller
);
promise_list
.
push
(
resolve
());
checkPromise
(
resolve
(
thenable
));
promise_list
.
push
(
promise_list
[
0
].
then
(
function
()
{
promise_list
.
splice
(
0
,
2
);
if
(
promise_list
.
length
===
0
)
{
fulfill
();
}
}));
queue
.
cancel
=
function
()
{
queue
.
cancel
=
function
()
{
if
(
resolved
)
{
return
;}
if
(
resolved
)
{
return
;}
...
@@ -822,25 +839,9 @@ define("rsvp/queue",
...
@@ -822,25 +839,9 @@ define("rsvp/queue",
throw
new
ResolvedQueueError
();
throw
new
ResolvedQueueError
();
}
}
next_promise
=
last_promise
.
then
(
done
,
fail
);
promise_list
.
push
(
next_promise
);
// Handle pop
// Handle pop
promise_list
.
push
(
next_promise
.
then
(
function
(
fulfillmentValue
)
{
checkPromise
(
last_promise
.
then
(
done
,
fail
));
promise_list
.
splice
(
0
,
2
);
if
(
promise_list
.
length
===
0
)
{
fulfill
(
fulfillmentValue
);
}
else
{
return
fulfillmentValue
;
}
},
function
(
rejectedReason
)
{
promise_list
.
splice
(
0
,
2
);
if
(
promise_list
.
length
===
0
)
{
reject
(
rejectedReason
);
}
else
{
throw
rejectedReason
;
}
}));
return
this
;
return
this
;
};
};
...
...
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