CC-3174 : showbuilder

fixing jplayer preview
This commit is contained in:
Naomi Aro 2012-03-27 16:27:43 +02:00
parent dfc6ae6273
commit 9c52b2ee1f
4 changed files with 19 additions and 12 deletions

View file

@ -163,11 +163,12 @@ class AudiopreviewController extends Zend_Controller_Action
}
$showInstance = new Application_Model_ShowInstance($showID);
$result = Array();
$result = array();
$position = 0;
foreach ($showInstance->getShowListContent() as $track){
$elementMap = array( 'element_title' => isset($track['track_title'])?$track['track_title']:"",
$elementMap = array(
'element_title' => isset($track['track_title']) ? $track['track_title'] : "",
'element_artist' => isset($track['artist_name']) ? $track['artist_name'] : "",
'element_position' => $position,
'element_id' => ++$position,

View file

@ -15,6 +15,7 @@ class Application_Model_ShowBuilder {
private $user;
private $opts;
private $pos;
private $contentDT;
private $epoch_now;
@ -210,6 +211,8 @@ class Application_Model_ShowBuilder {
$row["fadein"] = round(substr($p_item["fade_in"], 6), 6);
$row["fadeout"] = round(substr($p_item["fade_out"], 6), 6);
$row["pos"] = $this->pos++;
$this->contentDT = $schedEndDT;
}
//show is empty or is a special kind of show (recording etc)
@ -332,6 +335,8 @@ class Application_Model_ShowBuilder {
$display_items[] = $this->makeHeaderRow($item);
$current_id = $item["si_id"];
$this->pos = 1;
}
//make a normal data row.

View file

@ -657,7 +657,8 @@ class Application_Model_ShowInstance {
$sql = "SELECT *
FROM (cc_schedule AS s LEFT JOIN cc_files AS f ON f.id = s.file_id)
WHERE s.instance_id = '{$this->_instanceId}' ORDER BY starts";
WHERE s.instance_id = '{$this->_instanceId}' AND s.playout_status >= 0
ORDER BY starts";
Logging::log($sql);

View file

@ -299,7 +299,7 @@ var AIRTIME = (function(AIRTIME){
if (aData.image === true) {
$image.html('<img src="/css/images/icon_audioclip.png"></img>')
.click(function() {
open_show_preview(aData.instance, iDisplayIndex);
open_show_preview(aData.instance, aData.pos);
return false;
});
}