can now change name/description of a playlist.
This commit is contained in:
parent
0da5c340b3
commit
86d1aafed4
|
@ -80,6 +80,9 @@ class LibraryController extends Zend_Controller_Action
|
|||
'title' => 'Close');
|
||||
}
|
||||
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Playlist/metadata/format/json/id/#id#', 'callback' => 'window["createPlaylistMetaForm"]'),
|
||||
'title' => 'Edit Metadata');
|
||||
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Playlist/delete'.$params, 'callback' => 'window["deletePlaylist"]'),
|
||||
'title' => 'Delete');
|
||||
|
||||
|
|
|
@ -1,4 +1 @@
|
|||
<?php
|
||||
|
||||
$this->form->setAction($this->url());
|
||||
echo $this->form;
|
||||
<?php echo $this->form; ?>
|
||||
|
|
|
@ -328,47 +328,49 @@ function closeSPL() {
|
|||
$.post(url, noOpenPL);
|
||||
}
|
||||
|
||||
function createPlaylistMetaForm(json) {
|
||||
var submit, form;
|
||||
|
||||
submit = $('<button id="new_playlist_submit">Submit</button>')
|
||||
.button()
|
||||
.click(function(){
|
||||
var url, data;
|
||||
|
||||
url = '/Playlist/metadata/format/json';
|
||||
data = $("#side_playlist form").serialize();
|
||||
|
||||
$.post(url, data, function(json){
|
||||
if(json.form){
|
||||
|
||||
}
|
||||
|
||||
openDiffSPL(json);
|
||||
})
|
||||
});
|
||||
|
||||
form = $(json.form);
|
||||
|
||||
form.find("input, textarea")
|
||||
.keydown(function(event){
|
||||
//enter was pressed
|
||||
if(event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
$("#new_playlist_submit").click();
|
||||
}
|
||||
})
|
||||
|
||||
$("#side_playlist")
|
||||
.empty()
|
||||
.append(form)
|
||||
.append(submit);
|
||||
}
|
||||
|
||||
function newSPL() {
|
||||
var url;
|
||||
|
||||
url = '/Playlist/new/format/json';
|
||||
|
||||
$.post(url, function(json){
|
||||
var submit, form;
|
||||
|
||||
submit = $('<button id="new_playlist_submit">Submit</button>')
|
||||
.button()
|
||||
.click(function(){
|
||||
var url, data;
|
||||
|
||||
url = '/Playlist/metadata/format/json';
|
||||
data = $("#side_playlist form").serialize();
|
||||
|
||||
$.post(url, data, function(json){
|
||||
if(json.form){
|
||||
|
||||
}
|
||||
|
||||
openDiffSPL(json);
|
||||
})
|
||||
});
|
||||
|
||||
form = $(json.form);
|
||||
|
||||
form.find("input, textarea")
|
||||
.keydown(function(event){
|
||||
//enter was pressed
|
||||
if(event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
$("#new_playlist_submit").click();
|
||||
}
|
||||
})
|
||||
|
||||
$("#side_playlist")
|
||||
.empty()
|
||||
.append(form)
|
||||
.append(submit);
|
||||
});
|
||||
$.post(url, createPlaylistMetaForm);
|
||||
}
|
||||
|
||||
function deleteSPL() {
|
||||
|
|
Loading…
Reference in New Issue