mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-15 09:58:18 -07:00
use import for ItemsByName & PlaylistViewer
This commit is contained in:
parent
6d3365bc09
commit
ac62a5e8bf
@ -215,7 +215,6 @@ module.exports = {
|
||||
'LiveTvHelpers': 'writable',
|
||||
'Loading': 'writable',
|
||||
'MetadataEditor': 'writable',
|
||||
'PlaylistViewer': 'writable',
|
||||
'ServerNotifications': 'writable',
|
||||
'TaskButton': 'writable',
|
||||
'UserParentalControlPage': 'writable',
|
||||
|
@ -1507,13 +1507,13 @@ function renderChildren(page, item) {
|
||||
}
|
||||
|
||||
function renderItemsByName(page, item) {
|
||||
import('../../scripts/itembynamedetailpage').then(() => {
|
||||
window.ItemsByName.renderItems(page, item);
|
||||
import('../../scripts/itembynamedetailpage').then(({ default: ItemsByName }) => {
|
||||
ItemsByName.renderItems(page, item);
|
||||
});
|
||||
}
|
||||
|
||||
function renderPlaylistItems(page, item) {
|
||||
import('../../scripts/playlistedit').then(() => {
|
||||
import('../../scripts/playlistViewer').then(({ default: PlaylistViewer }) => {
|
||||
PlaylistViewer.render(page, item);
|
||||
});
|
||||
}
|
||||
|
@ -373,6 +373,8 @@ function getItemsFunction(options, item) {
|
||||
};
|
||||
}
|
||||
|
||||
window.ItemsByName = {
|
||||
const ItemsByName = {
|
||||
renderItems: renderItems
|
||||
};
|
||||
|
||||
export default ItemsByName;
|
||||
|
@ -35,14 +35,18 @@ function init(page, item) {
|
||||
elem.getItemsHtml = getItemsHtmlFn(item.Id);
|
||||
}
|
||||
|
||||
window.PlaylistViewer = {
|
||||
render: function (page, item) {
|
||||
if (!page.playlistInit) {
|
||||
page.playlistInit = true;
|
||||
init(page, item);
|
||||
}
|
||||
|
||||
page.querySelector('#childrenContent').classList.add('verticalSection-extrabottompadding');
|
||||
page.querySelector('#childrenContent .itemsContainer').refreshItems();
|
||||
function render(page, item) {
|
||||
if (!page.playlistInit) {
|
||||
page.playlistInit = true;
|
||||
init(page, item);
|
||||
}
|
||||
|
||||
page.querySelector('#childrenContent').classList.add('verticalSection-extrabottompadding');
|
||||
page.querySelector('#childrenContent .itemsContainer').refreshItems();
|
||||
}
|
||||
|
||||
const PlaylistViewer = {
|
||||
render: render
|
||||
};
|
||||
|
||||
export default PlaylistViewer;
|
Loading…
Reference in New Issue
Block a user