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

added library settings page

This commit is contained in:
Luke Pulverenti 2013-05-21 16:36:26 -04:00
parent fac650a344
commit e9ef2accdf
6 changed files with 165 additions and 80 deletions

View file

@ -12,19 +12,6 @@
$('#selectAutomaticUpdateLevel', page).val(config.SystemUpdateLevel).selectmenu('refresh');
$('#txtWebSocketPortNumber', page).val(config.LegacyWebSocketPortNumber);
$('#txtItemsByNamePath', page).val(config.ItemsByNamePath);
var customIbn = config.ItemsByNamePath ? true : false;
$('#chkEnableCustomIBNPath', page).checked(customIbn).checkboxradio("refresh");
if (customIbn) {
$('#fieldEnterIBNPath', page).show();
$('#txtItemsByNamePath', page).attr("required", "required");
} else {
$('#fieldEnterIBNPath', page).hide();
$('#txtItemsByNamePath', page).removeAttr("required");
}
$('#txtPortNumber', page).val(config.HttpServerPortNumber);
$('#chkDebugLog', page).checked(config.EnableDebugLevelLogging).checkboxradio("refresh");
@ -44,50 +31,11 @@
var promise2 = ApiClient.getSystemInfo();
$('#btnSelectIBNPath', page).on("click.selectDirectory", function () {
Dashboard.selectDirectory({
callback: function (path) {
if (path) {
$('#txtItemsByNamePath', page).val(path);
}
$('#popupDirectoryPicker', page).popup("close");
},
header: "Select Items By Name Path",
instruction: "Browse or enter the path to your items by name folder. The folder must be writeable."
});
});
$('#chkEnableCustomIBNPath', page).on("change.showIBNText", function() {
if (this.checked) {
$('#fieldEnterIBNPath', page).show();
$('#txtItemsByNamePath', page).attr("required", "required");
} else {
$('#fieldEnterIBNPath', page).hide();
$('#txtItemsByNamePath', page).removeAttr("required");
}
});
$.when(promise1, promise2).done(function (response1, response2) {
loadPage(page, response1[0], response2[0]);
});
}).on('pagehide', "#advancedConfigurationPage", function () {
Dashboard.showLoadingMsg();
var page = this;
$('#chkEnableCustomIBNPath', page).off("change.showIBNText");
$('#btnSelectIBNPath', page).off("click.selectDirectory");
});
function advancedConfigurationPage() {
@ -109,12 +57,6 @@
config.EnableDeveloperTools = $('#chkEnableDeveloperTools', form).checked();
config.RunAtStartup = $('#chkRunAtStartup', form).checked();
config.SystemUpdateLevel = $('#selectAutomaticUpdateLevel', form).val();
if ($('#chkEnableCustomIBNPath', form).checked()) {
config.ItemsByNamePath = $('#txtItemsByNamePath', form).val();
} else {
config.ItemsByNamePath = '';
}
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
});