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

fix multi-select

This commit is contained in:
Luke Pulverenti 2015-12-25 21:54:04 -05:00
parent 276a058b95
commit 9af2992260
17 changed files with 208 additions and 375 deletions

View file

@ -892,11 +892,10 @@
showSelections(card);
if (s.stopPropagation) {
if (e.stopPropagation) {
e.stopPropagation();
}
e.preventDefault();
e.stopPropagation();
return false;
}
e.preventDefault();
@ -949,19 +948,17 @@
if (!itemSelectionPanel) {
require(['paper-checkbox'], function () {
itemSelectionPanel = document.createElement('div');
itemSelectionPanel.classList.add('itemSelectionPanel');
itemSelectionPanel = document.createElement('div');
itemSelectionPanel.classList.add('itemSelectionPanel');
item.querySelector('.cardContent').appendChild(itemSelectionPanel);
item.querySelector('.cardContent').appendChild(itemSelectionPanel);
var chkItemSelect = document.createElement('paper-checkbox');
chkItemSelect.classList.add('chkItemSelect');
var chkItemSelect = document.createElement('paper-checkbox');
chkItemSelect.classList.add('chkItemSelect');
$(chkItemSelect).on('change', onSelectionChange);
$(chkItemSelect).on('change', onSelectionChange);
itemSelectionPanel.appendChild(chkItemSelect);
});
itemSelectionPanel.appendChild(chkItemSelect);
}
}
@ -1018,14 +1015,16 @@
function showSelections(initialCard) {
var cards = document.querySelectorAll('.card');
for (var i = 0, length = cards.length; i < length; i++) {
showSelection(cards[i]);
}
require(['paper-checkbox'], function() {
var cards = document.querySelectorAll('.card');
for (var i = 0, length = cards.length; i < length; i++) {
showSelection(cards[i]);
}
showSelectionCommands();
initialCard.querySelector('.chkItemSelect').checked = true;
updateItemSelection(initialCard, true);
showSelectionCommands();
initialCard.querySelector('.chkItemSelect').checked = true;
updateItemSelection(initialCard, true);
});
}
function hideSelections() {