CC-4206: Smart Playlist: Edit cue in/out setting will lost all contents
-fixed event bubbling
This commit is contained in:
parent
5e1d8eabb3
commit
0203c3f0c5
|
@ -61,18 +61,15 @@ var AIRTIME = (function(AIRTIME){
|
||||||
.hide();
|
.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeCueIn(event) {
|
function changeCueIn(span) {
|
||||||
event.stopPropagation();
|
var id = span.parent().attr("id").split("_").pop(),
|
||||||
|
url = "/Playlist/set-cue",
|
||||||
var span = $(this),
|
cueIn = $.trim(span.text()),
|
||||||
id = span.parent().attr("id").split("_").pop(),
|
li = span.parents("li"),
|
||||||
url = "/Playlist/set-cue",
|
unqid = li.attr("unqid"),
|
||||||
cueIn = $.trim(span.text()),
|
lastMod = getModified(),
|
||||||
li = span.parents("li"),
|
type = $('#obj_type').val();
|
||||||
unqid = li.attr("unqid"),
|
|
||||||
lastMod = getModified(),
|
|
||||||
type = $('#obj_type').val();
|
|
||||||
|
|
||||||
if (!isTimeValid(cueIn)){
|
if (!isTimeValid(cueIn)){
|
||||||
showError(span, "please put in a time '00:00:00 (.000000)'");
|
showError(span, "please put in a time '00:00:00 (.000000)'");
|
||||||
return;
|
return;
|
||||||
|
@ -100,16 +97,13 @@ var AIRTIME = (function(AIRTIME){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeCueOut(event) {
|
function changeCueOut(span) {
|
||||||
event.stopPropagation();
|
var id = span.parent().attr("id").split("_").pop(),
|
||||||
|
url = "/Playlist/set-cue",
|
||||||
var span = $(this),
|
cueOut = $.trim(span.text()),
|
||||||
id = span.parent().attr("id").split("_").pop(),
|
li = span.parents("li"),
|
||||||
url = "/Playlist/set-cue",
|
unqid = li.attr("unqid"),
|
||||||
cueOut = $.trim(span.text()),
|
lastMod = getModified(),
|
||||||
li = span.parents("li"),
|
|
||||||
unqid = li.attr("unqid"),
|
|
||||||
lastMod = getModified(),
|
|
||||||
type = $('#obj_type').val();
|
type = $('#obj_type').val();
|
||||||
|
|
||||||
if (!isTimeValid(cueOut)){
|
if (!isTimeValid(cueOut)){
|
||||||
|
@ -140,7 +134,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeFadeIn(event) {
|
function changeFadeIn(event) {
|
||||||
event.stopPropagation();
|
event.preventDefault();
|
||||||
|
|
||||||
var span = $(this),
|
var span = $(this),
|
||||||
id = span.parent().attr("id").split("_").pop(),
|
id = span.parent().attr("id").split("_").pop(),
|
||||||
|
@ -406,14 +400,26 @@ var AIRTIME = (function(AIRTIME){
|
||||||
|
|
||||||
//sets events dynamically for the cue editor.
|
//sets events dynamically for the cue editor.
|
||||||
function setCueEvents() {
|
function setCueEvents() {
|
||||||
|
|
||||||
$pl.delegate(".spl_cue_in span",
|
$('.spl_cue_in span').blur(function(e){
|
||||||
{"focusout": changeCueIn,
|
e.stopPropagation();
|
||||||
"keydown": submitOnEnter});
|
changeCueIn($(this));
|
||||||
|
});
|
||||||
$pl.delegate(".spl_cue_out span",
|
|
||||||
{"focusout": changeCueOut,
|
$('.spl_cue_in span').keydown(function(e){
|
||||||
"keydown": submitOnEnter});
|
e.stopPropagation();
|
||||||
|
submitOnEnter(e);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.spl_cue_out span').blur(function(e){
|
||||||
|
e.stopPropagation();
|
||||||
|
changeCueOut($(this));
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.spl_cue_out span').keydown(function(e){
|
||||||
|
e.stopPropagation();
|
||||||
|
submitOnEnter(e);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//sets events dynamically for the fade editor.
|
//sets events dynamically for the fade editor.
|
||||||
|
|
Loading…
Reference in New Issue