mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
35 lines
789 B
JavaScript
35 lines
789 B
JavaScript
(function ($, document) {
|
|
|
|
function reloadItems(page) {
|
|
|
|
Dashboard.showLoadingMsg();
|
|
|
|
Sections.loadLatestChannelItems(page.querySelector('.latestItems'), Dashboard.getCurrentUserId()).always(function() {
|
|
Dashboard.hideLoadingMsg();
|
|
});
|
|
}
|
|
|
|
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); |