delete active pl done for side playlist

This commit is contained in:
naomiaro 2010-12-22 13:05:32 -05:00
parent 461df7b61f
commit b1a4cb5bd4
2 changed files with 29 additions and 9 deletions

View file

@ -68,16 +68,26 @@ function moveSPLItem(event, ui) {
$.post(url, setSPLContent);
}
function noOpenPL(json) {
$("#side_playlist")
.empty()
.append(json.html);
}
function closeSPL() {
var url;
url = '/Playlist/close/format/json/view/spl';
$.post(url, function(json){
$("#side_playlist")
.empty()
.append(json.html);
});
$.post(url, noOpenPL);
}
function deleteSPL() {
var url;
url = '/Playlist/delete-active/format/json/view/spl';
$.post(url, noOpenPL);
}
function setUpSPL() {
@ -86,6 +96,7 @@ function setUpSPL() {
$("#spl_sortable" ).bind( "sortstop", moveSPLItem);
$("#spl_remove_selected").click(deleteSPLItem);
$("#spl_close").click(closeSPL);
$("#spl_delete").click(deleteSPL);
$("#spl_sortable").droppable();
$("#spl_sortable" ).bind( "drop", addSPLItem);