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

update script loading

This commit is contained in:
Luke Pulverenti 2015-05-19 15:15:40 -04:00
parent 463ad6cfb1
commit bbdbdf346e
92 changed files with 1062 additions and 518 deletions

View file

@ -502,7 +502,7 @@
});
}).on('pagebeforeshow', ".page:not(.standalonePage)", function () {
}).on('pagebeforeshowready', ".page:not(.standalonePage)", function () {
var page = this;
var viewMenuBar = $('.viewMenuBar');
@ -535,7 +535,7 @@
$(document.body).removeClass('dashboardDocument').removeClass('libraryDocument');
}
}).on('pagebeforeshow', ".libraryPage", function () {
}).on('pagebeforeshowready', ".libraryPage", function () {
var page = this;
@ -587,22 +587,23 @@
function initializeApiClient(apiClient) {
requiresLibraryMenuRefresh = true;
$(apiClient).off('websocketmessage.librarymenu', onWebSocketMessage).on('websocketmessage.librarymenu', onWebSocketMessage);
}
$(ConnectionManager).on('apiclientcreated', function (e, apiClient) {
Dashboard.ready(function () {
requiresLibraryMenuRefresh = true;
initializeApiClient(apiClient);
if (window.ApiClient) {
initializeApiClient(window.ApiClient);
}
}).on('localusersignedin', function () {
$(ConnectionManager).on('apiclientcreated', function (e, apiClient) {
initializeApiClient(apiClient);
requiresLibraryMenuRefresh = true;
}).on('localusersignedout', function () {
$('.viewMenuBar').remove();
requiresLibraryMenuRefresh = true;
}).on('localusersignedin localusersignedout', function () {
$('.viewMenuBar').remove();
requiresLibraryMenuRefresh = true;
});
});
$(function () {