mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update tabs
This commit is contained in:
parent
c8eb5f2b0c
commit
5bd79b1ab7
18 changed files with 325 additions and 314 deletions
|
@ -713,20 +713,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
function allowSwipe(e) {
|
||||
|
||||
var target = $(e.target);
|
||||
|
||||
if (target.is('.noSwipe')) {
|
||||
return false;
|
||||
}
|
||||
if (target.parents('.noSwipe').length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPlayerChange() {
|
||||
bindToPlayer($($.mobile.activePage)[0], MediaController.getCurrentPlayer());
|
||||
}
|
||||
|
@ -742,42 +728,14 @@
|
|||
|
||||
$('.requiresJqmCreate', this).trigger('create');
|
||||
|
||||
$(page).on('swipeleft', function (e) {
|
||||
|
||||
if (allowSwipe(e)) {
|
||||
var pages = this.querySelectorAll('neon-animated-pages')[0];
|
||||
var tabs = this.querySelectorAll('paper-tabs')[0];
|
||||
|
||||
var selected = parseInt(pages.selected || '0');
|
||||
if (selected < 2) {
|
||||
pages.entryAnimation = 'slide-from-right-animation';
|
||||
pages.exitAnimation = 'slide-left-animation';
|
||||
tabs.selectNext();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(page).on('swiperight', function (e) {
|
||||
|
||||
if (allowSwipe(e)) {
|
||||
var pages = this.querySelectorAll('neon-animated-pages')[0];
|
||||
var tabs = this.querySelectorAll('paper-tabs')[0];
|
||||
|
||||
var selected = parseInt(pages.selected || '0');
|
||||
if (selected > 0) {
|
||||
pages.entryAnimation = 'slide-from-left-animation';
|
||||
pages.exitAnimation = 'slide-right-animation';
|
||||
tabs.selectPrevious();
|
||||
}
|
||||
}
|
||||
});
|
||||
LibraryBrowser.configureSwipeTabs(page, page.querySelectorAll('paper-tabs')[0], page.querySelectorAll('neon-animated-pages')[0]);
|
||||
|
||||
$(MediaController).on('playerchange', function () {
|
||||
updateCastIcon(page);
|
||||
});
|
||||
|
||||
$('paper-tabs').on('iron-select', function () {
|
||||
page.querySelectorAll('neon-animated-pages')[0].selected = this.selected;
|
||||
page.querySelector('neon-animated-pages').selected = this.selected;
|
||||
});
|
||||
|
||||
}).on('pagebeforeshowready', "#nowPlayingPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue