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

add delete to multi-select

This commit is contained in:
Luke Pulverenti 2016-01-19 14:03:46 -05:00
parent 99652f3b99
commit c144fe57d4
6 changed files with 48 additions and 22 deletions

View file

@ -469,7 +469,7 @@
PlaylistManager.showPanel([itemId]);
break;
case 'delete':
LibraryBrowser.deleteItem(itemId);
LibraryBrowser.deleteItems([itemId]);
break;
case 'download':
{
@ -1025,7 +1025,7 @@
function showSelections(initialCard) {
require(['paper-checkbox'], function() {
require(['paper-checkbox'], function () {
var cards = document.querySelectorAll('.card');
for (var i = 0, length = cards.length; i < length; i++) {
showSelection(cards[i]);
@ -1101,6 +1101,14 @@
ironIcon: 'playlist-add'
});
if (user.Policy.EnableContentDeletion) {
items.push({
name: Globalize.translate('ButtonDelete'),
id: 'delete',
ironIcon: 'delete'
});
}
if (user.Policy.EnableContentDownloading && AppInfo.supportsDownloading) {
//items.push({
// name: Globalize.translate('ButtonDownload'),
@ -1149,6 +1157,12 @@
PlaylistManager.showPanel(items);
hideSelections();
break;
case 'delete':
LibraryBrowser.deleteItems(items).then(function () {
Dashboard.navigate('index.html');
});
hideSelections();
break;
case 'groupvideos':
combineVersions($($.mobile.activePage)[0], items);
break;