update listviews

This commit is contained in:
Luke Pulverenti 2016-07-16 21:58:51 -04:00
parent b5734e3e93
commit 722a452b91
19 changed files with 277 additions and 155 deletions

View file

@ -67,6 +67,50 @@ define([], function () {
return {
getDisplayName: getDisplayName,
supportsAddingToCollection: supportsAddingToCollection,
supportsAddingToPlaylist: supportsAddingToPlaylist
supportsAddingToPlaylist: supportsAddingToPlaylist,
canIdentify: function (user, itemType) {
if (itemType == "Movie" ||
itemType == "Trailer" ||
itemType == "Series" ||
itemType == "Game" ||
itemType == "BoxSet" ||
itemType == "Person" ||
itemType == "Book" ||
itemType == "MusicAlbum" ||
itemType == "MusicArtist") {
if (user.Policy.IsAdministrator) {
return true;
}
}
return false;
},
canEdit: function (user, itemType) {
if (itemType == "UserRootFolder" || /*itemType == "CollectionFolder" ||*/ itemType == "UserView" || itemType == 'Timer') {
return false;
}
if (user.Policy.IsAdministrator) {
return true;
}
return false;
},
canSync: function (user, item) {
if (user && !user.Policy.EnableSync) {
return false;
}
return item.SupportsSync;
}
};
});