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

collection fixes

This commit is contained in:
Luke Pulverenti 2015-10-14 01:46:11 -04:00
parent 8f05744009
commit add9159c97
10 changed files with 280 additions and 294 deletions

View file

@ -414,7 +414,10 @@
switch (id) {
case 'addtocollection':
BoxSetEditor.showPanel([itemId]);
require(['collectioneditor'], function (collectioneditor) {
new collectioneditor().show([itemId]);
});
break;
case 'playlist':
PlaylistManager.showPanel([itemId]);
@ -1236,18 +1239,23 @@
positionTo: e.target,
callback: function (id) {
var items = selectedItems.slice(0);
switch (id) {
case 'addtocollection':
BoxSetEditor.showPanel(selectedItems);
require(['collectioneditor'], function (collectioneditor) {
new collectioneditor().show(items);
});
hideSelections();
break;
case 'playlist':
PlaylistManager.showPanel(selectedItems);
PlaylistManager.showPanel(items);
hideSelections();
break;
case 'refresh':
selectedItems.map(function (itemId) {
items.map(function (itemId) {
// TODO: Create an endpoint to do this in bulk
ApiClient.refreshItem(itemId, {
@ -1264,7 +1272,7 @@
break;
case 'sync':
SyncManager.showMenu({
items: selectedItems.map(function (i) {
items: items.map(function (i) {
return {
Id: i
};
@ -1332,40 +1340,6 @@
});
}
function addToCollection(page) {
var selection = getSelectedItems();
if (selection.length < 1) {
Dashboard.alert({
message: Globalize.translate('MessagePleaseSelectOneItem'),
title: Globalize.translate('HeaderError')
});
return;
}
BoxSetEditor.showPanel(selection);
}
function addToPlaylist(page) {
var selection = getSelectedItems();
if (selection.length < 1) {
Dashboard.alert({
message: Globalize.translate('MessagePleaseSelectOneItem'),
title: Globalize.translate('HeaderError')
});
return;
}
PlaylistManager.showPanel(selection);
}
function onItemWithActionClick(e) {
var elem = this;