From 606c52470abcf6e4f5288482be1b0eae3e52019b Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 29 Nov 2011 16:24:41 +0100 Subject: [PATCH] CC-3137 : Cleaning Up Old Playlist Stuff adding new playlist to the library. --- airtime_mvc/public/js/airtime/library/spl.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/public/js/airtime/library/spl.js b/airtime_mvc/public/js/airtime/library/spl.js index 42eb4937b..2b56d1686 100644 --- a/airtime_mvc/public/js/airtime/library/spl.js +++ b/airtime_mvc/public/js/airtime/library/spl.js @@ -319,7 +319,12 @@ function newSPL() { stopAudioPreview(); url = '/Playlist/new/format/json'; - $.post(url, openDiffSPL); + $.post(url, function(json){ + openDiffSPL(json); + + //redraw the library list + redrawDataTablePage(); + }); } function deleteSPL() { @@ -340,6 +345,7 @@ function deleteSPL() { } function openDiffSPL(json) { + if(json.playlist_error == true){ alertPlaylistErrorAndReload(); } @@ -348,8 +354,7 @@ function openDiffSPL(json) { .append(json.html); currentlyOpenedSplId = json.pl_id; - - setUpSPL(); + setUpSPL(); } function editName() {