CC-84: Smart Playlists
- backend implementation - UI for blocks within playlist
This commit is contained in:
parent
99cfd72cc3
commit
019d13b4c9
8 changed files with 144 additions and 83 deletions
|
@ -27,6 +27,7 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
->addActionContext('smart-block-criteria-save', 'json')
|
->addActionContext('smart-block-criteria-save', 'json')
|
||||||
->addActionContext('smart-block-generate', 'json')
|
->addActionContext('smart-block-generate', 'json')
|
||||||
->addActionContext('smart-block-shuffle', 'json')
|
->addActionContext('smart-block-shuffle', 'json')
|
||||||
|
->addActionContext('get-block-info', 'json')
|
||||||
->initContext();
|
->initContext();
|
||||||
|
|
||||||
/*$this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME);
|
/*$this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME);
|
||||||
|
@ -124,9 +125,9 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
$this->view->error = $e->getMessage();
|
$this->view->error = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function playlistDynamic($obj)
|
private function blockDynamic($obj)
|
||||||
{
|
{
|
||||||
$this->view->error = "You cannot add tracks to dynamic playlist.";
|
$this->view->error = "You cannot add tracks to dynamic block.";
|
||||||
$this->createFullResponse($obj);
|
$this->createFullResponse($obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,7 +310,7 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
// if the dest is a block object
|
// if the dest is a block object
|
||||||
$obj->addAudioClips($ids, $afterItem, $addType);
|
$obj->addAudioClips($ids, $afterItem, $addType);
|
||||||
} else {
|
} else {
|
||||||
throw new PlaylistDyanmicException;
|
throw new BlockDynamicException;
|
||||||
}
|
}
|
||||||
$this->createUpdateResponse($obj);
|
$this->createUpdateResponse($obj);
|
||||||
}
|
}
|
||||||
|
@ -319,8 +320,8 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
catch (PlaylistNotFoundException $e) {
|
catch (PlaylistNotFoundException $e) {
|
||||||
$this->playlistNotFound($obj_type);
|
$this->playlistNotFound($obj_type);
|
||||||
}
|
}
|
||||||
catch (PlaylistDyanmicException $e) {
|
catch (BlockDynamicException $e) {
|
||||||
$this->playlistDynamic($obj);
|
$this->blockDynamic($obj);
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
$this->playlistUnknownError($e);
|
$this->playlistUnknownError($e);
|
||||||
|
@ -452,7 +453,7 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$obj = $this->getPlaylist($type);
|
$obj = $this->getPlaylist($type);
|
||||||
$obj->setPlaylistfades($fadeIn, $fadeOut);
|
$obj->setfades($fadeIn, $fadeOut);
|
||||||
$this->view->modified = $obj->getLastModified("U");
|
$this->view->modified = $obj->getLastModified("U");
|
||||||
} catch (PlaylistOutDatedException $e) {
|
} catch (PlaylistOutDatedException $e) {
|
||||||
$this->playlistOutdated($e);
|
$this->playlistOutdated($e);
|
||||||
|
@ -565,4 +566,18 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getBlockInfoAction(){
|
||||||
|
$request = $this->getRequest();
|
||||||
|
$params = $request->getPost();
|
||||||
|
$bl = new Application_Model_Block($params['id']);
|
||||||
|
if ($bl->isStatic()) {
|
||||||
|
$out = $bl->getContents();
|
||||||
|
$out['isStatic'] = true;
|
||||||
|
} else {
|
||||||
|
$out = Application_Model_Block::getCriteria($params['id']);
|
||||||
|
$out['isStatic'] = false;
|
||||||
|
}
|
||||||
|
die(json_encode($out));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -320,23 +320,6 @@ EOT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*private function buildStreamEntry($p_item, $pos)
|
|
||||||
{
|
|
||||||
$stream = CcWebstreamQuery::create()->findPK($p_item, $this->con);
|
|
||||||
|
|
||||||
if (isset($stream)) {
|
|
||||||
$entry = $this->plItem;
|
|
||||||
$entry["id"] = $stream->getDbId();
|
|
||||||
$entry["pos"] = $pos;
|
|
||||||
$entry["cliplength"] = $stream->getDbLength();
|
|
||||||
$entry["cueout"] = $stream->getDbLength();
|
|
||||||
|
|
||||||
return $entry;
|
|
||||||
} else {
|
|
||||||
throw new Exception("trying to add a stream that does not exist.");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @param array $p_items
|
* @param array $p_items
|
||||||
* an array of audioclips to add to the playlist
|
* an array of audioclips to add to the playlist
|
||||||
|
@ -612,7 +595,7 @@ EOT;
|
||||||
return array("fadeIn" => $fadeIn, "fadeOut" => $fadeOut);
|
return array("fadeIn" => $fadeIn, "fadeOut" => $fadeOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setPlaylistfades($fadein, $fadeout)
|
public function setfades($fadein, $fadeout)
|
||||||
{
|
{
|
||||||
if (isset($fadein)) {
|
if (isset($fadein)) {
|
||||||
Logging::log("Setting playlist fade in {$fadein}");
|
Logging::log("Setting playlist fade in {$fadein}");
|
||||||
|
@ -872,4 +855,3 @@ EOT;
|
||||||
class PlaylistNotFoundException extends Exception {}
|
class PlaylistNotFoundException extends Exception {}
|
||||||
class PlaylistNoPermissionException extends Exception {}
|
class PlaylistNoPermissionException extends Exception {}
|
||||||
class PlaylistOutDatedException extends Exception {}
|
class PlaylistOutDatedException extends Exception {}
|
||||||
class PlaylistDyanmicException extends Exception {}
|
|
||||||
|
|
|
@ -182,9 +182,13 @@ class Application_Model_Scheduler
|
||||||
$data["id"] = $file->getDbId();
|
$data["id"] = $file->getDbId();
|
||||||
$data["cliplength"] = $file->getDbLength();
|
$data["cliplength"] = $file->getDbLength();
|
||||||
$data["cuein"] = "00:00:00";
|
$data["cuein"] = "00:00:00";
|
||||||
$data["cueout"] = "00:00:00";
|
$data["cueout"] = $file->getDbLength();
|
||||||
$data["fadein"] = "00:00:00";
|
$defaultFade = Application_Model_Preference::GetDefaultFade();
|
||||||
$data["fadeout"] = "00:00:00";
|
if (isset($defaultFade)) {
|
||||||
|
//fade is in format SS.uuuuuu
|
||||||
|
$data["fadein"] = $defaultFade;
|
||||||
|
$data["fadeout"] = $defaultFade;
|
||||||
|
}
|
||||||
$data["type"] = 0;
|
$data["type"] = 0;
|
||||||
$files[] = $data;
|
$files[] = $data;
|
||||||
}
|
}
|
||||||
|
@ -192,48 +196,6 @@ class Application_Model_Scheduler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// find if the playslit is static or dynamic
|
|
||||||
/*$c = new Criteria();
|
|
||||||
$c->add(CcPlaylistPeer::ID, $id);
|
|
||||||
$pl = CcPlaylistPeer::doSelect($c);
|
|
||||||
$playlistType = $pl[0]->getDbType();
|
|
||||||
|
|
||||||
if ($playlistType == "static") {
|
|
||||||
$contents = CcPlaylistcontentsQuery::create()
|
|
||||||
->orderByDbPosition()
|
|
||||||
->filterByDbPlaylistId($id)
|
|
||||||
->find($this->con);
|
|
||||||
} else {
|
|
||||||
$pl = new Application_Model_Playlist($id);
|
|
||||||
$contents = $pl->getListOfFilesUnderLimit();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_null($contents)) {
|
|
||||||
throw new Exception("A selected Playlist does not exist!");
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/*foreach ($contents as $fileId => $plItem) {
|
|
||||||
$data = $this->fileInfo;
|
|
||||||
if ($plItem['type'] == 0){
|
|
||||||
$file = $plItem->getCcFiles($this->con);
|
|
||||||
if (isset($file) && $file->getDbFileExists()) {
|
|
||||||
$data["id"] = $plItem->getDbFileId();
|
|
||||||
$data["cliplength"] = $plItem->getDbCliplength();
|
|
||||||
$data["cuein"] = $plItem->getDbCuein();
|
|
||||||
$data["cueout"] = $plItem->getDbCueout();
|
|
||||||
$data["fadein"] = $plItem->getDbFadein();
|
|
||||||
$data["fadeout"] = $plItem->getDbFadeout();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// on dynamic playslsit, $fileId is id of files
|
|
||||||
$file = Application_Model_StoredFile::Recall($fileId)->getPropelOrm();
|
|
||||||
if (isset($file) && $file->getDbFileExists()) {
|
|
||||||
$data["id"] = $fileId;
|
|
||||||
$data["cliplength"] = $file->getDbLength();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$files[] = $data;
|
|
||||||
}*/
|
|
||||||
} else if ($type == "stream") {
|
} else if ($type == "stream") {
|
||||||
//need to return
|
//need to return
|
||||||
$stream = CcWebstreamQuery::create()->findPK($id, $this->con);
|
$stream = CcWebstreamQuery::create()->findPK($id, $this->con);
|
||||||
|
@ -256,6 +218,39 @@ class Application_Model_Scheduler
|
||||||
|
|
||||||
$files[] = $data;
|
$files[] = $data;
|
||||||
}
|
}
|
||||||
|
} else if ($type == "block") {
|
||||||
|
$bl = new Application_Model_Block($id);
|
||||||
|
if ($bl->isStatic()) {
|
||||||
|
foreach ($bl->getContents() as $track) {
|
||||||
|
$data["id"] = $track['item_id'];
|
||||||
|
$data["cliplength"] = $track['length'];
|
||||||
|
$data["cuein"] = $track['cuein'];
|
||||||
|
$data["cueout"] = $track['cueout'];
|
||||||
|
$data["fadein"] = $track['fadein'];
|
||||||
|
$data["fadeout"] = $track['fadeout'];
|
||||||
|
$data["type"] = 0;
|
||||||
|
$files[] = $data;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$dynamicFiles = $bl->getListOfFilesUnderLimit();
|
||||||
|
foreach ($dynamicFiles as $fileId=>$f) {
|
||||||
|
$file = CcFilesQuery::create()->findPk($fileId);
|
||||||
|
if (isset($file) && $file->getDbFileExists()) {
|
||||||
|
$data["id"] = $file->getDbId();
|
||||||
|
$data["cliplength"] = $file->getDbLength();
|
||||||
|
$data["cuein"] = "00:00:00";
|
||||||
|
$data["cueout"] = $file->getDbLength();
|
||||||
|
$defaultFade = Application_Model_Preference::GetDefaultFade();
|
||||||
|
if (isset($defaultFade)) {
|
||||||
|
//fade is in format SS.uuuuuu
|
||||||
|
$data["fadein"] = $defaultFade;
|
||||||
|
$data["fadeout"] = $defaultFade;
|
||||||
|
}
|
||||||
|
$data["type"] = 0;
|
||||||
|
$files[] = $data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $files;
|
return $files;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
<dl id="spl_editor" class="inline-list">
|
<dl id="spl_editor" class="inline-list">
|
||||||
|
<?php if ($this->item1Type == 0) {?>
|
||||||
<dt>Fade out (s):</dt>
|
<dt>Fade out (s):</dt>
|
||||||
<dd id="spl_fade_out_<?php echo $this->item1; ?>" class="spl_fade_out">
|
<dd id="spl_fade_out_<?php echo $this->item1; ?>" class="spl_fade_out">
|
||||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeOut; ?></span>
|
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeOut; ?></span>
|
||||||
</dd>
|
</dd>
|
||||||
<dd class="edit-error"></dd>
|
<dd class="edit-error"></dd>
|
||||||
|
<?php }
|
||||||
|
if ($this->item2Type == 0) {?>
|
||||||
<dt>Fade in (s):</dt>
|
<dt>Fade in (s):</dt>
|
||||||
<dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in">
|
<dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in">
|
||||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeIn; ?></span>
|
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeIn; ?></span>
|
||||||
</dd>
|
</dd>
|
||||||
<dd class="edit-error"></dd>
|
<dd class="edit-error"></dd>
|
||||||
|
<?php }?>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
|
@ -2,23 +2,40 @@
|
||||||
$items = $this->obj->getContents();
|
$items = $this->obj->getContents();
|
||||||
if (count($items)) : ?>
|
if (count($items)) : ?>
|
||||||
<?php $i = 0; ?>
|
<?php $i = 0; ?>
|
||||||
<?php foreach($items as $item) : ?>
|
<?php foreach($items as $item) :
|
||||||
|
$staticBlock = null;
|
||||||
|
if ($item['type'] == 2) {
|
||||||
|
$bl= new Application_Model_Block($item['item_id']);
|
||||||
|
$staticBlock = $bl->isStatic();
|
||||||
|
}
|
||||||
|
?>
|
||||||
<li class="ui-state-default" id="spl_<?php echo $item["id"] ?>" unqid="<?php echo $item["id"]; ?>">
|
<li class="ui-state-default" id="spl_<?php echo $item["id"] ?>" unqid="<?php echo $item["id"]; ?>">
|
||||||
<div class="list-item-container">
|
<div class="list-item-container">
|
||||||
|
|
||||||
<?php if ($item['exists']):?>
|
<?php if ($item['type'] == 0 && $item['exists']):?>
|
||||||
<div class="big_play" audioFile="<?php echo $item["id"]; ?>">
|
<div class="big_play" audioFile="<?php echo $item["id"]; ?>">
|
||||||
<span class="ui-icon ui-icon-play"></span>
|
<span class="ui-icon ui-icon-play"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<?php elseif ($item['type'] == 2 && $item['exists']): ?>
|
||||||
|
<div class="big_play ui-state-hover">
|
||||||
|
<span class="ui-icon ui-icon-alert"></span>
|
||||||
|
</div>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="big_play ui-state-hover">
|
<div class="big_play ui-state-hover">
|
||||||
<span class="ui-icon ui-icon-alert"></span>
|
<span class="ui-icon ui-icon-alert"></span>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="text-row top">
|
<div class="text-row top">
|
||||||
<span class="spl_playlength"><?php echo $item["length"] ?></span>
|
<span class="spl_playlength"><?php echo $item["length"] ?></span>
|
||||||
|
<?php if ($item['type'] == 0) {?>
|
||||||
<span class="spl_cue ui-state-default"></span>
|
<span class="spl_cue ui-state-default"></span>
|
||||||
|
<?php } else if ($item['type'] == 2) {
|
||||||
|
if ($staticBlock) {?>
|
||||||
|
<span class="spl_block_expand close" id="expand_block_<?php echo $item['item_id']?>">Static Block Expand</span>
|
||||||
|
<?php } else { ?>
|
||||||
|
<span class="spl_block_expand close" id="expand_block_<?php echo $item['item_id']?>">Dynamic Block</span>
|
||||||
|
<?php }
|
||||||
|
} ?>
|
||||||
<span class="spl_title"><?php echo $item['track_title'] ?></span>
|
<span class="spl_title"><?php echo $item['track_title'] ?></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
|
@ -32,7 +49,7 @@ if (count($items)) : ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<span id="remove_<?php echo $item["id"] ?>" class="ui-icon ui-icon-closethick"></span>
|
<span id="remove_<?php echo $item["id"] ?>" class="ui-icon ui-icon-closethick"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<?php if ($item['type'] == 0) {?>
|
||||||
<div id="cues_<?php echo $i ?>" class="cue-edit clearfix" style="display: none">
|
<div id="cues_<?php echo $i ?>" class="cue-edit clearfix" style="display: none">
|
||||||
<?php echo $this->partial('playlist/set-cue.phtml', array(
|
<?php echo $this->partial('playlist/set-cue.phtml', array(
|
||||||
'id' => $item["id"],
|
'id' => $item["id"],
|
||||||
|
@ -40,6 +57,7 @@ if (count($items)) : ?>
|
||||||
'cueOut' => $item['cueout'],
|
'cueOut' => $item['cueout'],
|
||||||
'origLength' => $item['length'])); ?>
|
'origLength' => $item['length'])); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php }?>
|
||||||
|
|
||||||
|
|
||||||
<?php //create a fade editor box
|
<?php //create a fade editor box
|
||||||
|
@ -50,11 +68,15 @@ if (count($items)) : ?>
|
||||||
<?php echo $this->partial('playlist/set-fade.phtml', array(
|
<?php echo $this->partial('playlist/set-fade.phtml', array(
|
||||||
'item1' => $items[$i]['id'],
|
'item1' => $items[$i]['id'],
|
||||||
'item2' => $items[$i+1]['id'],
|
'item2' => $items[$i+1]['id'],
|
||||||
|
'item1Type' => $items[$i]['type'],
|
||||||
|
'item2Type' => $items[$i+1]['type'],
|
||||||
'fadeOut' => $items[$i]['fadeout'],
|
'fadeOut' => $items[$i]['fadeout'],
|
||||||
'fadeIn' => $items[$i+1]['fadein'])); ?>
|
'fadeIn' => $items[$i+1]['fadein'])); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<?php if ($item['type'] == 2) {?>
|
||||||
|
<div id="block_<?php echo $item['item_id']?>_info"></div>
|
||||||
|
<?php } ?>
|
||||||
</li>
|
</li>
|
||||||
<?php $i = $i+1; ?>
|
<?php $i = $i+1; ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
|
@ -79,6 +79,16 @@
|
||||||
text-align:right;
|
text-align:right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.spl_block_expand {
|
||||||
|
float:right;
|
||||||
|
font-size: 9px;
|
||||||
|
height: 15px;
|
||||||
|
right: 35px;
|
||||||
|
width: 100px;
|
||||||
|
margin-top:2px;
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.spl_artist {
|
.spl_artist {
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
color:#d5d5d5;
|
color:#d5d5d5;
|
||||||
|
|
|
@ -88,8 +88,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
mod.dblClickAdd = function(id, type) {
|
mod.dblClickAdd = function(data, type) {
|
||||||
|
|
||||||
var i,
|
var i,
|
||||||
length,
|
length,
|
||||||
temp,
|
temp,
|
||||||
|
@ -98,7 +97,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
aData = [];
|
aData = [];
|
||||||
|
|
||||||
//process selected files/playlists.
|
//process selected files/playlists.
|
||||||
aMediaIds.push({"id": id, "type": type});
|
aMediaIds.push({"id": data.id, "type": type});
|
||||||
|
|
||||||
$("#show_builder_table tr.cursor-selected-row").each(function(i, el){
|
$("#show_builder_table tr.cursor-selected-row").each(function(i, el){
|
||||||
aData.push($(el).prev().data("aData"));
|
aData.push($(el).prev().data("aData"));
|
||||||
|
@ -114,6 +113,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
alert("Please select a cursor position on timeline.");
|
alert("Please select a cursor position on timeline.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
console.log(aMediaIds);
|
||||||
AIRTIME.showbuilder.fnAdd(aMediaIds, aSchedIds);
|
AIRTIME.showbuilder.fnAdd(aMediaIds, aSchedIds);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -352,6 +352,40 @@ var AIRTIME = (function(AIRTIME){
|
||||||
//add the play function to the play icon
|
//add the play function to the play icon
|
||||||
$pl.delegate(".big_play",
|
$pl.delegate(".big_play",
|
||||||
{"click": openAudioPreview});
|
{"click": openAudioPreview});
|
||||||
|
|
||||||
|
$pl.delegate(".spl_block_expand",
|
||||||
|
{"click": function(ev){
|
||||||
|
var id = parseInt($(this).attr("id").split("_").pop(), 10);
|
||||||
|
if ($(this).hasClass('close')) {
|
||||||
|
var sUrl = "/playlist/get-block-info";
|
||||||
|
mod.disableUI();
|
||||||
|
$.post(sUrl, {format:"json", id:id}, function(json){
|
||||||
|
$html = "";
|
||||||
|
var data = $.parseJSON(json);
|
||||||
|
var isStatic = data.isStatic;
|
||||||
|
delete data.type;
|
||||||
|
if (isStatic) {
|
||||||
|
$.each(data, function(index, ele){
|
||||||
|
$html += "<div>"+ele.track_title+" "+ele.creator+" "+ele.length+"</div>";
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
for (var key in data.crit){
|
||||||
|
$.each(data.crit[key], function(index, ele){
|
||||||
|
var extra = (ele['extra']==null)?"":ele['extra'];
|
||||||
|
$html += "<div>"+ele['display_name']+" "+ele['modifier']+" "+ele['value']+" "+extra+"</div>";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$html += "<div>"+data.limit.value+" "+data.limit.modifier;
|
||||||
|
}
|
||||||
|
$pl.find("#block_"+id+"_info").html($html);
|
||||||
|
mod.enableUI();
|
||||||
|
});
|
||||||
|
$(this).removeClass('close');
|
||||||
|
} else {
|
||||||
|
$pl.find("#block_"+id+"_info").html("");
|
||||||
|
$(this).addClass('close');
|
||||||
|
}
|
||||||
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
//sets events dynamically for the cue editor.
|
//sets events dynamically for the cue editor.
|
||||||
|
@ -384,7 +418,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
//main playlist fades events
|
//main playlist fades events
|
||||||
$pl.on("click", "#spl_crossfade", function() {
|
$pl.on("click", "#spl_crossfade", function() {
|
||||||
var lastMod = getModified(),
|
var lastMod = getModified(),
|
||||||
type = $('#obj_type');
|
type = $('#obj_type').val();
|
||||||
|
|
||||||
if ($(this).hasClass("ui-state-active")) {
|
if ($(this).hasClass("ui-state-active")) {
|
||||||
$(this).removeClass("ui-state-active");
|
$(this).removeClass("ui-state-active");
|
||||||
|
@ -394,8 +428,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
$(this).addClass("ui-state-active");
|
$(this).addClass("ui-state-active");
|
||||||
|
|
||||||
var url = '/Playlist/get-playlist-fades';
|
var url = '/Playlist/get-playlist-fades';
|
||||||
|
$.post(url,
|
||||||
$.get(url,
|
|
||||||
{format: "json", modified: lastMod, type: type},
|
{format: "json", modified: lastMod, type: type},
|
||||||
function(json){
|
function(json){
|
||||||
if (json.error !== undefined){
|
if (json.error !== undefined){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue