mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update listviews
This commit is contained in:
parent
d9c694f564
commit
f3cde16786
51 changed files with 402 additions and 333 deletions
|
@ -235,6 +235,10 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
|
|||
|
||||
if (action) {
|
||||
executeAction(card, action);
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -277,20 +281,34 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
|
|||
}
|
||||
}
|
||||
|
||||
function on(context) {
|
||||
context.addEventListener('click', onClick);
|
||||
inputManager.on(context, onCommand);
|
||||
function on(context, options) {
|
||||
|
||||
options = options || {};
|
||||
|
||||
if (options.click !== false) {
|
||||
context.addEventListener('click', onClick);
|
||||
}
|
||||
|
||||
if (options.command !== false) {
|
||||
inputManager.on(context, onCommand);
|
||||
}
|
||||
}
|
||||
|
||||
function off(context) {
|
||||
function off(context, options) {
|
||||
options = options || {};
|
||||
|
||||
context.removeEventListener('click', onClick);
|
||||
inputManager.off(context, onCommand);
|
||||
|
||||
if (options.command !== false) {
|
||||
inputManager.off(context, onCommand);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
on: on,
|
||||
off: off,
|
||||
execute: executeAction
|
||||
execute: executeAction,
|
||||
onClick: onClick
|
||||
};
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue