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

make download function modular

This commit is contained in:
Luke Pulverenti 2016-03-29 01:16:44 -04:00
parent ae57b97712
commit 4a50925c17
7 changed files with 118 additions and 111 deletions

View file

@ -2,26 +2,6 @@
function loadPage(page, config, systemInfo) {
if (systemInfo.CanSelfUpdate) {
$('.fldAutomaticUpdates', page).show();
$('.lnlAutomaticUpdateLevel', page).html(Globalize.translate('LabelAutomaticUpdateLevel'));
} else {
$('.fldAutomaticUpdates', page).hide();
$('.lnlAutomaticUpdateLevel', page).html(Globalize.translate('LabelAutomaticUpdateLevelForPlugins'));
}
$('#chkEnableAutomaticServerUpdates', page).checked(config.EnableAutoUpdate);
$('#chkEnableAutomaticRestart', page).checked(config.EnableAutomaticRestart);
if (systemInfo.CanSelfRestart) {
$('#fldEnableAutomaticRestart', page).show();
} else {
$('#fldEnableAutomaticRestart', page).hide();
}
$('#selectAutomaticUpdateLevel', page).val(config.SystemUpdateLevel).trigger('change');
$('#chkEnableDashboardResponseCache', page).checked(config.EnableDashboardResponseCaching);
$('#chkEnableMinification', page).checked(config.EnableDashboardResourceMinification);
$('#txtDashboardSourcePath', page).val(config.DashboardSourcePath).trigger('change');
@ -36,10 +16,6 @@
ApiClient.getServerConfiguration().then(function (config) {
config.SystemUpdateLevel = $('#selectAutomaticUpdateLevel', form).val();
config.EnableAutomaticRestart = $('#chkEnableAutomaticRestart', form).checked();
config.EnableAutoUpdate = $('#chkEnableAutomaticServerUpdates', form).checked();
config.EnableDashboardResourceMinification = $('#chkEnableMinification', form).checked();
config.EnableDashboardResponseCaching = $('#chkEnableDashboardResponseCache', form).checked();
config.DashboardSourcePath = $('#txtDashboardSourcePath', form).val();