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

@ -34,6 +34,29 @@
$('#chkUsageData', page).checked(config.EnableAnonymousUsageReporting);
$('#chkRunAtStartup', page).checked(config.RunAtStartup);
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');
Dashboard.hideLoadingMsg();
}
@ -57,6 +80,14 @@
config.EnableAnonymousUsageReporting = $('#chkUsageData', form).checked();
config.RunAtStartup = $('#chkRunAtStartup', form).checked();
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();
ApiClient.updateServerConfiguration(config).then(function () {
ApiClient.getNamedConfiguration(brandingConfigKey).then(function (brandingConfig) {
@ -82,6 +113,16 @@
return function (view, params) {
$('#selectAutomaticUpdateLevel', view).on('change', function () {
if (this.value == "Dev") {
$('#devBuildWarning', view).show();
} else {
$('#devBuildWarning', view).hide();
}
});
$('#btnSelectCachePath', view).on("click.selectDirectory", function () {
require(['directorybrowser'], function (directoryBrowser) {