CC-3174 : showbuilder

unsetting playlist id in the session properly.
This commit is contained in:
Naomi Aro 2012-02-07 18:42:34 +01:00
parent 529f3fa52f
commit 668e214371
2 changed files with 10 additions and 4 deletions
airtime_mvc
application/controllers
public/js/airtime/library

View File

@ -36,7 +36,12 @@ class PlaylistController extends Zend_Controller_Action
private function changePlaylist($pl_id)
{
$this->pl_sess->id = intval($pl_id);
if (is_null($pl_id)) {
unset($this->pl_sess->id);
}
else {
$this->pl_sess->id = intval($pl_id);
}
}
private function createUpdateResponse($pl)
@ -143,11 +148,11 @@ class PlaylistController extends Zend_Controller_Action
$this->changePlaylist(null);
}
else {
$pl = $this->getPlaylist();
Logging::log("Not deleting currently active playlist");
}
Application_Model_Playlist::DeletePlaylists($ids);
$pl = $this->getPlaylist();
}
catch(PlaylistNotFoundException $e) {
Logging::log("Playlist not found");

View File

@ -593,8 +593,9 @@ var AIRTIME = (function(AIRTIME){
$(playlist).delegate("#spl_new",
{"click": AIRTIME.playlist.fnNew});
$(playlist).delegate("#spl_delete",
{"click": AIRTIME.playlist.fnDelete});
$(playlist).delegate("#spl_delete", {"click": function(ev){
AIRTIME.playlist.fnDelete();
}});
setPlaylistEntryEvents(playlist);
setCueEvents(playlist);