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

@ -173,7 +173,9 @@
<div id="additionalPartsCollapsible" class="verticalSection detailVerticalSection hide"> <div id="additionalPartsCollapsible" class="verticalSection detailVerticalSection hide">
<h2 class="sectionTitle sectionTitle-cards padded-right">${HeaderAdditionalParts}</h2> <h2 class="sectionTitle sectionTitle-cards padded-right">${HeaderAdditionalParts}</h2>
<div id="additionalPartsContent" is="emby-itemscontainer" class="itemsContainer vertical-wrap padded-right"></div> <div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">
<div id="additionalPartsContent" is="emby-itemscontainer" class="scrollSlider focuscontainer-x itemsContainer"></div>
</div>
</div> </div>
<div class="verticalSection detailVerticalSection moreFromSeasonSection hide"> <div class="verticalSection detailVerticalSection moreFromSeasonSection hide">
@ -204,12 +206,16 @@
<div id="specialsCollapsible" class="verticalSection detailVerticalSection hide"> <div id="specialsCollapsible" class="verticalSection detailVerticalSection hide">
<h2 class="sectionTitle sectionTitle-cards padded-right">${HeaderSpecialFeatures}</h2> <h2 class="sectionTitle sectionTitle-cards padded-right">${HeaderSpecialFeatures}</h2>
<div id="specialsContent" is="emby-itemscontainer" class="itemsContainer vertical-wrap padded-right"></div> <div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">
<div id="specialsContent" is="emby-itemscontainer" class="scrollSlider focuscontainer-x itemsContainer"></div>
</div>
</div> </div>
<div id="musicVideosCollapsible" class="verticalSection detailVerticalSection hide"> <div id="musicVideosCollapsible" class="verticalSection detailVerticalSection hide">
<h2 class="sectionTitle sectionTitle-cards padded-right">${HeaderMusicVideos}</h2> <h2 class="sectionTitle sectionTitle-cards padded-right">${HeaderMusicVideos}</h2>
<div id="musicVideosContent" is="emby-itemscontainer" class="itemsContainer vertical-wrap padded-right"></div> <div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">
<div id="musicVideosContent" is="emby-itemscontainer" class="scrollSlider focuscontainer-x itemsContainer"></div>
</div>
</div> </div>
<div id="scenesCollapsible" class="verticalSection detailVerticalSection verticalSection-extrabottompadding hide"> <div id="scenesCollapsible" class="verticalSection detailVerticalSection verticalSection-extrabottompadding hide">

View file

@ -819,7 +819,7 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
if (item.SpecialFeatureCount && 0 != item.SpecialFeatureCount && 'Series' != item.Type) { if (item.SpecialFeatureCount && 0 != item.SpecialFeatureCount && 'Series' != item.Type) {
page.querySelector('#specialsCollapsible').classList.remove('hide'); page.querySelector('#specialsCollapsible').classList.remove('hide');
renderSpecials(page, item, user, 6); renderSpecials(page, item, user);
} else { } else {
page.querySelector('#specialsCollapsible').classList.add('hide'); 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({ var html = cardBuilder.getCardsHtml({
items: items, items: items,
shape: 'auto', shape: 'overflowSquare',
showTitle: true, showTitle: true,
action: 'play', action: 'play',
overlayText: false, overlayText: false,
@ -1748,17 +1748,13 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
showRuntime: true 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; 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) { connectionManager.getApiClient(item.ServerId).getSpecialFeatures(user.Id, item.Id).then(function (specials) {
var specialsContent = page.querySelector('#specialsContent'); var specialsContent = page.querySelector('#specialsContent');
specialsContent.innerHTML = getVideosHtml(specials, user, limit, 'moreSpecials'); specialsContent.innerHTML = getVideosHtml(specials);
imageLoader.lazyChildren(specialsContent); imageLoader.lazyChildren(specialsContent);
}); });
} }
@ -1982,24 +1978,6 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
renderAudioSelections(view, self._currentPlaybackMediaSources); renderAudioSelections(view, self._currentPlaybackMediaSources);
renderSubtitleSelections(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) { view.addEventListener('viewshow', function (e) {
var page = this; var page = this;