CC-2238: Deleting a playlist from right list
Fixed. 1. It only clears the left window form if 'delete' action is clickced on the opened playlist. 2. similar functionality was implemented when 'edit meatadata' form is opened in the left window.
This commit is contained in:
parent
9638f6dd3e
commit
6bbbdd5404
|
@ -136,6 +136,7 @@ class PlaylistController extends Zend_Controller_Action
|
|||
unset($this->view->pl);
|
||||
}
|
||||
|
||||
$this->view->pl_id = $pl_id;
|
||||
$this->view->fieldset = $form;
|
||||
$this->view->form = $this->view->render('playlist/new.phtml');
|
||||
}
|
||||
|
@ -151,6 +152,7 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$pl = $this->getPlaylist();
|
||||
|
||||
$this->view->pl = $pl;
|
||||
$this->view->pl_id = $pl->getId();
|
||||
$this->view->html = $this->view->render('playlist/index.phtml');
|
||||
unset($this->view->pl);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,9 @@ function deletePlaylist(json) {
|
|||
deleteItem("pl", json.id);
|
||||
|
||||
// display noOpenPL on the left window
|
||||
noOpenPL(json);
|
||||
if( currentlyOpenedSplId == json.id){
|
||||
noOpenPL(json);
|
||||
}
|
||||
}
|
||||
//end callbacks called by jjmenu
|
||||
|
||||
|
|
|
@ -373,6 +373,8 @@ function createPlaylistMetaForm(json) {
|
|||
$("#side_playlist")
|
||||
.empty()
|
||||
.append(form);
|
||||
|
||||
currentlyOpenedSplId = json.pl_id;
|
||||
}
|
||||
|
||||
function newSPL() {
|
||||
|
@ -401,6 +403,8 @@ function openDiffSPL(json) {
|
|||
$("#side_playlist")
|
||||
.empty()
|
||||
.append(json.html);
|
||||
|
||||
currentlyOpenedSplId = json.pl_id;
|
||||
|
||||
setUpSPL();
|
||||
}
|
||||
|
@ -512,5 +516,6 @@ function setUpSPL() {
|
|||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
var currentlyOpenedSplId;
|
||||
setUpSPL();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue