mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
52 lines
1.3 KiB
JavaScript
52 lines
1.3 KiB
JavaScript
(function ($, document, window) {
|
|
|
|
function loadPage(page, config) {
|
|
|
|
$('#txtSeasonZeroName', page).val(config.SeasonZeroDisplayName);
|
|
|
|
$('#chkEnableRealtimeMonitor', page).checked(config.EnableRealtimeMonitor).checkboxradio("refresh");
|
|
|
|
Dashboard.hideLoadingMsg();
|
|
}
|
|
|
|
$(document).on('pageshow', "#librarySettingsPage", function () {
|
|
|
|
Dashboard.showLoadingMsg();
|
|
|
|
var page = this;
|
|
|
|
ApiClient.getServerConfiguration().done(function (config) {
|
|
|
|
loadPage(page, config);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
function librarySettingsPage() {
|
|
|
|
var self = this;
|
|
|
|
self.onSubmit = function () {
|
|
Dashboard.showLoadingMsg();
|
|
|
|
var form = this;
|
|
|
|
ApiClient.getServerConfiguration().done(function (config) {
|
|
|
|
config.SeasonZeroDisplayName = $('#txtSeasonZeroName', form).val();
|
|
|
|
config.EnableRealtimeMonitor = $('#chkEnableRealtimeMonitor', form).checked();
|
|
|
|
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
|
});
|
|
|
|
// Disable default form submission
|
|
return false;
|
|
};
|
|
}
|
|
|
|
window.LibrarySettingsPage = new librarySettingsPage();
|
|
|
|
})(jQuery, document, window);
|