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

@ -169,6 +169,13 @@
};
self.removeActiveTarget = function (id) {
if (self.getPlayerInfo().id == id) {
self.setDefaultPlayerActive();
}
};
self.getPlayers = function() {
return players;
};
@ -450,6 +457,20 @@
return bottomText ? topText + '<br/>' + bottomText : topText;
};
self.showPlaybackInfoErrorMessage = function(errorCode) {
// This timeout is messy, but if jqm is in the act of hiding a popup, it will not show a new one
// If we're coming from the popup play menu, this will be a problem
setTimeout(function() {
Dashboard.alert({
message: Globalize.translate('MessagePlaybackError' + errorCode),
title: Globalize.translate('HeaderPlaybackError')
});
}, 300);
};
}
window.MediaController = new mediaController();
@ -512,15 +533,19 @@
}
}
function initializeApiClient(apiClient) {
$(apiClient).on("websocketmessage", onWebSocketMessageReceived);
$(apiClient).off("websocketmessage", onWebSocketMessageReceived).on("websocketmessage", onWebSocketMessageReceived);
}
$(ConnectionManager).on('apiclientcreated', function (e, apiClient) {
Dashboard.ready(function () {
initializeApiClient(apiClient);
if (window.ApiClient) {
initializeApiClient(window.ApiClient);
}
$(ConnectionManager).on('apiclientcreated', function (e, apiClient) {
initializeApiClient(apiClient);
});
});
function getTargetsHtml(targets) {
@ -705,9 +730,8 @@
showPlayerSelection($.mobile.activePage);
});
});
$(document).on('pagebeforeshow', ".page", function () {
}).on('pagebeforeshow', ".page", function () {
var page = this;