mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
3.2.36.11
This commit is contained in:
parent
1fa4109086
commit
1e253f22c1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
define(["dom","layoutManager","browser","css!./headroom"],function(dom,layoutManager,browser){"use strict";function Debouncer(callback){this.callback=callback,this.ticking=!1}function Headroom(elems,options){options=Object.assign(Headroom.options,options||{}),this.lastKnownScrollY=0,this.elems=elems,this.scroller=options.scroller,this.debouncer=onScroll.bind(this),this.offset=options.offset,this.initialised=!1,this.initialClass=options.initialClass,this.unPinnedClass=options.unPinnedClass,this.pinnedClass=options.pinnedClass,this.state="clear"}function onScroll(){requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this)))}var requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return Debouncer.prototype={constructor:Debouncer,update:function(){this.callback&&this.callback(),this.ticking=!1},handleEvent:function(){this.ticking||(requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this))),this.ticking=!0)}},Headroom.prototype={constructor:Headroom,init:function(){if(browser.supportsCssAnimation()){for(var i=0,length=this.elems.length;i<length;i++)this.elems[i].classList.add(this.initialClass);this.attachEvent()}return this},add:function(elem){browser.supportsCssAnimation()&&(elem.classList.add(this.initialClass),this.elems.push(elem))},remove:function(elem){elem.classList.remove(this.unPinnedClass),elem.classList.remove(this.initialClass),elem.classList.remove(this.pinnedClass);var i=this.elems.indexOf(elem);i!==-1&&this.elems.splice(i,1)},destroy:function(){this.initialised=!1;for(var i=0,length=this.elems.length;i<length;i++){var classList=this.elems[i].classList;classList.remove(this.unPinnedClass),classList.remove(this.initialClass),classList.remove(this.pinnedClass)}var scrollEventName=this.scroller.getScrollEventName?this.scroller.getScrollEventName():"scroll";dom.removeEventListener(this.scroller,scrollEventName,this.debouncer,{capture:!1,passive:!0})},attachEvent:function(){if(!this.initialised){this.lastKnownScrollY=this.getScrollY(),this.initialised=!0;var scrollEventName=this.scroller.getScrollEventName?this.scroller.getScrollEventName():"scroll";dom.addEventListener(this.scroller,scrollEventName,this.debouncer,{capture:!1,passive:!0}),this.update()}},clear:function(){if("clear"!==this.state){this.state="clear";for(var unpinnedClass=this.unPinnedClass,i=(this.pinnedClass,0),length=this.elems.length;i<length;i++){var classList=this.elems[i].classList;classList.remove(unpinnedClass)}}},pin:function(){if("pin"!==this.state){this.state="pin";for(var unpinnedClass=this.unPinnedClass,pinnedClass=this.pinnedClass,i=0,length=this.elems.length;i<length;i++){var classList=this.elems[i].classList;classList.remove(unpinnedClass),classList.add(pinnedClass)}}},unpin:function(){if("unpin"!==this.state){this.state="unpin";for(var unpinnedClass=this.unPinnedClass,i=(this.pinnedClass,0),length=this.elems.length;i<length;i++){var classList=this.elems[i].classList;classList.add(unpinnedClass)}}},getScrollY:function(){var scroller=this.scroller;if(scroller.getScrollPosition)return scroller.getScrollPosition();var pageYOffset=scroller.pageYOffset;if(void 0!==pageYOffset)return pageYOffset;var scrollTop=scroller.scrollTop;return void 0!==scrollTop?scrollTop:(document.documentElement||document.body).scrollTop},shouldUnpin:function(currentScrollY){var scrollingDown=currentScrollY>this.lastKnownScrollY,pastOffset=currentScrollY>=this.offset;return scrollingDown&&pastOffset},shouldPin:function(currentScrollY){var scrollingUp=currentScrollY<this.lastKnownScrollY,pastOffset=currentScrollY<=this.offset;return scrollingUp||pastOffset},update:function(){var currentScrollY=this.getScrollY(),minThreshold=layoutManager.tv?70:0;currentScrollY<=minThreshold?this.clear():this.shouldUnpin(currentScrollY)?this.unpin():this.shouldPin(currentScrollY)?currentScrollY&&layoutManager.tv?this.unpin():this.clear():layoutManager.tv&&this.clear(),this.lastKnownScrollY=currentScrollY}},Headroom.options={offset:0,scroller:window,initialClass:"headroom",unPinnedClass:"headroom--unpinned",pinnedClass:"headroom--pinned"},Headroom});
|
||||
define(["dom","layoutManager","browser","css!./headroom"],function(dom,layoutManager,browser){"use strict";function Debouncer(callback){this.callback=callback,this.ticking=!1}function Headroom(elems,options){options=Object.assign(Headroom.options,options||{}),this.lastKnownScrollY=0,this.elems=elems,this.scroller=options.scroller,this.debouncer=onScroll.bind(this),this.offset=options.offset,this.initialised=!1,this.initialClass=options.initialClass,this.unPinnedClass=options.unPinnedClass,this.pinnedClass=options.pinnedClass,this.state="clear"}function onScroll(){requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this)))}var requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return Debouncer.prototype={constructor:Debouncer,update:function(){this.callback&&this.callback(),this.ticking=!1},handleEvent:function(){this.ticking||(requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this))),this.ticking=!0)}},Headroom.prototype={constructor:Headroom,init:function(){if(browser.supportsCssAnimation()){for(var i=0,length=this.elems.length;i<length;i++)this.elems[i].classList.add(this.initialClass);this.attachEvent()}return this},add:function(elem){browser.supportsCssAnimation()&&(elem.classList.add(this.initialClass),this.elems.push(elem))},remove:function(elem){elem.classList.remove(this.unPinnedClass),elem.classList.remove(this.initialClass),elem.classList.remove(this.pinnedClass);var i=this.elems.indexOf(elem);i!==-1&&this.elems.splice(i,1)},destroy:function(){this.initialised=!1;for(var i=0,length=this.elems.length;i<length;i++){var classList=this.elems[i].classList;classList.remove(this.unPinnedClass),classList.remove(this.initialClass),classList.remove(this.pinnedClass)}var scrollEventName=this.scroller.getScrollEventName?this.scroller.getScrollEventName():"scroll";dom.removeEventListener(this.scroller,scrollEventName,this.debouncer,{capture:!1,passive:!0})},attachEvent:function(){if(!this.initialised){this.lastKnownScrollY=this.getScrollY(),this.initialised=!0;var scrollEventName=this.scroller.getScrollEventName?this.scroller.getScrollEventName():"scroll";dom.addEventListener(this.scroller,scrollEventName,this.debouncer,{capture:!1,passive:!0}),this.update()}},clear:function(){if("clear"!==this.state){this.state="clear";for(var unpinnedClass=this.unPinnedClass,i=(this.pinnedClass,0),length=this.elems.length;i<length;i++){var classList=this.elems[i].classList;classList.remove(unpinnedClass)}}},pin:function(){if("pin"!==this.state){this.state="pin";for(var unpinnedClass=this.unPinnedClass,pinnedClass=this.pinnedClass,i=0,length=this.elems.length;i<length;i++){var classList=this.elems[i].classList;classList.remove(unpinnedClass),classList.add(pinnedClass)}}},unpin:function(){if("unpin"!==this.state){this.state="unpin";for(var unpinnedClass=this.unPinnedClass,i=(this.pinnedClass,0),length=this.elems.length;i<length;i++){var classList=this.elems[i].classList;classList.add(unpinnedClass)}}},getScrollY:function(){var scroller=this.scroller;if(scroller.getScrollPosition)return scroller.getScrollPosition();var pageYOffset=scroller.pageYOffset;if(void 0!==pageYOffset)return pageYOffset;var scrollTop=scroller.scrollTop;return void 0!==scrollTop?scrollTop:(document.documentElement||document.body).scrollTop},shouldUnpin:function(currentScrollY){var scrollingDown=currentScrollY>this.lastKnownScrollY,pastOffset=currentScrollY>=this.offset;return scrollingDown&&pastOffset},shouldPin:function(currentScrollY){var scrollingUp=currentScrollY<this.lastKnownScrollY,pastOffset=currentScrollY<=this.offset;return scrollingUp||pastOffset},update:function(){var currentScrollY=this.getScrollY(),minThreshold=layoutManager.tv?70:0,lastKnownScrollY=this.lastKnownScrollY,toleranceExceeded=Math.abs(currentScrollY-lastKnownScrollY)>=10;currentScrollY<=minThreshold?this.clear():this.shouldUnpin(currentScrollY)?this.unpin():toleranceExceeded&&this.shouldPin(currentScrollY)?currentScrollY&&layoutManager.tv?this.unpin():this.clear():layoutManager.tv&&this.clear(),this.lastKnownScrollY=currentScrollY}},Headroom.options={offset:0,scroller:window,initialClass:"headroom",unPinnedClass:"headroom--unpinned",pinnedClass:"headroom--pinned"},Headroom});
|
File diff suppressed because one or more lines are too long
@ -428,6 +428,7 @@
|
||||
"LabelSyncTo": "Sync to:",
|
||||
"Next": "Next",
|
||||
"LabelSource": "Source:",
|
||||
"LabelVersion": "Version:",
|
||||
"AllLanguages": "All languages",
|
||||
"Previous": "Previous",
|
||||
"HeaderNextUp": "Next Up",
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user