mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update tabs
This commit is contained in:
parent
71c9ecf157
commit
467ff3657f
16 changed files with 82 additions and 76 deletions
|
@ -146,41 +146,11 @@
|
|||
}];
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#librarySettingsPage", function () {
|
||||
return function (view, params) {
|
||||
|
||||
LibraryMenu.setTabs('librarysetup', 3, getTabs);
|
||||
Dashboard.showLoadingMsg();
|
||||
var self = this;
|
||||
|
||||
var page = this;
|
||||
|
||||
ApiClient.getServerConfiguration().then(function (config) {
|
||||
|
||||
loadPage(page, config);
|
||||
});
|
||||
|
||||
ApiClient.getNamedConfiguration("metadata").then(function (metadata) {
|
||||
|
||||
loadMetadataConfig(page, metadata);
|
||||
});
|
||||
|
||||
ApiClient.getNamedConfiguration("fanart").then(function (metadata) {
|
||||
|
||||
loadFanartConfig(page, metadata);
|
||||
});
|
||||
|
||||
var promise1 = ApiClient.getNamedConfiguration("chapters");
|
||||
var promise2 = ApiClient.getJSON(ApiClient.getUrl("Providers/Chapters"));
|
||||
|
||||
Promise.all([promise1, promise2]).then(function (responses) {
|
||||
|
||||
loadChapters(page, responses[0], responses[1]);
|
||||
});
|
||||
|
||||
}).on('pageinit', "#librarySettingsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('#btnSelectMetadataPath', page).on("click.selectDirectory", function () {
|
||||
$('#btnSelectMetadataPath', view).on("click.selectDirectory", function () {
|
||||
|
||||
require(['directorybrowser'], function (directoryBrowser) {
|
||||
|
||||
|
@ -190,7 +160,7 @@
|
|||
|
||||
callback: function (path) {
|
||||
if (path) {
|
||||
$('#txtMetadataPath', page).val(path);
|
||||
$('#txtMetadataPath', view).val(path);
|
||||
}
|
||||
picker.close();
|
||||
},
|
||||
|
@ -208,11 +178,41 @@
|
|||
ApiClient.getSystemInfo().then(function (systemInfo) {
|
||||
|
||||
if (systemInfo.SupportsLibraryMonitor) {
|
||||
page.querySelector('.fldLibraryMonitor').classList.remove('hide');
|
||||
view.querySelector('.fldLibraryMonitor').classList.remove('hide');
|
||||
} else {
|
||||
page.querySelector('.fldLibraryMonitor').classList.add('hide');
|
||||
view.querySelector('.fldLibraryMonitor').classList.add('hide');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
view.addEventListener('viewshow', function () {
|
||||
LibraryMenu.setTabs('librarysetup', 3, getTabs);
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var page = this;
|
||||
|
||||
ApiClient.getServerConfiguration().then(function (config) {
|
||||
|
||||
loadPage(page, config);
|
||||
});
|
||||
|
||||
ApiClient.getNamedConfiguration("metadata").then(function (metadata) {
|
||||
|
||||
loadMetadataConfig(page, metadata);
|
||||
});
|
||||
|
||||
ApiClient.getNamedConfiguration("fanart").then(function (metadata) {
|
||||
|
||||
loadFanartConfig(page, metadata);
|
||||
});
|
||||
|
||||
var promise1 = ApiClient.getNamedConfiguration("chapters");
|
||||
var promise2 = ApiClient.getJSON(ApiClient.getUrl("Providers/Chapters"));
|
||||
|
||||
Promise.all([promise1, promise2]).then(function (responses) {
|
||||
|
||||
loadChapters(page, responses[0], responses[1]);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
@ -2591,9 +2591,10 @@ var AppInfo = {};
|
|||
|
||||
defineRoute({
|
||||
path: '/librarysettings.html',
|
||||
dependencies: [],
|
||||
dependencies: ['emby-collapsible', 'paper-input', 'paper-checkbox', 'paper-button'],
|
||||
autoFocus: false,
|
||||
roles: 'admin'
|
||||
roles: 'admin',
|
||||
controller: 'scripts/librarysettings'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
|
|
@ -140,7 +140,11 @@
|
|||
});
|
||||
}
|
||||
|
||||
$('.paging', tabContent).html(pagingHtml);
|
||||
var i, length;
|
||||
var pagingElems = tabContent.querySelectorAll('.paging');
|
||||
for (i = 0, length = pagingElems.length; i < length; i++) {
|
||||
pagingElems[i].innerHTML = pagingHtml;
|
||||
}
|
||||
|
||||
$('.btnNextPage', tabContent).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue