1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-07-20 02:23:18 -04:00
parent a694661cc1
commit 9ff21cf7b8
9 changed files with 174 additions and 126 deletions

View file

@ -217,16 +217,30 @@
});
var timeout;
if (options.timeout) {
timeout = setTimeout(function () {
dialogHelper.close(dlg);
}, options.timeout);
}
return new Promise(function (resolve, reject) {
dlg.addEventListener('close', function () {
if (timeout) {
clearTimeout(timeout);
timeout = null;
}
if (selectedId != null) {
if (options.callback) {
options.callback(selectedId);
}
resolve(selectedId);
} else {
reject();
}
});