mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
- add "Select All" action to multiSelect
This commit is contained in:
parent
bb13952814
commit
8679e37222
2 changed files with 21 additions and 1 deletions
|
@ -175,6 +175,12 @@ import itemHelper from '../itemHelper';
|
||||||
apiClient.getItem(apiClient.getCurrentUserId(), selectedItems[0]).then(firstItem => {
|
apiClient.getItem(apiClient.getCurrentUserId(), selectedItems[0]).then(firstItem => {
|
||||||
const menuItems = [];
|
const menuItems = [];
|
||||||
|
|
||||||
|
menuItems.push({
|
||||||
|
name: globalize.translate('SelectAll'),
|
||||||
|
id: 'selectall',
|
||||||
|
icon: 'select_all'
|
||||||
|
});
|
||||||
|
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
name: globalize.translate('AddToCollection'),
|
name: globalize.translate('AddToCollection'),
|
||||||
id: 'addtocollection',
|
id: 'addtocollection',
|
||||||
|
@ -246,6 +252,19 @@ import itemHelper from '../itemHelper';
|
||||||
const serverId = apiClient.serverInfo().Id;
|
const serverId = apiClient.serverInfo().Id;
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
|
case 'selectall':
|
||||||
|
{
|
||||||
|
const elems = document.querySelectorAll('.itemSelectionPanel');
|
||||||
|
for (let i = 0, length = elems.length; i < length; i++) {
|
||||||
|
const chkItemSelect = elems[i].querySelector('.chkItemSelect');
|
||||||
|
|
||||||
|
if (chkItemSelect && !chkItemSelect.classList.contains('checkedInitial') && !chkItemSelect.checked && chkItemSelect.getBoundingClientRect().width != 0) {
|
||||||
|
chkItemSelect.checked = true;
|
||||||
|
updateItemSelection(chkItemSelect, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'addtocollection':
|
case 'addtocollection':
|
||||||
import('../collectionEditor/collectionEditor').then(({default: collectionEditor}) => {
|
import('../collectionEditor/collectionEditor').then(({default: collectionEditor}) => {
|
||||||
new collectionEditor({
|
new collectionEditor({
|
||||||
|
|
|
@ -1606,5 +1606,6 @@
|
||||||
"VideoBitrateNotSupported": "The video's bitrate is not supported",
|
"VideoBitrateNotSupported": "The video's bitrate is not supported",
|
||||||
"UnknownVideoStreamInfo": "The video stream info is unknown",
|
"UnknownVideoStreamInfo": "The video stream info is unknown",
|
||||||
"UnknownAudioStreamInfo": "The audio stream info is unknown",
|
"UnknownAudioStreamInfo": "The audio stream info is unknown",
|
||||||
"DirectPlayError": "There was an error starting direct playback"
|
"DirectPlayError": "There was an error starting direct playback",
|
||||||
|
"SelectAll": "Select All"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue