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

update shared collection editor

This commit is contained in:
Luke Pulverenti 2016-05-22 00:17:28 -04:00
parent 69fad5e57d
commit dcb6b103ec
10 changed files with 133 additions and 44 deletions

View file

@ -11,6 +11,11 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali
var commands = [];
commands.push({
name: globalize.translate('sharedcomponents#AddToCollection'),
id: 'addtocollection'
});
if (item.CanDelete) {
commands.push({
name: globalize.translate('sharedcomponents#Delete'),
@ -54,6 +59,18 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali
switch (id) {
case 'addtocollection':
{
require(['collectionEditor'], function (collectionEditor) {
new collectionEditor().show({
items: [itemId],
serverId: serverId
}).then(reject, reject);
});
break;
}
case 'download':
{
require(['fileDownloader'], function (fileDownloader) {