mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Migrate Groupedcards.js to ES6
This commit is contained in:
parent
fbdd232869
commit
d27fb43d68
2 changed files with 8 additions and 7 deletions
|
@ -114,6 +114,7 @@
|
||||||
"src/components/playback/remotecontrolautoplay.js",
|
"src/components/playback/remotecontrolautoplay.js",
|
||||||
"src/components/playback/volumeosd.js",
|
"src/components/playback/volumeosd.js",
|
||||||
"src/components/playlisteditor/playlisteditor.js",
|
"src/components/playlisteditor/playlisteditor.js",
|
||||||
|
"src/components/groupedcards.js",
|
||||||
"src/components/htmlMediaHelper.js",
|
"src/components/htmlMediaHelper.js",
|
||||||
"src/components/playmenu.js",
|
"src/components/playmenu.js",
|
||||||
"src/components/sanatizefilename.js",
|
"src/components/sanatizefilename.js",
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
define(['dom', 'appRouter', 'connectionManager'], function (dom, appRouter, connectionManager) {
|
/* eslint-disable indent */
|
||||||
|
|
||||||
|
import dom from 'dom';
|
||||||
|
import appRouter from 'appRouter';
|
||||||
|
import connectionManager from 'connectionManager';
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function onGroupedCardClick(e, card) {
|
function onGroupedCardClick(e, card) {
|
||||||
|
@ -31,15 +36,10 @@ define(['dom', 'appRouter', 'connectionManager'], function (dom, appRouter, conn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onItemsContainerClick(e) {
|
export function onItemsContainerClick(e) {
|
||||||
var groupedCard = dom.parentWithClass(e.target, 'groupedCard');
|
var groupedCard = dom.parentWithClass(e.target, 'groupedCard');
|
||||||
|
|
||||||
if (groupedCard) {
|
if (groupedCard) {
|
||||||
onGroupedCardClick(e, groupedCard);
|
onGroupedCardClick(e, groupedCard);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
|
||||||
onItemsContainerClick: onItemsContainerClick
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue