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

update recording layout

This commit is contained in:
Luke Pulverenti 2016-09-05 01:39:14 -04:00
parent 80948f62fa
commit 25dbf665dd
24 changed files with 341 additions and 256 deletions

View file

@ -238,17 +238,6 @@
//var eventName = browser.firefox ? 'mousedown' : 'click';
var selectedId;
dlg.addEventListener('click', function (e) {
var actionSheetMenuItem = dom.parentWithClass(e.target, 'actionSheetMenuItem');
if (actionSheetMenuItem) {
selectedId = actionSheetMenuItem.getAttribute('data-id');
dialogHelper.close(dlg);
}
});
var timeout;
if (options.timeout) {
timeout = setTimeout(function () {
@ -258,6 +247,25 @@
return new Promise(function (resolve, reject) {
var isResolved;
dlg.addEventListener('click', function (e) {
var actionSheetMenuItem = dom.parentWithClass(e.target, 'actionSheetMenuItem');
if (actionSheetMenuItem) {
selectedId = actionSheetMenuItem.getAttribute('data-id');
if (options.resolveOnClick) {
resolve(selectedId);
isResolved = true;
}
dialogHelper.close(dlg);
}
});
dlg.addEventListener('close', function () {
if (layoutManager.tv) {
@ -269,14 +277,16 @@
timeout = null;
}
if (selectedId != null) {
if (options.callback) {
options.callback(selectedId);
}
if (!isResolved) {
if (selectedId != null) {
if (options.callback) {
options.callback(selectedId);
}
resolve(selectedId);
} else {
reject();
resolve(selectedId);
} else {
reject();
}
}
});