jellyfin-web/dashboard-ui/scripts/channelslatest.js
2015-07-18 14:07:03 -04:00

31 lines
681 B
JavaScript

(function ($, document) {
function reloadItems(page) {
Sections.loadLatestChannelItems(page.querySelector('.latestItems'), Dashboard.getCurrentUserId());
}
function loadTab(page, index) {
switch (index) {
case 0:
reloadItems(page);
break;
default:
break;
}
}
$(document).on('pageinitdepends', "#channelsPage", function () {
var page = this;
var pages = page.querySelector('neon-animated-pages');
$(pages).on('tabchange', function () {
loadTab(page, parseInt(this.selected));
});
});
})(jQuery, document);