mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update search css loading
This commit is contained in:
parent
96eb9ea63a
commit
3118991c21
15 changed files with 161 additions and 190 deletions
22
dashboard-ui/thirdparty/jquery.unveil-custom.js
vendored
22
dashboard-ui/thirdparty/jquery.unveil-custom.js
vendored
|
@ -23,6 +23,7 @@
|
|||
|
||||
var thresholdX = Math.max(screen.availWidth);
|
||||
var thresholdY = Math.max(screen.availHeight);
|
||||
var wheelEvent = (document.implementation.hasFeature('Event.wheel', '3.0') ? 'wheel' : 'mousewheel');
|
||||
|
||||
function visibleInViewport(elem, partial) {
|
||||
|
||||
|
@ -58,7 +59,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
function unveilElements(elems, parent) {
|
||||
function unveilElements(elems) {
|
||||
|
||||
if (!elems.length) {
|
||||
return;
|
||||
|
@ -68,14 +69,6 @@
|
|||
|
||||
unveilId++;
|
||||
|
||||
var parents = [];
|
||||
if (parent) {
|
||||
parents = parent.querySelectorAll('.itemsContainer');
|
||||
if (!parents.length) {
|
||||
parents = [parent];
|
||||
}
|
||||
}
|
||||
|
||||
function unveil() {
|
||||
|
||||
var remaining = [];
|
||||
|
@ -93,17 +86,14 @@
|
|||
|
||||
if (!images.length) {
|
||||
document.removeEventListener('scroll', unveil);
|
||||
document.removeEventListener(wheelEvent, unveil);
|
||||
window.removeEventListener('resize', unveil);
|
||||
bindEvent(parents, 'removeEventListener', 'scroll', unveil);
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('scroll', unveil);
|
||||
window.addEventListener('resize', unveil);
|
||||
|
||||
if (parents.length) {
|
||||
bindEvent(parents, 'addEventListener', 'scroll', unveil);
|
||||
}
|
||||
document.addEventListener('scroll', unveil, true);
|
||||
document.addEventListener(wheelEvent, unveil, true);
|
||||
window.addEventListener('resize', unveil, true);
|
||||
|
||||
unveil();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue