1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update now playing page

This commit is contained in:
Luke Pulverenti 2015-06-26 16:40:30 -04:00
parent 7fb59cc969
commit e33e5875cf
10 changed files with 148 additions and 197 deletions

View file

@ -703,29 +703,31 @@
$('.sendMessageForm').off('submit', NowPlayingPage.onMessageSubmit).on('submit', NowPlayingPage.onMessageSubmit);
$('.typeTextForm').off('submit', NowPlayingPage.onSendStringSubmit).on('submit', NowPlayingPage.onSendStringSubmit);
$('iron-pages,neon-animatable', this).trigger('create');
$('.requiresJqmCreate', this).trigger('create');
$(page).on('swipeleft', function () {
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';
pages.selectNext();
tabs.selectNext();
}
});
$(page).on('swiperight', function () {
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';
pages.selectPrevious();
tabs.selectPrevious();
}
});
@ -733,6 +735,10 @@
updateCastIcon(page);
});
$('paper-tabs').on('iron-select', function () {
page.querySelectorAll('neon-animated-pages')[0].selected = this.selected;
});
}).on('pagebeforeshowready', "#nowPlayingPage", function () {
$(document.body).addClass('hiddenViewMenuBar');
@ -755,7 +761,8 @@
loadPlaylist(page);
var tab = getParameterByName('tab');
this.querySelectorAll('#scope')[0].selected = tab == 'Playlist' ? 2 : 0;
var selected = tab == 'Playlist' ? 2 : 0;;
this.querySelectorAll('paper-tabs')[0].selected = selected;
updateCastIcon(page);