CC-3174 : show builder

can add playlists to the time line
upgraded datatables to 1.9
upgraded qtip2 to a newer version
put qtips on type column on lib table.
This commit is contained in:
Naomi Aro 2012-02-02 23:15:39 +01:00
parent 60ac01dd41
commit 6da4397a96
245 changed files with 14530 additions and 30519 deletions

View file

@ -55,7 +55,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$view->headLink()->appendStylesheet($baseUrl.'/css/redmond/jquery-ui-1.8.8.custom.css');
$view->headLink()->appendStylesheet($baseUrl.'/css/pro_dropdown_3.css');
$view->headLink()->appendStylesheet($baseUrl.'/css/qtip/jquery.qtip.min.css');
$view->headLink()->appendStylesheet($baseUrl.'/css/qtip/jquery.qtip.css');
$view->headLink()->appendStylesheet($baseUrl.'/css/styles.css');
}
@ -64,10 +64,10 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$view = $this->getResource('view');
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-1.5.2.min.js','text/javascript');
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-1.7.1.min.js','text/javascript');
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-ui-1.8.11.custom.min.js','text/javascript');
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery.stickyPanel.js','text/javascript');
$view->headScript()->appendFile($baseUrl.'/js/qtip/jquery.qtip2.min.js','text/javascript');
$view->headScript()->appendFile($baseUrl.'/js/qtip/jquery.qtip.min.js','text/javascript');
$view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js');
$view->headScript()->appendScript("var baseUrl='$baseUrl/'");

View file

@ -268,12 +268,12 @@ class LibraryController extends Zend_Controller_Action
$id = $this->_getParam('id');
$type = $this->_getParam('type');
if($type == "au") {
if($type == "audioclip") {
$file = Application_Model_StoredFile::Recall($id);
$this->view->type = $type;
$this->view->md = $file->getMetadata();
}
else if($type == "pl") {
else if($type == "playlist") {
$file = Application_Model_Playlist::Recall($id);
$this->view->type = $type;
$this->view->md = $file->getAllPLMetaData();

View file

@ -15,6 +15,7 @@ class Application_Model_Scheduler {
public function __construct($id = null) {
$this->con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME);
}
/*
@ -28,7 +29,7 @@ class Application_Model_Scheduler {
$files = array();
if ($type === "audioclip") {
$file = CcFilesQuery::create()->findPK($id);
$file = CcFilesQuery::create()->findPK($id, $this->con);
$data = $this->fileInfo;
$data["id"] = $id;
@ -38,6 +39,23 @@ class Application_Model_Scheduler {
}
else if ($type === "playlist") {
$contents = CcPlaylistcontentsQuery::create()
->orderByDbPosition()
->filterByDbPlaylistId($id)
->find($this->con);
foreach ($contents as $plItem) {
$data = $this->fileInfo;
$data["id"] = $plItem->getDbFileId();
$data["cliplength"] = $plItem->getDbCliplength();
$data["cuein"] = $plItem->getDbCuein();
$data["cueout"] = $plItem->getDbCueout();
$data["fadein"] = $plItem->getDbFadein();
$data["fadeout"] = $plItem->getDbFadeout();
$files[] = $data;
}
}
return $files;
@ -67,7 +85,7 @@ class Application_Model_Scheduler {
Logging::log("scheduling after scheduled item: ".$id);
if ($id !== 0) {
$schedItem = CcScheduleQuery::create()->findPK($id);
$schedItem = CcScheduleQuery::create()->findPK($id, $this->con);
$instance = $schedItem->getDbInstanceId();
//user has an old copy of the time line opened.
@ -80,7 +98,7 @@ class Application_Model_Scheduler {
}
//selected empty row to add after
else {
$showInstance = CcShowInstancesQuery::create()->findPK($schedule["instance"]);
$showInstance = CcShowInstancesQuery::create()->findPK($schedule["instance"], $this->con);
$nextStartDT = $showInstance->getDbStarts(null);
$instance = intval($schedule["instance"]);
}
@ -90,7 +108,7 @@ class Application_Model_Scheduler {
->filterByDBStarts($schedItem->getDbStarts("Y-m-d H:i:s.u"), Criteria::GREATER_THAN)
->filterByDbInstanceId($instance)
->orderByDbStarts()
->find();
->find($this->con);
}
foreach($schedFiles as $file) {
@ -104,7 +122,7 @@ class Application_Model_Scheduler {
//item existed previously and is being moved.
//need to keep same id for resources if we want REST.
if (isset($file['sched_id'])) {
$sched = CcScheduleQuery::create()->findPK($file['sched_id']);
$sched = CcScheduleQuery::create()->findPK($file['sched_id'], $this->con);
}
else {
$sched = new CcSchedule();
@ -155,7 +173,6 @@ class Application_Model_Scheduler {
*/
public function scheduleAfter($scheduleItems, $mediaItems, $adjustSched = true) {
$this->con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME);
$this->con->beginTransaction();
$schedFiles = array();
@ -184,7 +201,6 @@ class Application_Model_Scheduler {
*/
public function moveItem($selectedItem, $afterItem, $adjustSched = true) {
$this->con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME);
$this->con->beginTransaction();
try {
@ -234,8 +250,6 @@ class Application_Model_Scheduler {
public function removeItems($scheduledIds, $adjustSched = true) {
$showInstances = array();
$this->con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME);
$this->con->beginTransaction();
try {
@ -275,14 +289,14 @@ class Application_Model_Scheduler {
Logging::log("removing gaps from show instance #".$showInstance);
$instance = CcShowInstancesQuery::create()->findPK($showInstance);
$instance = CcShowInstancesQuery::create()->findPK($showInstance, $this->con);
$itemStartDT = $instance->getDbStarts(null);
$schedule = CcScheduleQuery::create()
->filterByDbInstanceId($showInstance)
->filterByDbId($exclude, Criteria::NOT_IN)
->orderByDbStarts()
->find();
->find($this->con);
foreach ($schedule as $item) {

View file

@ -1,4 +1,4 @@
<?php if($this->type == "au") : ?>
<?php if($this->type == "audioclip") : ?>
<div><span>Title:</span><span><?php echo ($this->md["MDATA_KEY_TITLE"]);?></span></div>
<div><span>Artist:</span><span><?php echo ($this->md["MDATA_KEY_CREATOR"]);?></span></div>
<div><span>Album:</span><span><?php echo ($this->md["MDATA_KEY_SOURCE"]);?></span></div>
@ -19,7 +19,7 @@
<?php endif; ?>
<?php if($this->type == "pl") : ?>
<?php if($this->type == "playlist") : ?>
<div><span>Name:</span><span><?php echo ($this->md["dc:title"]);?></span></div>
<div><span>Creator:</span><span><?php echo ($this->md["dc:creator"]);?></span></div>
<div><span>Length:</span><span><?php echo ($this->md["dcterms:extent"]);?></span></div>