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

add Add to collection buttons

This commit is contained in:
Luke Pulverenti 2015-01-23 23:50:45 -05:00
parent 9b452f3b53
commit 218e086d94
19 changed files with 481 additions and 214 deletions

View file

@ -185,6 +185,17 @@
return false;
}
function onAddToCollectionButtonClick() {
var id = this.getAttribute('data-itemid');
closeContextMenu();
BoxSetEditor.showPanel([id]);
return false;
}
function onAddToPlaylistButtonClick() {
var id = this.getAttribute('data-itemid');
@ -377,6 +388,10 @@
var href = card.getAttribute('data-href') || card.href || $('a', card).attr('href');
if (commands.indexOf('addtocollection') != -1) {
html += '<li data-icon="plus"><a href="#" class="btnAddToCollection" data-itemid="' + itemId + '">' + Globalize.translate('ButtonAddToCollection') + '</a></li>';
}
if (commands.indexOf('playlist') != -1) {
html += '<li data-icon="plus"><a href="#" class="btnAddToPlaylist" data-itemid="' + itemId + '">' + Globalize.translate('ButtonAddToPlaylist') + '</a></li>';
}
@ -464,6 +479,7 @@
$('.btnExternalPlayer', elem).on('click', onExternalPlayerButtonClick);
$('.btnDelete', elem).on('click', onDeleteButtonClick);
$('.btnSync', elem).on('click', onSyncButtonClick);
$('.btnAddToCollection', elem).on('click', onAddToCollectionButtonClick);
});
}
@ -826,7 +842,7 @@
return;
}
BoxSetEditor.showPanel(page, selection);
BoxSetEditor.showPanel(selection);
}
function addToPlaylist(page) {