CC-2203: Search results: "Delete" should be at the bottom of the list and should have a confirmation

-Fixed
This commit is contained in:
martin 2011-04-18 12:43:04 -04:00
parent d7bb00dc20
commit fab68dfad1
3 changed files with 106 additions and 80 deletions

View file

@ -24,7 +24,6 @@ function deleteItem(type, id) {
dt.fnDeleteRow( tr );
}
//callbacks called by jjmenu
function deleteAudioClip(json) {
if(json.message) {
alert(json.message);
@ -34,6 +33,28 @@ function deleteAudioClip(json) {
deleteItem("au", json.id);
}
//callbacks called by jjmenu
function confirmDeleteAudioClip(params){
if(confirm('Are you sure you want to delete?')){
var url = '/Library/delete' + params;
$.ajax({
url: url,
success: deleteAudioClip
});
}
}
//callbacks called by jjmenu
function confirmDeletePlaylist(params){
if(confirm('Are you sure you want to delete?')){
var url = '/Playlist/delete' + params;
$.ajax({
url: url,
success: deletePlaylist
});
}
}
function deletePlaylist(json) {
if(json.message) {
alert(json.message);