mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update action sheet
This commit is contained in:
parent
81d936ff1c
commit
62e03ef0be
4 changed files with 125 additions and 104 deletions
|
@ -2577,9 +2577,19 @@
|
||||||
|
|
||||||
options.imageType = "thumb";
|
options.imageType = "thumb";
|
||||||
|
|
||||||
var itemId = item.ImageTags && item.ImageTags.Thumb ? item.Id : item.ParentThumbItemId;
|
if (item.ImageTags && item.ImageTags.Thumb) {
|
||||||
|
|
||||||
return itemId ? self.getImageUrl(itemId, options) : null;
|
options.tag = item.ImageTags.Thumb;
|
||||||
|
return self.getImageUrl(item.Id, options);
|
||||||
|
}
|
||||||
|
else if (item.ParentThumbItemId) {
|
||||||
|
|
||||||
|
options.tag = item.ImageTags.ParentThumbImageTag;
|
||||||
|
return self.getImageUrl(item.ParentThumbItemId, options);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
function show(options) {
|
function show(options) {
|
||||||
|
|
||||||
require(['paperbuttonstyle'], function () {
|
|
||||||
// items
|
// items
|
||||||
// positionTo
|
// positionTo
|
||||||
// showCancel
|
// showCancel
|
||||||
|
@ -127,7 +126,6 @@
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.ActionSheetElement = {
|
window.ActionSheetElement = {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
currentItem = item;
|
currentItem = item;
|
||||||
|
|
||||||
if (item.Type == "UserRootFolder") {
|
if (!LibraryBrowser.supportsEditing(item.Type)) {
|
||||||
$('.editPageInnerContent', page)[0].style.visibility = 'hidden';
|
$('.editPageInnerContent', page)[0].style.visibility = 'hidden';
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -680,6 +680,15 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
supportsEditing: function (itemType) {
|
||||||
|
|
||||||
|
if (itemType == "UserRootFolder" || /*itemType == "CollectionFolder" ||*/ itemType == "UserView") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
getMoreCommands: function (item, user) {
|
getMoreCommands: function (item, user) {
|
||||||
|
|
||||||
var commands = [];
|
var commands = [];
|
||||||
|
@ -701,7 +710,9 @@
|
||||||
|
|
||||||
if (user.Policy.IsAdministrator) {
|
if (user.Policy.IsAdministrator) {
|
||||||
|
|
||||||
|
if (LibraryBrowser.supportsEditing(item.Type)) {
|
||||||
commands.push('edit');
|
commands.push('edit');
|
||||||
|
}
|
||||||
|
|
||||||
if (item.MediaType == 'Video' && item.Type != 'TvChannel' && item.Type != 'Program' && item.LocationType != 'Virtual') {
|
if (item.MediaType == 'Video' && item.Type != 'TvChannel' && item.Type != 'Program' && item.LocationType != 'Virtual') {
|
||||||
commands.push('editsubtitles');
|
commands.push('editsubtitles');
|
||||||
|
@ -1469,7 +1480,9 @@
|
||||||
// itemCommands.push('playmenu');
|
// itemCommands.push('playmenu');
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
if (LibraryBrowser.supportsEditing(item.Type)) {
|
||||||
itemCommands.push('edit');
|
itemCommands.push('edit');
|
||||||
|
}
|
||||||
|
|
||||||
if (item.LocalTrailerCount) {
|
if (item.LocalTrailerCount) {
|
||||||
itemCommands.push('trailer');
|
itemCommands.push('trailer');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue