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

remove unused morebutton and editimage

This commit is contained in:
grafixeyehero 2020-07-24 00:16:17 +03:00
parent b415646cf4
commit 4b31bcd390
2 changed files with 14 additions and 30 deletions

View file

@ -819,7 +819,7 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
if (item.SpecialFeatureCount && 0 != item.SpecialFeatureCount && 'Series' != item.Type) {
page.querySelector('#specialsCollapsible').classList.remove('hide');
renderSpecials(page, item, user, 6);
renderSpecials(page, item, user);
} else {
page.querySelector('#specialsCollapsible').classList.add('hide');
}
@ -1737,10 +1737,10 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
}
}
function getVideosHtml(items, user, limit, moreButtonClass) {
function getVideosHtml(items) {
var html = cardBuilder.getCardsHtml({
items: items,
shape: 'auto',
shape: 'overflowSquare',
showTitle: true,
action: 'play',
overlayText: false,
@ -1748,17 +1748,13 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
showRuntime: true
});
if (limit && items.length > limit) {
html += '<p style="margin: 0;padding-left:5px;"><button is="emby-button" type="button" class="raised more ' + moreButtonClass + '">' + globalize.translate('ButtonMore') + '</button></p>';
}
return html;
}
function renderSpecials(page, item, user, limit) {
function renderSpecials(page, item, user) {
connectionManager.getApiClient(item.ServerId).getSpecialFeatures(user.Id, item.Id).then(function (specials) {
var specialsContent = page.querySelector('#specialsContent');
specialsContent.innerHTML = getVideosHtml(specials, user, limit, 'moreSpecials');
specialsContent.innerHTML = getVideosHtml(specials);
imageLoader.lazyChildren(specialsContent);
});
}
@ -1982,24 +1978,6 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
renderAudioSelections(view, self._currentPlaybackMediaSources);
renderSubtitleSelections(view, self._currentPlaybackMediaSources);
});
view.addEventListener('click', function (e) {
if (dom.parentWithClass(e.target, 'moreScenes')) {
renderScenes(view, currentItem);
} else if (dom.parentWithClass(e.target, 'morePeople')) {
renderCast(view, currentItem);
} else if (dom.parentWithClass(e.target, 'moreSpecials')) {
apiClient.getCurrentUser().then(function (user) {
renderSpecials(view, currentItem, user);
});
}
});
view.querySelector('.detailImageContainer').addEventListener('click', function (e) {
if (dom.parentWithClass(e.target, 'itemDetailGalleryLink')) {
editImages().then(function () {
reload(self, view, params);
});
}
});
view.addEventListener('viewshow', function (e) {
var page = this;