CC-3149: Playlist Builder, fix JS for editing title/description
This commit is contained in:
parent
966dd49610
commit
06cbe215a3
|
@ -364,7 +364,9 @@ function editName() {
|
||||||
$("#playlist_name_input")
|
$("#playlist_name_input")
|
||||||
.removeClass('element_hidden')
|
.removeClass('element_hidden')
|
||||||
.val(playlistName)
|
.val(playlistName)
|
||||||
.blur(function(){
|
.keydown(function(event){
|
||||||
|
if(event.keyCode === 13) {
|
||||||
|
event.preventDefault();
|
||||||
var input = $(this);
|
var input = $(this);
|
||||||
var url;
|
var url;
|
||||||
url = '/Playlist/set-playlist-name';
|
url = '/Playlist/set-playlist-name';
|
||||||
|
@ -377,8 +379,8 @@ function editName() {
|
||||||
nameElement.text(json.playlistName);
|
nameElement.text(json.playlistName);
|
||||||
redrawDataTablePage();
|
redrawDataTablePage();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.keydown(submitOnEnter)
|
|
||||||
.focus();
|
.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,9 +443,12 @@ function setUpSPL() {
|
||||||
$.post(url, {format: "json", description: description}, function(json){
|
$.post(url, {format: "json", description: description}, function(json){
|
||||||
if(json.playlist_error == true){
|
if(json.playlist_error == true){
|
||||||
alertPlaylistErrorAndReload();
|
alertPlaylistErrorAndReload();
|
||||||
}else{
|
}
|
||||||
|
else{
|
||||||
textarea.val(json.playlistDescription);
|
textarea.val(json.playlistDescription);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$("#fieldset-metadate_change").addClass("closed");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -455,9 +460,12 @@ function setUpSPL() {
|
||||||
$.post(url, {format: "json"}, function(json){
|
$.post(url, {format: "json"}, function(json){
|
||||||
if(json.playlist_error == true){
|
if(json.playlist_error == true){
|
||||||
alertPlaylistErrorAndReload();
|
alertPlaylistErrorAndReload();
|
||||||
}else{
|
}
|
||||||
|
else{
|
||||||
textarea.val(json.playlistDescription);
|
textarea.val(json.playlistDescription);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$("#fieldset-metadate_change").addClass("closed");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue