CC-4144: Playlist Builder: Adding smart playlist into regular playlist will reset the Fade in/out settings to default value
- fixed
This commit is contained in:
parent
d959e4ff11
commit
ae5b6e58d7
|
@ -195,15 +195,16 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||||
$user = new Application_Model_User($userInfo->id);
|
$user = new Application_Model_User($userInfo->id);
|
||||||
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||||
|
$this->view->obj = $obj;
|
||||||
|
|
||||||
if($isAdminOrPM || $obj->getCreatorId() == $userInfo->id){
|
if($isAdminOrPM || $obj->getCreatorId() == $userInfo->id){
|
||||||
$this->view->obj = $obj;
|
|
||||||
if($this->obj_sess->type == "block"){
|
if($this->obj_sess->type == "block"){
|
||||||
$form = new Application_Form_SmartBlockCriteria();
|
$form = new Application_Form_SmartBlockCriteria();
|
||||||
$form->startForm($this->obj_sess->id);
|
$form->startForm($this->obj_sess->id);
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$formatter = new LengthFormatter($obj->getLength());
|
$formatter = new LengthFormatter($obj->getLength());
|
||||||
$this->view->length = $formatter->format();
|
$this->view->length = $formatter->format();
|
||||||
$this->view->type = $this->obj_sess->type;
|
$this->view->type = $this->obj_sess->type;
|
||||||
|
|
|
@ -559,8 +559,9 @@ EOT;
|
||||||
->filterByDbPosition($pos)
|
->filterByDbPosition($pos)
|
||||||
->findOne();
|
->findOne();
|
||||||
|
|
||||||
|
if (!$row) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
#Propel returns values in form 00.000000 format which is for only seconds.
|
#Propel returns values in form 00.000000 format which is for only seconds.
|
||||||
$fadeIn = $row->getDbFadein();
|
$fadeIn = $row->getDbFadein();
|
||||||
$fadeOut = $row->getDbFadeout();
|
$fadeOut = $row->getDbFadeout();
|
||||||
|
|
|
@ -379,7 +379,6 @@ var AIRTIME = (function(AIRTIME){
|
||||||
var isStatic = data.isStatic;
|
var isStatic = data.isStatic;
|
||||||
delete data.type;
|
delete data.type;
|
||||||
if (isStatic) {
|
if (isStatic) {
|
||||||
console.log(data);
|
|
||||||
$.each(data, function(index, ele){
|
$.each(data, function(index, ele){
|
||||||
if (ele.track_title !== undefined) {
|
if (ele.track_title !== undefined) {
|
||||||
$html += "<div>"+ele.track_title+" "+ele.creator+" "+ele.length+"</div>";
|
$html += "<div>"+ele.track_title+" "+ele.creator+" "+ele.length+"</div>";
|
||||||
|
@ -452,14 +451,26 @@ var AIRTIME = (function(AIRTIME){
|
||||||
playlistError(json);
|
playlistError(json);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$pl.find("span.spl_main_fade_in")
|
var fadeIn = $pl.find("span.spl_main_fade_in");
|
||||||
.empty()
|
var fadeOut = $pl.find("span.spl_main_fade_out");
|
||||||
.append(json.fadeIn);
|
console.log(json);
|
||||||
|
if (json.fadeIn == null) {
|
||||||
$pl.find("span.spl_main_fade_out")
|
console.log("fadein is null");
|
||||||
.empty()
|
fadeIn.parent().prev().hide();
|
||||||
.append(json.fadeOut);
|
fadeIn.hide();
|
||||||
|
} else {
|
||||||
|
fadeIn.parent().prev().show();
|
||||||
|
fadeIn.show();
|
||||||
|
fadeIn.empty().append(json.fadeIn);
|
||||||
|
}
|
||||||
|
if (json.fadeOut == null) {
|
||||||
|
fadeOut.parent().prev().hide();
|
||||||
|
fadeOut.hide();
|
||||||
|
} else {
|
||||||
|
fadeOut.parent().prev().show();
|
||||||
|
fadeOut.show();
|
||||||
|
fadeOut.empty().append(json.fadeOut);
|
||||||
|
}
|
||||||
$pl.find("#crossfade_main").show();
|
$pl.find("#crossfade_main").show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue