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

rework identify popup

This commit is contained in:
Luke Pulverenti 2015-10-04 12:15:08 -04:00
parent 9f9f83c282
commit 9969385a5e
9 changed files with 437 additions and 364 deletions

View file

@ -718,6 +718,19 @@
commands.push('share');
}
if (item.Type == "Movie" ||
item.Type == "Trailer" ||
item.Type == "Series" ||
item.Type == "Game" ||
item.Type == "BoxSet" ||
item.Type == "Person" ||
item.Type == "Book" ||
item.Type == "MusicAlbum" ||
item.Type == "MusicArtist") {
commands.push('identify');
}
return commands;
},
@ -842,6 +855,14 @@
});
}
if (commands.indexOf('identify') != -1) {
items.push({
name: Globalize.translate('ButtonIdentify'),
id: 'identify',
ironIcon: 'info'
});
}
if (commands.indexOf('refresh') != -1) {
items.push({
name: Globalize.translate('ButtonRefresh'),
@ -899,6 +920,9 @@
case 'editimages':
LibraryBrowser.editImages(itemId);
break;
case 'identify':
LibraryBrowser.identifyItem(itemId);
break;
case 'refresh':
ApiClient.refreshItem(itemId, {
@ -918,6 +942,14 @@
});
},
identifyItem: function (itemId) {
require(['components/itemidentifier/itemidentifier'], function () {
ItemIdentifier.show(itemId);
});
},
getHref: function (item, context, topParentId) {
var href = LibraryBrowser.getHrefInternal(item, context);