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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
eed166fb
Commit
eed166fb
authored
Dec 17, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_xhtml_style/web_renderjs_ui] Update RSVP
parent
c219c40a
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
259 additions
and
201 deletions
+259
-201
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.js
...nderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.js
+48
-25
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.xml
...derjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.xml
+163
-151
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/rsvp.js.js
...SkinTemplateItem/portal_skins/erp5_xhtml_style/rsvp.js.js
+48
-25
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.js
View file @
eed166fb
...
@@ -379,10 +379,10 @@ define("rsvp/events",
...
@@ -379,10 +379,10 @@ define("rsvp/events",
__exports__
.
EventTarget
=
EventTarget
;
__exports__
.
EventTarget
=
EventTarget
;
});
});
define
(
"
rsvp/hash
"
,
define
(
"
rsvp/hash
"
,
[
"
rsvp/
defer
"
,
"
exports
"
],
[
"
rsvp/
promise
"
,
"
exports
"
],
function
(
__dependency1__
,
__exports__
)
{
function
(
__dependency1__
,
__exports__
)
{
"
use strict
"
;
"
use strict
"
;
var
defer
=
__dependency1__
.
defer
;
var
Promise
=
__dependency1__
.
Promise
;
function
size
(
object
)
{
function
size
(
object
)
{
var
s
=
0
;
var
s
=
0
;
...
@@ -395,38 +395,61 @@ define("rsvp/hash",
...
@@ -395,38 +395,61 @@ define("rsvp/hash",
}
}
function
hash
(
promises
)
{
function
hash
(
promises
)
{
var
results
=
{},
deferred
=
defer
(),
remaining
=
size
(
promises
);
if
(
remaining
===
0
)
{
function
canceller
()
{
deferred
.
resolve
({});
var
promise
,
key
;
for
(
key
in
promises
)
{
if
(
promises
.
hasOwnProperty
(
key
))
{
promise
=
promises
[
key
];
if
(
promise
&&
typeof
promise
.
then
===
'
function
'
&&
typeof
promise
.
cancel
===
'
function
'
)
{
promise
.
cancel
();
}
}
}
}
}
var
resolver
=
function
(
prop
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
function
(
value
)
{
var
results
=
{},
remaining
=
size
(
promises
),
resolveAll
(
prop
,
value
);
promise
;
};
};
var
resolveAll
=
function
(
prop
,
value
)
{
if
(
remaining
===
0
)
{
results
[
prop
]
=
value
;
resolve
(
results
);
if
(
--
remaining
===
0
)
{
deferred
.
resolve
(
results
);
}
}
};
var
rejectAll
=
function
(
error
)
{
function
resolver
(
key
)
{
deferred
.
reject
(
error
);
return
function
(
value
)
{
};
resolveAll
(
key
,
value
);
};
}
for
(
var
prop
in
promises
)
{
function
resolveAll
(
key
,
value
)
{
if
(
promises
[
prop
]
&&
typeof
promises
[
prop
].
then
===
'
function
'
)
{
results
[
key
]
=
value
;
promises
[
prop
].
then
(
resolver
(
prop
),
rejectAll
);
if
(
--
remaining
===
0
)
{
}
else
{
resolve
(
results
);
resolveAll
(
prop
,
promises
[
prop
]);
}
}
}
}
return
deferred
.
promise
;
function
cancelAll
(
rejectionValue
)
{
reject
(
rejectionValue
);
canceller
();
}
for
(
var
prop
in
promises
)
{
promise
=
promises
[
prop
];
if
(
promise
&&
typeof
promise
.
then
===
'
function
'
)
{
promise
.
then
(
resolver
(
prop
),
cancelAll
);
}
else
{
resolveAll
(
prop
,
promise
);
}
}
},
canceller
);
}
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_RSVP_js.xml
View file @
eed166fb
This diff is collapsed.
Click to expand it.
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/rsvp.js.js
View file @
eed166fb
...
@@ -379,10 +379,10 @@ define("rsvp/events",
...
@@ -379,10 +379,10 @@ define("rsvp/events",
__exports__
.
EventTarget
=
EventTarget
;
__exports__
.
EventTarget
=
EventTarget
;
});
});
define
(
"
rsvp/hash
"
,
define
(
"
rsvp/hash
"
,
[
"
rsvp/
defer
"
,
"
exports
"
],
[
"
rsvp/
promise
"
,
"
exports
"
],
function
(
__dependency1__
,
__exports__
)
{
function
(
__dependency1__
,
__exports__
)
{
"
use strict
"
;
"
use strict
"
;
var
defer
=
__dependency1__
.
defer
;
var
Promise
=
__dependency1__
.
Promise
;
function
size
(
object
)
{
function
size
(
object
)
{
var
s
=
0
;
var
s
=
0
;
...
@@ -395,38 +395,61 @@ define("rsvp/hash",
...
@@ -395,38 +395,61 @@ define("rsvp/hash",
}
}
function
hash
(
promises
)
{
function
hash
(
promises
)
{
var
results
=
{},
deferred
=
defer
(),
remaining
=
size
(
promises
);
if
(
remaining
===
0
)
{
function
canceller
()
{
deferred
.
resolve
({});
var
promise
,
key
;
for
(
key
in
promises
)
{
if
(
promises
.
hasOwnProperty
(
key
))
{
promise
=
promises
[
key
];
if
(
promise
&&
typeof
promise
.
then
===
'
function
'
&&
typeof
promise
.
cancel
===
'
function
'
)
{
promise
.
cancel
();
}
}
}
}
}
var
resolver
=
function
(
prop
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
function
(
value
)
{
var
results
=
{},
remaining
=
size
(
promises
),
resolveAll
(
prop
,
value
);
promise
;
};
};
var
resolveAll
=
function
(
prop
,
value
)
{
if
(
remaining
===
0
)
{
results
[
prop
]
=
value
;
resolve
(
results
);
if
(
--
remaining
===
0
)
{
deferred
.
resolve
(
results
);
}
}
};
var
rejectAll
=
function
(
error
)
{
function
resolver
(
key
)
{
deferred
.
reject
(
error
);
return
function
(
value
)
{
};
resolveAll
(
key
,
value
);
};
}
for
(
var
prop
in
promises
)
{
function
resolveAll
(
key
,
value
)
{
if
(
promises
[
prop
]
&&
typeof
promises
[
prop
].
then
===
'
function
'
)
{
results
[
key
]
=
value
;
promises
[
prop
].
then
(
resolver
(
prop
),
rejectAll
);
if
(
--
remaining
===
0
)
{
}
else
{
resolve
(
results
);
resolveAll
(
prop
,
promises
[
prop
]);
}
}
}
}
return
deferred
.
promise
;
function
cancelAll
(
rejectionValue
)
{
reject
(
rejectionValue
);
canceller
();
}
for
(
var
prop
in
promises
)
{
promise
=
promises
[
prop
];
if
(
promise
&&
typeof
promise
.
then
===
'
function
'
)
{
promise
.
then
(
resolver
(
prop
),
cancelAll
);
}
else
{
resolveAll
(
prop
,
promise
);
}
}
},
canceller
);
}
}
...
...
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