mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
use shared alpha picker
This commit is contained in:
parent
0f7541beda
commit
d8cde41200
26 changed files with 444 additions and 331 deletions
|
@ -432,12 +432,28 @@
|
|||
nowPlayingTabButtons[i].addEventListener('click', onTabButtonClick);
|
||||
}
|
||||
|
||||
elem.querySelector('.chapterCard').addEventListener('click', function () {
|
||||
elem.addEventListener('click', function (e) {
|
||||
|
||||
self.seek(parseInt(this.getAttribute('data-position')));
|
||||
var chapterCard = parentWithClass(e.target, 'chapterCard');
|
||||
if (chapterCard) {
|
||||
self.seek(parseInt(chapterCard.getAttribute('data-position')));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function parentWithClass(elem, className) {
|
||||
|
||||
while (!elem.classList || !elem.classList.contains(className)) {
|
||||
elem = elem.parentNode;
|
||||
|
||||
if (!elem) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return elem;
|
||||
}
|
||||
|
||||
function getNowPlayingTabsHtml(item) {
|
||||
|
||||
var html = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue