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

update dialogs

This commit is contained in:
Luke Pulverenti 2016-05-18 17:46:56 -04:00
parent c00d7cba09
commit 92b687f9a5
16 changed files with 242 additions and 71 deletions

View file

@ -1,4 +1,4 @@
define(['layoutManager', 'datetime', 'jQuery', 'mediaInfo', 'scrollStyles'], function (layoutManager, datetime, $, mediaInfo) {
define(['layoutManager', 'datetime', 'jQuery', 'mediaInfo', 'backdrop', 'scrollStyles'], function (layoutManager, datetime, $, mediaInfo, backdrop) {
var currentItem;
@ -75,14 +75,13 @@
// For these types, make the backdrop a little smaller so that the items are more quickly accessible
if (item.Type == 'MusicArtist' || item.Type == "MusicAlbum" || item.Type == "Playlist" || item.Type == "BoxSet" || item.MediaType == "Audio" || !layoutManager.mobile) {
$('#itemBackdrop', page).addClass('noBackdrop').css('background-image', 'none');
require(['backdrop'], function (backdrop) {
backdrop.setBackdrops([item]);
});
backdrop.setBackdrops([item]);
}
else {
//$('#itemBackdrop', page).addClass('noBackdrop').css('background-image', 'none');
//Backdrops.setBackdrops(page, [item]);
hasBackdrop = LibraryBrowser.renderDetailPageBackdrop(page, item);
backdrop.clear();
}
var transparentHeader = hasBackdrop && page.classList.contains('noSecondaryNavPage');
@ -475,7 +474,7 @@
});
});
$('.itemGenres', page).each(function() {
$('.itemGenres', page).each(function () {
LibraryBrowser.renderGenres(this, item, null, isStatic);
});
LibraryBrowser.renderStudios($('.itemStudios', page), item, isStatic);
@ -1098,10 +1097,13 @@
html += '<div class="detailSection">';
html += '<div style="display:flex;align-items:center;">';
html += '<h1>';
html += '<span>' + type.name + '</span>';
html += '</h1>';
html += '<button class="btnAddToCollection" type="button" is="paper-icon-button-light" style="margin-left:1em;"><iron-icon icon="add"></iron-icon></button>';
html += '</div>';
html += '<div class="detailSectionContent itemsContainer">';
@ -1131,6 +1133,15 @@
removeFromCollection(page, parentItem, [itemId], user, context);
});
collectionItems.querySelector('.btnAddToCollection').addEventListener('click', function () {
require(['alert'], function (alert) {
alert({
text: Globalize.translate('AddItemToCollectionHelp'),
html: Globalize.translate('AddItemToCollectionHelp') + '<br/><br/><a target="_blank" href="https://github.com/MediaBrowser/Wiki/wiki/Collections">' + Globalize.translate('ButtonLearnMore') + '</a>'
});
});
});
}
function removeFromCollection(page, parentItem, itemIds, user, context) {