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

update listviews

This commit is contained in:
Luke Pulverenti 2016-07-17 00:20:36 -04:00
parent 722a452b91
commit c87b1304da
10 changed files with 134 additions and 860 deletions

View file

@ -1,4 +1,4 @@
define([], function () {
define(['apphost'], function (appHost) {
function getDisplayName(item, options) {
@ -49,6 +49,11 @@ define([], function () {
}
function supportsAddingToCollection(item) {
if (item.Type == 'Timer') {
return false;
}
var invalidTypes = ['Person', 'Genre', 'MusicGenre', 'Studio', 'GameGenre', 'BoxSet', 'Playlist', 'UserView', 'CollectionFolder', 'Audio', 'TvChannel', 'Program', 'MusicAlbum', 'Timer'];
return !item.CollectionType && invalidTypes.indexOf(item.Type) == -1 && item.MediaType != 'Photo';
@ -92,7 +97,7 @@ define([], function () {
canEdit: function (user, itemType) {
if (itemType == "UserRootFolder" || /*itemType == "CollectionFolder" ||*/ itemType == "UserView" || itemType == 'Timer') {
if (itemType == "UserRootFolder" || /*itemType == "CollectionFolder" ||*/ itemType == "UserView") {
return false;
}
@ -111,6 +116,14 @@ define([], function () {
}
return item.SupportsSync;
},
canShare: function (user, item) {
if (item.Type == 'Timer') {
return false;
}
return user.Policy.EnablePublicSharing && appHost.supports('sharing');
}
};
});