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

update user data queries

This commit is contained in:
Luke Pulverenti 2016-05-11 10:36:28 -04:00
parent f7e2648d79
commit 144e773ee4
37 changed files with 196 additions and 238 deletions

View file

@ -283,7 +283,7 @@
});
}
function showMoreMenu(context, button) {
function showMoreMenu(context, button, user) {
var items = [];
@ -293,11 +293,13 @@
ironIcon: 'photo'
});
items.push({
name: Globalize.translate('ButtonIdentify'),
id: 'identify',
ironIcon: 'info'
});
if (LibraryBrowser.canIdentify(user, currentItem.Type)) {
items.push({
name: Globalize.translate('ButtonIdentify'),
id: 'identify',
ironIcon: 'info'
});
}
items.push({
name: Globalize.translate('ButtonRefresh'),
@ -378,7 +380,10 @@
context.querySelector('.btnMore').addEventListener('click', function (e) {
showMoreMenu(context, e.target);
Dashboard.getCurrentUser().then(function (user) {
showMoreMenu(context, e.target, user);
});
});
context.querySelector('.btnHeaderSave').addEventListener('click', function (e) {
@ -676,16 +681,6 @@
$('#fldYear', context).show();
}
Dashboard.getCurrentUser().then(function (user) {
if (LibraryBrowser.getMoreCommands(item, user).indexOf('identify') != -1) {
$('#btnIdentify', context).show();
} else {
$('#btnIdentify', context).hide();
}
});
if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "BoxSet") {
$('#keywordsCollapsible', context).show();
} else {