mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes #696 - Support delete in web client
This commit is contained in:
parent
f388b62398
commit
76401c0e97
2 changed files with 11 additions and 11 deletions
|
@ -498,7 +498,7 @@
|
||||||
$('#fldRecursive', page).hide();
|
$('#fldRecursive', page).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.LocationType == "Virtual" || item.LocationType == "Remote") {
|
if (item.Type != "Channel" && item.Type != "Genre" && item.Type != "Studio" && item.Type != "MusicGenre" && item.Type != "GameGenre" && item.Type != "Person" && item.Type != "MusicArtist") {
|
||||||
$('#fldDelete', page).show();
|
$('#fldDelete', page).show();
|
||||||
} else {
|
} else {
|
||||||
$('#fldDelete', page).hide();
|
$('#fldDelete', page).hide();
|
||||||
|
@ -1494,7 +1494,15 @@
|
||||||
|
|
||||||
$('#btnDelete', this).on('click', function () {
|
$('#btnDelete', this).on('click', function () {
|
||||||
|
|
||||||
Dashboard.confirm("Are you sure you wish to delete this item?", "Confirm Deletion", function (result) {
|
var msg = "<p>Are you sure you wish to delete this item from your library?</p>";
|
||||||
|
|
||||||
|
if (currentItem.LocationType != "Remote" && currentItem.LocationType != "Virtual") {
|
||||||
|
msg = "<p>The following media location will be deleted:</p>";
|
||||||
|
msg += "<p>" + currentItem.Path + "</p>";
|
||||||
|
msg += "<p>Are you sure you wish to continue?</p>";
|
||||||
|
}
|
||||||
|
|
||||||
|
Dashboard.confirm(msg, "Confirm Deletion", function (result) {
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
|
|
||||||
|
|
|
@ -1170,16 +1170,8 @@
|
||||||
|
|
||||||
renderCriticReviews(page, currentItem);
|
renderCriticReviews(page, currentItem);
|
||||||
|
|
||||||
}).on('swipeleft.sibling', function() {
|
|
||||||
|
|
||||||
$('.lnkNextItem', page)[0].click();
|
|
||||||
|
|
||||||
}).on('swiperight.sibling', function () {
|
|
||||||
|
|
||||||
$('.lnkPreviousItem', page)[0].click();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
reload(page);
|
reload(page);
|
||||||
|
|
||||||
}).on('pagehide', "#itemDetailPage", function () {
|
}).on('pagehide', "#itemDetailPage", function () {
|
||||||
|
@ -1188,7 +1180,7 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
$(page).off("click.moreScenes").off("click.morePeople").off("click.moreSpecials").off("click.moreCriticReviews").off("swipeleft.sibling").off("swiperight.sibling");
|
$(page).off("click.moreScenes").off("click.morePeople").off("click.moreSpecials").off("click.moreCriticReviews");
|
||||||
});
|
});
|
||||||
|
|
||||||
function itemDetailPage() {
|
function itemDetailPage() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue