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

@ -1,6 +1,7 @@
(function ($, document, window) {
var brandingConfigKey = "branding";
var currentBrandingOptions;
function loadPage(page, config, languageOptions) {
@ -49,7 +50,10 @@
ApiClient.getNamedConfiguration(brandingConfigKey).done(function (config) {
currentBrandingOptions = config;
$('#txtLoginDisclaimer', page).val(config.LoginDisclaimer || '');
$('#txtCustomCss', page).val(config.CustomCss || '');
});
}).on('pageinit', "#dashboardGeneralPage", function () {
@ -99,8 +103,15 @@
ApiClient.getNamedConfiguration(brandingConfigKey).done(function (brandingConfig) {
brandingConfig.LoginDisclaimer = $('#txtLoginDisclaimer', form).val();
brandingConfig.CustomCss = $('#txtCustomCss', form).val();
var cssChanged = currentBrandingOptions && brandingConfig.CustomCss != currentBrandingOptions.CustomCss;
ApiClient.updateNamedConfiguration(brandingConfigKey, brandingConfig).done(Dashboard.processServerConfigurationUpdateResult);
if (cssChanged) {
Dashboard.showDashboardRefreshNotification();
}
});
});