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

add library display settings

This commit is contained in:
Luke Pulverenti 2016-06-04 01:51:33 -04:00
parent 0bf7dcaa32
commit d4f197006a
8 changed files with 107 additions and 7 deletions

View file

@ -0,0 +1,54 @@
define(['globalize'], function (globalize) {
function getTabs() {
return [
{
href: 'library.html',
name: globalize.translate('TabFolders')
},
{
href: 'librarydisplay.html',
name: globalize.translate('TabDisplay')
},
{
href: 'librarypathmapping.html',
name: globalize.translate('TabPathSubstitution')
},
{
href: 'librarysettings.html',
name: globalize.translate('TabAdvanced')
}];
}
return function (view, params) {
var self = this;
view.querySelector('form').addEventListener('submit', function (e) {
Dashboard.showLoadingMsg();
var form = this;
ApiClient.getServerConfiguration().then(function (config) {
config.EnableFolderView = form.querySelector('.chkFolderView').checked;
ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult);
});
e.preventDefault();
return false;
});
function loadData() {
ApiClient.getServerConfiguration().then(function (config) {
view.querySelector('.chkFolderView').checked = config.EnableFolderView;
});
}
view.addEventListener('viewshow', function () {
LibraryMenu.setTabs('librarysetup', 1, getTabs);
loadData();
});
};
});

View file

@ -118,6 +118,10 @@
href: 'library.html',
name: Globalize.translate('TabFolders')
},
{
href: 'librarydisplay.html',
name: Globalize.translate('TabDisplay')
},
{
href: 'librarypathmapping.html',
name: Globalize.translate('TabPathSubstitution')
@ -139,7 +143,7 @@
}).on('pageshow', "#libraryPathMappingPage", function () {
LibraryMenu.setTabs('librarysetup', 1, getTabs);
LibraryMenu.setTabs('librarysetup', 2, getTabs);
Dashboard.showLoadingMsg();
var page = this;

View file

@ -132,6 +132,10 @@
href: 'library.html',
name: Globalize.translate('TabFolders')
},
{
href: 'librarydisplay.html',
name: Globalize.translate('TabDisplay')
},
{
href: 'librarypathmapping.html',
name: Globalize.translate('TabPathSubstitution')
@ -144,7 +148,7 @@
$(document).on('pageshow', "#librarySettingsPage", function () {
LibraryMenu.setTabs('librarysetup', 2, getTabs);
LibraryMenu.setTabs('librarysetup', 3, getTabs);
Dashboard.showLoadingMsg();
var page = this;

View file

@ -459,6 +459,10 @@
href: 'library.html',
name: Globalize.translate('TabFolders')
},
{
href: 'librarydisplay.html',
name: Globalize.translate('TabDisplay')
},
{
href: 'librarypathmapping.html',
name: Globalize.translate('TabPathSubstitution')

View file

@ -1958,7 +1958,7 @@ var AppInfo = {};
define("montserratFont", ['css!' + embyWebComponentsBowerPath + '/fonts/montserrat/style']);
define("scrollStyles", ['css!' + embyWebComponentsBowerPath + '/scrollstyles']);
define("viewcontainer", ['components/viewcontainer-lite'], returnFirstDependency);
define("viewcontainer", ['components/viewcontainer-lite', embyWebComponentsBowerPath + '/viewmanager/viewcontainer-lite'], returnFirstDependency);
define('queryString', [bowerPath + '/query-string/index'], function () {
return queryString;
});
@ -2574,6 +2574,14 @@ var AppInfo = {};
roles: 'admin'
});
defineRoute({
path: '/librarydisplay.html',
dependencies: ['paper-button', 'paper-checkbox'],
autoFocus: false,
roles: 'admin',
controller: 'scripts/librarydisplay'
});
defineRoute({
path: '/librarypathmapping.html',
dependencies: [],