mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update search
This commit is contained in:
parent
8dd2c5d717
commit
cc428aac1d
34 changed files with 814 additions and 549 deletions
|
@ -143,15 +143,7 @@
|
|||
return false;
|
||||
},
|
||||
|
||||
configureSwipeTabs: function (ownerpage, tabs, pages) {
|
||||
|
||||
if (LibraryBrowser.animatePaperTabs()) {
|
||||
// Safari doesn't handle the horizontal swiping very well
|
||||
pages.entryAnimation = 'slide-from-right-animation';
|
||||
pages.exitAnimation = 'slide-left-animation';
|
||||
}
|
||||
|
||||
var pageCount = pages.querySelectorAll('neon-animatable').length;
|
||||
allowSwipe: function (target) {
|
||||
|
||||
function allowSwipeOn(elem) {
|
||||
|
||||
|
@ -166,28 +158,34 @@
|
|||
return true;
|
||||
}
|
||||
|
||||
function allowSwipe(e) {
|
||||
|
||||
var target = e.target;
|
||||
|
||||
var parent = target.parentNode;
|
||||
while (parent != null) {
|
||||
if (!allowSwipeOn(parent)) {
|
||||
return false;
|
||||
}
|
||||
parent = parent.parentNode;
|
||||
var parent = target;
|
||||
while (parent != null) {
|
||||
if (!allowSwipeOn(parent)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
configureSwipeTabs: function (ownerpage, tabs, pages) {
|
||||
|
||||
if (LibraryBrowser.animatePaperTabs()) {
|
||||
// Safari doesn't handle the horizontal swiping very well
|
||||
pages.entryAnimation = 'slide-from-right-animation';
|
||||
pages.exitAnimation = 'slide-left-animation';
|
||||
}
|
||||
|
||||
var pageCount = pages.querySelectorAll('neon-animatable').length;
|
||||
|
||||
require(['hammer'], function (Hammer) {
|
||||
|
||||
var hammertime = new Hammer(pages);
|
||||
hammertime.get('swipe').set({ direction: Hammer.DIRECTION_HORIZONTAL });
|
||||
|
||||
hammertime.on('swipeleft', function (e) {
|
||||
if (allowSwipe(e)) {
|
||||
if (LibraryBrowser.allowSwipe(e.target)) {
|
||||
var selected = parseInt(pages.selected || '0');
|
||||
if (selected < (pageCount - 1)) {
|
||||
if (LibraryBrowser.animatePaperTabs()) {
|
||||
|
@ -200,7 +198,7 @@
|
|||
});
|
||||
|
||||
hammertime.on('swiperight', function (e) {
|
||||
if (allowSwipe(e)) {
|
||||
if (LibraryBrowser.allowSwipe(e.target)) {
|
||||
var selected = parseInt(pages.selected || '0');
|
||||
if (selected > 0) {
|
||||
if (LibraryBrowser.animatePaperTabs()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue