CC-2065: Fade times longer than Airtime supports can be set in Playlist Builder and Preferences
This commit is contained in:
parent
09ccac3384
commit
7317b1d5af
|
@ -436,7 +436,7 @@ class Application_Model_Playlist {
|
||||||
if ( $dbFadeStrPos === False )
|
if ( $dbFadeStrPos === False )
|
||||||
$fade .= '.000000';
|
$fade .= '.000000';
|
||||||
else
|
else
|
||||||
while( strlen( $fade ) < 8 )
|
while( strlen( $fade ) < 9 )
|
||||||
$fade .= '0';
|
$fade .= '0';
|
||||||
//done, just need to set back the formated values
|
//done, just need to set back the formated values
|
||||||
return $fade;
|
return $fade;
|
||||||
|
|
|
@ -7,6 +7,12 @@ function stopAudioPreview() {
|
||||||
$('#jquery_jplayer_1').jPlayer('stop');
|
$('#jquery_jplayer_1').jPlayer('stop');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isFadeValid(fade) {
|
||||||
|
var regExpr = new RegExp("^\\d{2}([.]\\d{1,6})?$");
|
||||||
|
|
||||||
|
return regExpr.test(fade);
|
||||||
|
}
|
||||||
|
|
||||||
function isTimeValid(time) {
|
function isTimeValid(time) {
|
||||||
var regExpr = new RegExp("^\\d{2}[:]\\d{2}[:]\\d{2}([.]\\d{1,6})?$");
|
var regExpr = new RegExp("^\\d{2}[:]\\d{2}[:]\\d{2}([.]\\d{1,6})?$");
|
||||||
|
|
||||||
|
@ -108,7 +114,7 @@ function changeFadeIn(event) {
|
||||||
li = span.parent().parent().parent().parent();
|
li = span.parent().parent().parent().parent();
|
||||||
unqid = li.attr("unqid");
|
unqid = li.attr("unqid");
|
||||||
|
|
||||||
if(!isTimeValid(fadeIn)){
|
if(!isFadeValid(fadeIn)){
|
||||||
showError(span, "please put in a time in seconds '00 (.000000)'");
|
showError(span, "please put in a time in seconds '00 (.000000)'");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +146,7 @@ function changeFadeOut(event) {
|
||||||
li = span.parent().parent().parent().parent();
|
li = span.parent().parent().parent().parent();
|
||||||
unqid = li.attr("unqid");
|
unqid = li.attr("unqid");
|
||||||
|
|
||||||
if(!isTimeValid(fadeOut)){
|
if(!isFadeValid(fadeOut)){
|
||||||
showError(span, "please put in a time in seconds '00 (.000000)'");
|
showError(span, "please put in a time in seconds '00 (.000000)'");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -481,7 +487,7 @@ function setUpSPL() {
|
||||||
url = "/Playlist/set-playlist-fades";
|
url = "/Playlist/set-playlist-fades";
|
||||||
fadeIn = $.trim(span.text());
|
fadeIn = $.trim(span.text());
|
||||||
|
|
||||||
if(!isTimeValid(fadeIn)){
|
if(!isFadeValid(fadeIn)){
|
||||||
showError(span, "please put in a time in seconds '00 (.000000)'");
|
showError(span, "please put in a time in seconds '00 (.000000)'");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -507,7 +513,7 @@ function setUpSPL() {
|
||||||
url = "/Playlist/set-playlist-fades";
|
url = "/Playlist/set-playlist-fades";
|
||||||
fadeOut = $.trim(span.text());
|
fadeOut = $.trim(span.text());
|
||||||
|
|
||||||
if(!isTimeValid(fadeOut)){
|
if(!isFadeValid(fadeOut)){
|
||||||
showError(span, "please put in a time in seconds '00 (.000000)'");
|
showError(span, "please put in a time in seconds '00 (.000000)'");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue