Confirm before deleting playlist

This commit is contained in:
Calvin Montgomery 2013-06-20 23:11:38 -04:00
parent 9038238936
commit 9fd4d20a7e
1 changed files with 6 additions and 3 deletions

View File

@ -908,9 +908,12 @@ Callbacks = {
$("<i/>").addClass("icon-trash").appendTo(del);
(function(li) {
del.click(function() {
socket.emit("deletePlaylist", {
name: li.data("pl-name")
});
var go = confirm("Are you sure you want to delete playlist '" + li.data("pl-name") + "'?");
if(go) {
socket.emit("deletePlaylist", {
name: li.data("pl-name")
});
}
});
})(li);
if(hasPermission("playlistaddlist")) {