CC-5172 : errors from setting cues in waveform editor not handled properly

Conflicts:
	airtime_mvc/application/models/Playlist.php
This commit is contained in:
Naomi 2013-05-22 17:50:34 -04:00 committed by Martin Konecny
parent 02292569f9
commit c57de650e8
3 changed files with 30 additions and 2 deletions

View file

@ -144,7 +144,8 @@ var AIRTIME = (function(AIRTIME){
var url = baseUrl+"Playlist/set-cue",
lastMod = getModified(),
type = $('#obj_type').val(),
li;
li,
span;
if (!isTimeValid(cueIn)){
$el.find('.cue-in-error').val($.i18n._("please put in a time '00:00:00 (.0)'")).show();
@ -174,7 +175,27 @@ var AIRTIME = (function(AIRTIME){
return;
}
if (json.cue_error !== undefined) {
showError(span, json.cue_error);
li = $('#side_playlist li[unqid='+id+']');
if (json.code === 0) {
span = $('#spl_cue_in_'+id).find('span');
showError(span, json.cue_error);
span = $('#spl_cue_out_'+id).find('span');
showError(span, json.cue_error);
}
else if (json.code === 1) {
span = $('#spl_cue_in_'+id).find('span');
showError(span, json.cue_error);
}
else if (json.code === 2) {
span = $('#spl_cue_out_'+id).find('span');
showError(span, json.cue_error);
}
return;
}