mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
implement removing from playlists
This commit is contained in:
parent
a9e5a73d42
commit
6f781f5a96
5 changed files with 43 additions and 11 deletions
|
@ -178,11 +178,11 @@
|
|||
|
||||
function onRemoveFromPlaylistButtonClick() {
|
||||
|
||||
var id = this.getAttribute('data-itemid');
|
||||
var playlistItemId = this.getAttribute('data-playlistitemid');
|
||||
|
||||
var page = $(this).parents('.page');
|
||||
|
||||
$('.itemsContainer', page).trigger('needsrefresh');
|
||||
$('.itemsContainer', page).trigger('removefromplaylist', [playlistItemId]);
|
||||
|
||||
// Used by the tab menu, not the slide up
|
||||
$('.tapHoldMenu').popup('close');
|
||||
|
@ -272,6 +272,7 @@
|
|||
}
|
||||
|
||||
var itemId = card.getAttribute('data-itemid');
|
||||
var playlistItemId = card.getAttribute('data-playlistitemid');
|
||||
var commands = card.getAttribute('data-commands').split(',');
|
||||
var itemType = card.getAttribute('data-itemtype');
|
||||
var mediaType = card.getAttribute('data-mediatype');
|
||||
|
@ -327,7 +328,7 @@
|
|||
}
|
||||
|
||||
if (commands.indexOf('removefromplaylist') != -1) {
|
||||
html += '<li data-icon="delete"><a href="#" class="btnRemoveFromPlaylist" data-itemid="' + itemId + '">' + Globalize.translate('ButtonRemoveFromPlaylist') + '</a></li>';
|
||||
html += '<li data-icon="delete"><a href="#" class="btnRemoveFromPlaylist" data-playlistitemid="' + playlistItemId + '">' + Globalize.translate('ButtonRemoveFromPlaylist') + '</a></li>';
|
||||
}
|
||||
|
||||
html += '</ul>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue