mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update collection menus
This commit is contained in:
parent
65442321a0
commit
8119b930e4
17 changed files with 183 additions and 52 deletions
|
@ -1015,7 +1015,7 @@
|
|||
renderCollectionItemType(page, parentItem, { name: Globalize.translate('HeaderItems') }, items, user);
|
||||
}
|
||||
|
||||
$('.collectionItems', page).createCardMenus();
|
||||
$('.collectionItems .itemsContainer', page).createCardMenus();
|
||||
}
|
||||
|
||||
function renderCollectionItemType(page, parentItem, type, items, user, context) {
|
||||
|
@ -1029,7 +1029,7 @@
|
|||
|
||||
html += '</h1>';
|
||||
|
||||
html += '<div class="detailSectionContent">';
|
||||
html += '<div class="detailSectionContent itemsContainer">';
|
||||
|
||||
var shape = type.type == 'MusicAlbum' ? 'detailPageSquare' : 'detailPagePortrait';
|
||||
|
||||
|
@ -1114,7 +1114,9 @@
|
|||
|
||||
var reviews = result.Items;
|
||||
|
||||
html += '<div class="paperList">';
|
||||
if (reviews.length) {
|
||||
html += '<div class="paperList">';
|
||||
}
|
||||
|
||||
for (var i = 0, length = reviews.length; i < length; i++) {
|
||||
|
||||
|
@ -1171,7 +1173,9 @@
|
|||
|
||||
html += '</paper-icon-item>';
|
||||
}
|
||||
html += '</div>';
|
||||
if (reviews.length) {
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
if (limit && result.TotalRecordCount > limit) {
|
||||
html += '<p style="margin: 0;"><paper-button raised class="more moreCriticReviews">' + Globalize.translate('ButtonMore') + '</paper-button></p>';
|
||||
|
|
|
@ -174,7 +174,11 @@
|
|||
var card = parentWithClass(e.target, 'card');
|
||||
|
||||
if (card) {
|
||||
showContextMenu(card, {});
|
||||
var itemSelectionPanel = card.querySelector('.itemSelectionPanel');
|
||||
|
||||
if (!itemSelectionPanel) {
|
||||
showContextMenu(card, {});
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
|
@ -1364,6 +1368,10 @@
|
|||
|
||||
playAllFromHere(index, itemsContainer, 'play');
|
||||
}
|
||||
else if (action == 'instantmix') {
|
||||
|
||||
MediaController.instantMix(itemId);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1517,27 +1517,18 @@
|
|||
|
||||
self.instantMix = function (id) {
|
||||
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
var itemLimit = 100;
|
||||
|
||||
ApiClient.getItem(userId, id).done(function (item) {
|
||||
ApiClient.getInstantMixFromItem(id, {
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
Fields: getItemFields,
|
||||
Limit: itemLimit
|
||||
|
||||
var promise;
|
||||
var itemLimit = 100;
|
||||
}).done(function (result) {
|
||||
|
||||
promise = ApiClient.getInstantMixFromItem(id, {
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
Fields: getItemFields,
|
||||
Limit: itemLimit
|
||||
});
|
||||
|
||||
promise.done(function (result) {
|
||||
|
||||
self.play({ items: result.Items });
|
||||
|
||||
});
|
||||
self.play({ items: result.Items });
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
self.stop = function (destroyRenderer) {
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
shape: getSquareShape(),
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
defaultAction: 'play',
|
||||
defaultAction: 'instantmix',
|
||||
lazy: true,
|
||||
centerText: true,
|
||||
overlayMoreButton: true
|
||||
|
@ -132,7 +132,7 @@
|
|||
shape: getSquareShape(),
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
defaultAction: 'play',
|
||||
defaultAction: 'instantmix',
|
||||
lazy: true,
|
||||
centerText: true,
|
||||
overlayMoreButton: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue