mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update timer listings
This commit is contained in:
parent
c2290dd41d
commit
cf3aa152cf
39 changed files with 368 additions and 287 deletions
|
@ -1,4 +1,5 @@
|
|||
define(['historyManager', 'focusManager', 'browser', 'layoutManager', 'inputManager', 'dom', 'css!./dialoghelper.css', 'scrollStyles'], function (historyManager, focusManager, browser, layoutManager, inputManager, dom) {
|
||||
'use strict';
|
||||
|
||||
var globalOnOpenCallback;
|
||||
|
||||
|
@ -27,7 +28,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
function dialogHashHandler(dlg, hash, resolve) {
|
||||
function DialogHashHandler(dlg, hash, resolve) {
|
||||
|
||||
var self = this;
|
||||
self.originalUrl = window.location.href;
|
||||
|
@ -36,7 +37,7 @@
|
|||
|
||||
function onHashChange(e) {
|
||||
|
||||
var isBack = self.originalUrl == window.location.href;
|
||||
var isBack = self.originalUrl === window.location.href;
|
||||
|
||||
if (isBack || !isOpened(dlg)) {
|
||||
window.removeEventListener('popstate', onHashChange);
|
||||
|
@ -50,7 +51,7 @@
|
|||
|
||||
function onBackCommand(e) {
|
||||
|
||||
if (e.detail.command == 'back') {
|
||||
if (e.detail.command === 'back') {
|
||||
self.closedByBack = true;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
@ -75,7 +76,7 @@
|
|||
|
||||
if (!self.closedByBack && isHistoryEnabled(dlg)) {
|
||||
var state = history.state || {};
|
||||
if (state.dialogId == hash) {
|
||||
if (state.dialogId === hash) {
|
||||
history.back();
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +85,7 @@
|
|||
activeElement.focus();
|
||||
}
|
||||
|
||||
if (dlg.getAttribute('data-removeonclose') != 'false') {
|
||||
if (dlg.getAttribute('data-removeonclose') !== 'false') {
|
||||
removeCenterFocus(dlg);
|
||||
|
||||
var dialogContainer = dlg.dialogContainer;
|
||||
|
@ -123,7 +124,7 @@
|
|||
cancelable: false
|
||||
}));
|
||||
|
||||
if (dlg.getAttribute('data-lockscroll') == 'true' && !document.body.classList.contains('noScroll')) {
|
||||
if (dlg.getAttribute('data-lockscroll') === 'true' && !document.body.classList.contains('noScroll')) {
|
||||
document.body.classList.add('noScroll');
|
||||
removeScrollLockOnClose = true;
|
||||
}
|
||||
|
@ -154,7 +155,7 @@
|
|||
}, 0);
|
||||
|
||||
dom.addEventListener((dlg.dialogContainer || backdrop), 'click', function (e) {
|
||||
if (e.target == dlg.dialogContainer) {
|
||||
if (e.target === dlg.dialogContainer) {
|
||||
close(dlg);
|
||||
}
|
||||
}, {
|
||||
|
@ -163,7 +164,7 @@
|
|||
}
|
||||
|
||||
function isHistoryEnabled(dlg) {
|
||||
return dlg.getAttribute('data-history') == 'true';
|
||||
return dlg.getAttribute('data-history') === 'true';
|
||||
}
|
||||
|
||||
function open(dlg) {
|
||||
|
@ -185,7 +186,7 @@
|
|||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
new dialogHashHandler(dlg, 'dlg' + new Date().getTime(), resolve);
|
||||
new DialogHashHandler(dlg, 'dlg' + new Date().getTime(), resolve);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -212,7 +213,7 @@
|
|||
{ transform: 'scale(0)', offset: 0 },
|
||||
{ transform: 'none', offset: 1 }];
|
||||
var timing = elem.animationConfig.entry.timing;
|
||||
return elem.animate(keyframes, timing).onfinish = onFinish;
|
||||
elem.animate(keyframes, timing).onfinish = onFinish;
|
||||
}
|
||||
|
||||
function slideUp(elem, onFinish) {
|
||||
|
@ -221,7 +222,7 @@
|
|||
{ transform: 'translate3d(0,30%,0)', opacity: 0, offset: 0 },
|
||||
{ transform: 'none', opacity: 1, offset: 1 }];
|
||||
var timing = elem.animationConfig.entry.timing;
|
||||
return elem.animate(keyframes, timing).onfinish = onFinish;
|
||||
elem.animate(keyframes, timing).onfinish = onFinish;
|
||||
}
|
||||
|
||||
function fadeIn(elem, onFinish) {
|
||||
|
@ -230,7 +231,7 @@
|
|||
{ opacity: '0', offset: 0 },
|
||||
{ opacity: '1', offset: 1 }];
|
||||
var timing = elem.animationConfig.entry.timing;
|
||||
return elem.animate(keyframes, timing).onfinish = onFinish;
|
||||
elem.animate(keyframes, timing).onfinish = onFinish;
|
||||
}
|
||||
|
||||
function scaleDown(elem) {
|
||||
|
@ -289,11 +290,11 @@
|
|||
|
||||
var animation;
|
||||
|
||||
if (dlg.animationConfig.exit.name == 'fadeout') {
|
||||
if (dlg.animationConfig.exit.name === 'fadeout') {
|
||||
animation = fadeOut(dlg);
|
||||
} else if (dlg.animationConfig.exit.name == 'scaledown') {
|
||||
} else if (dlg.animationConfig.exit.name === 'scaledown') {
|
||||
animation = scaleDown(dlg);
|
||||
} else if (dlg.animationConfig.exit.name == 'slidedown') {
|
||||
} else if (dlg.animationConfig.exit.name === 'slidedown') {
|
||||
animation = slideDown(dlg);
|
||||
} else {
|
||||
onAnimationFinish();
|
||||
|
@ -308,7 +309,7 @@
|
|||
|
||||
var onAnimationFinish = function () {
|
||||
focusManager.pushScope(dlg);
|
||||
if (dlg.getAttribute('data-autofocus') == 'true') {
|
||||
if (dlg.getAttribute('data-autofocus') === 'true') {
|
||||
focusManager.autoFocus(dlg);
|
||||
}
|
||||
};
|
||||
|
@ -317,11 +318,11 @@
|
|||
onAnimationFinish();
|
||||
return;
|
||||
}
|
||||
if (dlg.animationConfig.entry.name == 'fadein') {
|
||||
if (dlg.animationConfig.entry.name === 'fadein') {
|
||||
fadeIn(dlg, onAnimationFinish);
|
||||
} else if (dlg.animationConfig.entry.name == 'scaleup') {
|
||||
} else if (dlg.animationConfig.entry.name === 'scaleup') {
|
||||
scaleUp(dlg, onAnimationFinish);
|
||||
} else if (dlg.animationConfig.entry.name == 'slideup') {
|
||||
} else if (dlg.animationConfig.entry.name === 'slideup') {
|
||||
slideUp(dlg, onAnimationFinish);
|
||||
}
|
||||
}
|
||||
|
@ -332,7 +333,7 @@
|
|||
return options.lockScroll;
|
||||
}
|
||||
|
||||
if (options.size == 'fullscreen') {
|
||||
if (options.size === 'fullscreen') {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue