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

replace channel tabs

This commit is contained in:
Luke Pulverenti 2015-07-18 14:07:03 -04:00
parent bfb177618f
commit a5579327cc
12 changed files with 146 additions and 81 deletions

View file

@ -63,13 +63,49 @@
}
$(document).on('pagebeforeshowready', "#channelsPage", function () {
function loadTab(page, index) {
LibraryBrowser.loadSavedQueryValues('channels', query);
switch (index) {
reloadItems(this);
case 1:
LibraryBrowser.loadSavedQueryValues('channels', query);
reloadItems(page);
updateFilterControls(page);
break;
default:
break;
}
}
$(document).on('pageinitdepends', "#channelsPage", function () {
var page = this;
var tabs = page.querySelector('paper-tabs');
var pages = page.querySelector('neon-animated-pages');
LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages);
$(tabs).on('iron-select', function () {
var selected = this.selected;
if (LibraryBrowser.navigateOnLibraryTabSelect()) {
if (selected) {
Dashboard.navigate('channels.html?tab=' + selected);
} else {
Dashboard.navigate('channels.html');
}
} else {
page.querySelector('neon-animated-pages').selected = selected;
}
});
$(pages).on('tabchange', function () {
loadTab(page, parseInt(this.selected));
});
updateFilterControls(this);
});
})(jQuery, document);