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

fixes #987 - Support custom css

This commit is contained in:
Luke Pulverenti 2015-01-19 00:41:56 -05:00
parent 22c701d9a9
commit bed14f4b40
5 changed files with 32 additions and 3 deletions

View file

@ -194,6 +194,15 @@ var Dashboard = {
}
},
importCss: function (url) {
if (document.createStyleSheet) {
document.createStyleSheet(url);
}
else {
$('<link rel="stylesheet" type="text/css" href="' + url + '" />').appendTo('head');
}
},
showError: function (message) {
$.mobile.loading('show', {
@ -256,7 +265,7 @@ var Dashboard = {
if (Dashboard.initialServerVersion != info.Version) {
Dashboard.showDashboardVersionWarning();
Dashboard.showDashboardRefreshNotification();
}
}
@ -329,7 +338,7 @@ var Dashboard = {
$('#serverRestartWarning').remove();
},
showDashboardVersionWarning: function () {
showDashboardRefreshNotification: function () {
var html = '<span style="margin-right: 1em;">' + Globalize.translate('MessagePleaseRefreshPage') + '</span>';
@ -1331,6 +1340,7 @@ var Dashboard = {
ConnectionManager.addApiClient(ApiClient, true).fail(Dashboard.logout);
} else {
Dashboard.logout();
return;
}
}
@ -1345,6 +1355,8 @@ var Dashboard = {
ConnectionManager.addApiClient(ApiClient);
}
Dashboard.importCss(ApiClient.getUrl('Branding/Css'));
})();
$(function () {