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

use shared chaptercardbuilder.js

This commit is contained in:
Luke Pulverenti 2016-07-30 22:54:17 -04:00
parent f9089f44cc
commit ce0fd77a63
8 changed files with 135 additions and 110 deletions

View file

@ -16,7 +16,10 @@
selectedElements = [];
var elems = document.querySelectorAll('.itemSelectionPanel');
for (var i = 0, length = elems.length; i < length; i++) {
elems[i].parentNode.removeChild(elems[i]);
var parent = elems[i].parentNode;
parent.removeChild(elems[i]);
parent.classList.remove('withMultiSelect');
}
}
}
@ -75,7 +78,7 @@
function updateItemSelection(chkItemSelect, selected) {
var id = dom.parentWithClass(chkItemSelect, 'card').getAttribute('data-id');
var id = dom.parentWithAttribute(chkItemSelect, 'data-id').getAttribute('data-id');
if (selected) {
@ -120,7 +123,9 @@
itemSelectionPanel = document.createElement('div');
itemSelectionPanel.classList.add('itemSelectionPanel');
(item.querySelector('.cardBox') || item.querySelector('.cardContent')).appendChild(itemSelectionPanel);
var parent = item.querySelector('.cardBox') || item.querySelector('.cardContent');
parent.classList.add('withMultiSelect');
parent.appendChild(itemSelectionPanel);
var cssClass = 'chkItemSelect';
if (isChecked && !browser.firefox) {