mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove page with only two options
This commit is contained in:
parent
36d1cf3a59
commit
166c95ea3a
7 changed files with 66 additions and 124 deletions
|
@ -14,25 +14,58 @@ define(["globalize", "loading", "libraryMenu", "emby-checkbox", "emby-button", "
|
|||
}, {
|
||||
href: "metadatanfo.html",
|
||||
name: Globalize.translate("TabNfoSettings")
|
||||
}, {
|
||||
href: "librarysettings.html",
|
||||
name: Globalize.translate("TabAdvanced")
|
||||
}]
|
||||
}
|
||||
|
||||
return function(view, params) {
|
||||
function loadData() {
|
||||
ApiClient.getServerConfiguration().then(function(config) {
|
||||
view.querySelector(".chkFolderView").checked = config.EnableFolderView, view.querySelector(".chkGroupMoviesIntoCollections").checked = config.EnableGroupingIntoCollections, view.querySelector(".chkDisplaySpecialsWithinSeasons").checked = config.DisplaySpecialsWithinSeasons, view.querySelector(".chkExternalContentInSuggestions").checked = config.EnableExternalContentInSuggestions
|
||||
})
|
||||
view.querySelector(".chkFolderView").checked = config.EnableFolderView;
|
||||
view.querySelector(".chkGroupMoviesIntoCollections").checked = config.EnableGroupingIntoCollections;
|
||||
view.querySelector(".chkDisplaySpecialsWithinSeasons").checked = config.DisplaySpecialsWithinSeasons;
|
||||
view.querySelector(".chkExternalContentInSuggestions").checked = config.EnableExternalContentInSuggestions;
|
||||
view.querySelector("#chkSaveMetadataHidden").checked = config.SaveMetadataHidden;
|
||||
});
|
||||
ApiClient.getNamedConfiguration("metadata").then(function(metadata) {
|
||||
loadMetadataConfig(this, metadata)
|
||||
});
|
||||
}
|
||||
|
||||
function loadMetadataConfig(page, config) {
|
||||
$("#selectDateAdded", page).val(config.UseFileCreationTimeForDateAdded ? "1" : "0");
|
||||
}
|
||||
|
||||
view.querySelector("form").addEventListener("submit", function(e) {
|
||||
loading.show();
|
||||
var form = this;
|
||||
return ApiClient.getServerConfiguration().then(function(config) {
|
||||
config.EnableFolderView = form.querySelector(".chkFolderView").checked, config.EnableGroupingIntoCollections = form.querySelector(".chkGroupMoviesIntoCollections").checked, config.DisplaySpecialsWithinSeasons = form.querySelector(".chkDisplaySpecialsWithinSeasons").checked, config.EnableExternalContentInSuggestions = form.querySelector(".chkExternalContentInSuggestions").checked, ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult)
|
||||
}), e.preventDefault(), !1
|
||||
}), view.addEventListener("viewshow", function() {
|
||||
libraryMenu.setTabs("librarysetup", 1, getTabs), loadData()
|
||||
})
|
||||
ApiClient.getServerConfiguration().then(function(config) {
|
||||
config.EnableFolderView = form.querySelector(".chkFolderView").checked;
|
||||
config.EnableGroupingIntoCollections = form.querySelector(".chkGroupMoviesIntoCollections").checked;
|
||||
config.DisplaySpecialsWithinSeasons = form.querySelector(".chkDisplaySpecialsWithinSeasons").checked;
|
||||
config.EnableExternalContentInSuggestions = form.querySelector(".chkExternalContentInSuggestions").checked;
|
||||
config.SaveMetadataHidden = form.querySelector("#chkSaveMetadataHidden").checked;
|
||||
ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
ApiClient.getNamedConfiguration("metadata").then(function(config) {
|
||||
config.UseFileCreationTimeForDateAdded = "1" === $("#selectDateAdded", form).val();
|
||||
ApiClient.updateNamedConfiguration("metadata", config);
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
loading.hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
view.addEventListener("viewshow", function() {
|
||||
libraryMenu.setTabs("librarysetup", 1, getTabs);
|
||||
loadData();
|
||||
ApiClient.getSystemInfo().then(function(info) {
|
||||
if ("Windows" === info.OperatingSystem) {
|
||||
page.querySelector(".fldSaveMetadataHidden").classList.remove("hide");
|
||||
} else {
|
||||
page.querySelector(".fldSaveMetadataHidden").classList.add("hide");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
|
@ -1,74 +0,0 @@
|
|||
define(["jQuery", "loading", "libraryMenu", "fnchecked", "emby-checkbox", "emby-button"], function($, loading, libraryMenu) {
|
||||
"use strict";
|
||||
|
||||
function loadPage(page, config) {
|
||||
$("#chkSaveMetadataHidden", page).checked(config.SaveMetadataHidden);
|
||||
}
|
||||
|
||||
function loadMetadataConfig(page, config) {
|
||||
$("#selectDateAdded", page).val(config.UseFileCreationTimeForDateAdded ? "1" : "0");
|
||||
}
|
||||
|
||||
function alertText(options) {
|
||||
require(["alert"], function(alert) {
|
||||
alert(options);
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
loading.show();
|
||||
var form = this;
|
||||
ApiClient.getServerConfiguration().then(function(config) {
|
||||
config.SaveMetadataHidden = $("#chkSaveMetadataHidden", form).checked();
|
||||
ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
ApiClient.getNamedConfiguration("metadata").then(function(config) {
|
||||
config.UseFileCreationTimeForDateAdded = "1" === $("#selectDateAdded", form).val();
|
||||
ApiClient.updateNamedConfiguration("metadata", config);
|
||||
});
|
||||
loading.hide();
|
||||
return false;
|
||||
}
|
||||
|
||||
function getTabs() {
|
||||
return [{
|
||||
href: "library.html",
|
||||
name: Globalize.translate("HeaderLibraries")
|
||||
}, {
|
||||
href: "librarydisplay.html",
|
||||
name: Globalize.translate("TabDisplay")
|
||||
}, {
|
||||
href: "metadataimages.html",
|
||||
name: Globalize.translate("TabMetadata")
|
||||
}, {
|
||||
href: "metadatanfo.html",
|
||||
name: Globalize.translate("TabNfoSettings")
|
||||
}, {
|
||||
href: "librarysettings.html",
|
||||
name: Globalize.translate("TabAdvanced")
|
||||
}]
|
||||
}
|
||||
|
||||
return function(view, params) {
|
||||
$(".librarySettingsForm").off("submit", onSubmit).on("submit", onSubmit);
|
||||
view.addEventListener("viewshow", function() {
|
||||
libraryMenu.setTabs("librarysetup", 4, getTabs);
|
||||
loading.show();
|
||||
var page = this;
|
||||
ApiClient.getServerConfiguration().then(function(config) {
|
||||
loadPage(page, config)
|
||||
});
|
||||
ApiClient.getNamedConfiguration("metadata").then(function(metadata) {
|
||||
loadMetadataConfig(page, metadata)
|
||||
});
|
||||
ApiClient.getSystemInfo().then(function(info) {
|
||||
if ("Windows" === info.OperatingSystem) {
|
||||
page.querySelector(".fldSaveMetadataHidden").classList.remove("hide");
|
||||
} else {
|
||||
page.querySelector(".fldSaveMetadataHidden").classList.add("hide");
|
||||
}
|
||||
});
|
||||
loading.hide();
|
||||
});
|
||||
}
|
||||
});
|
|
@ -334,11 +334,9 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
|||
}, {
|
||||
href: "metadatanfo.html",
|
||||
name: globalize.translate("TabNfoSettings")
|
||||
}, {
|
||||
href: "librarysettings.html",
|
||||
name: globalize.translate("TabAdvanced")
|
||||
}]
|
||||
}
|
||||
|
||||
window.WizardLibraryPage = {
|
||||
next: function() {
|
||||
Dashboard.navigate("wizardsettings.html")
|
||||
|
|
|
@ -53,11 +53,9 @@ define(["jQuery", "dom", "loading", "libraryMenu", "listViewStyle"], function($,
|
|||
}, {
|
||||
href: "metadatanfo.html",
|
||||
name: Globalize.translate("TabNfoSettings")
|
||||
}, {
|
||||
href: "librarysettings.html",
|
||||
name: Globalize.translate("TabAdvanced")
|
||||
}]
|
||||
}
|
||||
|
||||
$(document).on("pageinit", "#metadataImagesConfigurationPage", function() {
|
||||
$(".metadataImagesConfigurationForm").off("submit", onSubmit).on("submit", onSubmit)
|
||||
}).on("pageshow", "#metadataImagesConfigurationPage", function() {
|
||||
|
|
|
@ -40,11 +40,9 @@ define(["jQuery", "loading", "libraryMenu"], function($, loading, libraryMenu) {
|
|||
}, {
|
||||
href: "metadatanfo.html",
|
||||
name: Globalize.translate("TabNfoSettings")
|
||||
}, {
|
||||
href: "librarysettings.html",
|
||||
name: Globalize.translate("TabAdvanced")
|
||||
}]
|
||||
}
|
||||
|
||||
var metadataKey = "xbmcmetadata";
|
||||
$(document).on("pageinit", "#metadataNfoPage", function() {
|
||||
$(".metadataNfoForm").off("submit", onSubmit).on("submit", onSubmit)
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
<div id="libraryDisplayPage" data-role="page" class="page type-interior librarySectionPage withTabs">
|
||||
|
||||
<div>
|
||||
<div class="content-primary">
|
||||
<form>
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" id="selectDateAdded" data-mini="true" label="${LabelDateAddedBehavior}">
|
||||
<option value="0">${OptionDateAddedImportTime}</option>
|
||||
<option value="1">${OptionDateAddedFileTime}</option>
|
||||
</select>
|
||||
<div class="fieldDescription">${LabelDateAddedBehaviorHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkFolderView" />
|
||||
|
@ -10,10 +17,12 @@
|
|||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${OptionDisplayFolderViewHelp}</div>
|
||||
</div>
|
||||
|
||||
<label class="checkboxContainer">
|
||||
<input type="checkbox" is="emby-checkbox" class="chkDisplaySpecialsWithinSeasons"/>
|
||||
<span>${LabelDisplaySpecialsWithinSeasons}</span>
|
||||
</label>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkGroupMoviesIntoCollections" />
|
||||
|
@ -29,11 +38,19 @@
|
|||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${OptionEnableExternalContentInSuggestionsHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription fldSaveMetadataHidden hide">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkAirDays" id="chkSaveMetadataHidden" data-filter="Sunday" />
|
||||
<span>${OptionSaveMetadataAsHidden}</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${OptionSaveMetadataAsHiddenHelp}</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<button is="emby-button" type="submit" class="raised button-submit block">
|
||||
<span>${ButtonSave}</span>
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
<div id="librarySettingsPage" data-role="page" class="page type-interior librarySectionPage withTabs">
|
||||
<div>
|
||||
<div class="content-primary">
|
||||
<form class="librarySettingsForm">
|
||||
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" id="selectDateAdded" data-mini="true" label="${LabelDateAddedBehavior}">
|
||||
<option value="0">${OptionDateAddedImportTime}</option>
|
||||
<option value="1">${OptionDateAddedFileTime}</option>
|
||||
</select>
|
||||
<div class="fieldDescription">${LabelDateAddedBehaviorHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription fldSaveMetadataHidden hide">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkAirDays" id="chkSaveMetadataHidden" data-filter="Sunday" />
|
||||
<span>${OptionSaveMetadataAsHidden}</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${OptionSaveMetadataAsHiddenHelp}</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<button is="emby-button" type="submit" class="raised button-submit block"><span>${ButtonSave}</span></button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue