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

module resolution for appRouter and moved controllers to dir

This commit is contained in:
vitorsemeano 2019-02-24 20:07:41 +00:00
parent d49fee2a29
commit 9c758a8d85
49 changed files with 464 additions and 530 deletions

View file

@ -0,0 +1,38 @@
define(["globalize", "loading", "libraryMenu", "emby-checkbox", "emby-button", "emby-linkbutton"], function(globalize, loading, libraryMenu) {
"use strict";
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) {
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("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()
})
}
});