mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #1630 from grafixeyehero/fix-SpecialFeatures
remove unused morebutton and editimage
This commit is contained in:
commit
621db2ecc9
2 changed files with 16 additions and 43 deletions
|
@ -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">
|
||||||
|
|
|
@ -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');
|
||||||
}
|
}
|
||||||
|
@ -1696,7 +1696,7 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
|
||||||
if (result.Items.length) {
|
if (result.Items.length) {
|
||||||
page.querySelector('#musicVideosCollapsible').classList.remove('hide');
|
page.querySelector('#musicVideosCollapsible').classList.remove('hide');
|
||||||
var musicVideosContent = page.querySelector('.musicVideosContent');
|
var musicVideosContent = page.querySelector('.musicVideosContent');
|
||||||
musicVideosContent.innerHTML = getVideosHtml(result.Items, user);
|
musicVideosContent.innerHTML = getVideosHtml(result.Items);
|
||||||
imageLoader.lazyChildren(musicVideosContent);
|
imageLoader.lazyChildren(musicVideosContent);
|
||||||
} else {
|
} else {
|
||||||
page.querySelector('#musicVideosCollapsible').classList.add('hide');
|
page.querySelector('#musicVideosCollapsible').classList.add('hide');
|
||||||
|
@ -1709,7 +1709,7 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
|
||||||
if (result.Items.length) {
|
if (result.Items.length) {
|
||||||
page.querySelector('#additionalPartsCollapsible').classList.remove('hide');
|
page.querySelector('#additionalPartsCollapsible').classList.remove('hide');
|
||||||
var additionalPartsContent = page.querySelector('#additionalPartsContent');
|
var additionalPartsContent = page.querySelector('#additionalPartsContent');
|
||||||
additionalPartsContent.innerHTML = getVideosHtml(result.Items, user);
|
additionalPartsContent.innerHTML = getVideosHtml(result.Items);
|
||||||
imageLoader.lazyChildren(additionalPartsContent);
|
imageLoader.lazyChildren(additionalPartsContent);
|
||||||
} else {
|
} else {
|
||||||
page.querySelector('#additionalPartsCollapsible').classList.add('hide');
|
page.querySelector('#additionalPartsCollapsible').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: 'autooverflow',
|
||||||
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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1932,17 +1928,6 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
|
||||||
setTrailerButtonVisibility(view, currentItem);
|
setTrailerButtonVisibility(view, currentItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
function editImages() {
|
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
require(['imageEditor'], function (imageEditor) {
|
|
||||||
imageEditor.show({
|
|
||||||
itemId: currentItem.Id,
|
|
||||||
serverId: currentItem.ServerId
|
|
||||||
}).then(resolve, reject);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function onWebSocketMessage(e, data) {
|
function onWebSocketMessage(e, data) {
|
||||||
var msg = data;
|
var msg = data;
|
||||||
|
|
||||||
|
@ -1982,24 +1967,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;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue