fixed delete for playlist editor, sortable doesn't effect contenteditable spans now in cue/fade editors.
This commit is contained in:
parent
8f8c4716cc
commit
290059c0ed
2 changed files with 7 additions and 14 deletions
|
@ -35,7 +35,7 @@
|
||||||
#spl_sortable {
|
#spl_sortable {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding:0;
|
padding:0;
|
||||||
height: 300px;
|
height: 400px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
width:100%;
|
width:100%;
|
||||||
margin-top:0;
|
margin-top:0;
|
||||||
|
|
|
@ -122,19 +122,12 @@ function submitOnEnter(event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//function is needed for content editable span because
|
|
||||||
//jQuery sortable is not letting me edit.
|
|
||||||
function focusOnEditable(ev){
|
|
||||||
$(this).focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
function setCueEvents() {
|
function setCueEvents() {
|
||||||
|
|
||||||
$(".spl_cue_in span:last").blur(changeCueIn);
|
$(".spl_cue_in span:last").blur(changeCueIn);
|
||||||
$(".spl_cue_out span:last").blur(changeCueOut);
|
$(".spl_cue_out span:last").blur(changeCueOut);
|
||||||
|
|
||||||
$(".spl_cue_in span:first, .spl_cue_out span:first")
|
$(".spl_cue_in span:first, .spl_cue_out span:first")
|
||||||
.mousedown(focusOnEditable)
|
|
||||||
.keyup(submitOnEnter);
|
.keyup(submitOnEnter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +137,6 @@ function setFadeEvents() {
|
||||||
$(".spl_fade_out span:first").blur(changeFadeOut);
|
$(".spl_fade_out span:first").blur(changeFadeOut);
|
||||||
|
|
||||||
$(".spl_fade_in span:first, .spl_fade_out span:first")
|
$(".spl_fade_in span:first, .spl_fade_out span:first")
|
||||||
.mousedown(focusOnEditable)
|
|
||||||
.keyup(submitOnEnter);
|
.keyup(submitOnEnter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,12 +264,11 @@ function addSPLItem(event, ui){
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteSPLItem(event){
|
function deleteSPLItem(event){
|
||||||
|
event.stopPropagation();
|
||||||
|
|
||||||
var url, pos;
|
var url, pos;
|
||||||
|
|
||||||
event.stopPropagation();
|
pos = $(this).parent().parent().attr("id").split("_").pop();
|
||||||
|
|
||||||
pos = $(this).parent().attr("id").split("_").pop();
|
|
||||||
|
|
||||||
url = '/Playlist/delete-item';
|
url = '/Playlist/delete-item';
|
||||||
|
|
||||||
$.post(url, {format: "json", pos: pos}, setSPLContent);
|
$.post(url, {format: "json", pos: pos}, setSPLContent);
|
||||||
|
@ -368,7 +359,9 @@ function openDiffSPL(json) {
|
||||||
|
|
||||||
function setUpSPL() {
|
function setUpSPL() {
|
||||||
|
|
||||||
$("#spl_sortable").sortable();
|
$("#spl_sortable").sortable({
|
||||||
|
handle: 'div.list-item-container'
|
||||||
|
});
|
||||||
$("#spl_sortable" ).bind( "sortstop", moveSPLItem);
|
$("#spl_sortable" ).bind( "sortstop", moveSPLItem);
|
||||||
$("#spl_remove_selected").click(deleteSPLItem);
|
$("#spl_remove_selected").click(deleteSPLItem);
|
||||||
$("#spl_new")
|
$("#spl_new")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue