Merge branch 'master' of dev.sourcefabric.org:campcaster

This commit is contained in:
mkonecny 2011-02-04 18:22:51 -05:00
commit 27293c6b8f
12 changed files with 153 additions and 44 deletions

View file

@ -16,6 +16,7 @@ class LibraryController extends Zend_Controller_Action
$ajaxContext->addActionContext('contents', 'json')
->addActionContext('delete', 'json')
->addActionContext('context-menu', 'json')
->addActionContext('get-file-meta-data', 'html')
->initContext();
$this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME);
@ -24,9 +25,10 @@ class LibraryController extends Zend_Controller_Action
public function indexAction()
{
$this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript');
$this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript');
$this->view->headScript()->appendFile('/js/jplayer/jquery.jplayer.min.js');
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.js','text/javascript');
$this->view->headScript()->appendFile('/js/qtip/jquery.qtip-1.0.0.min.js','text/javascript');
$this->view->headScript()->appendFile('/js/airtime/library/library.js','text/javascript');
$this->view->headLink()->appendStylesheet('/css/media_library.css');
@ -90,7 +92,7 @@ class LibraryController extends Zend_Controller_Action
public function deleteAction()
{
$id = $this->_getParam('id');
if (!is_null($id)) {
$file = StoredFile::Recall($id);
@ -116,7 +118,7 @@ class LibraryController extends Zend_Controller_Action
public function contentsAction()
{
$post = $this->getRequest()->getPost();
$post = $this->getRequest()->getPost();
$datatables = StoredFile::searchFilesForPlaylistBuilder($post);
die(json_encode($datatables));
@ -144,6 +146,27 @@ class LibraryController extends Zend_Controller_Action
$this->view->form = $form;
}
public function getFileMetaDataAction()
{
$id = $this->_getParam('id');
$type = $this->_getParam('type');
if($type == "au") {
$file = StoredFile::Recall($id);
$this->view->type = $type;
$this->view->md = $file->md;
}
else if($type == "pl") {
$file = Playlist::Recall($id);
$this->view->type = $type;
$this->view->md = $file->getAllPLMetaData();
$this->view->contents = $file->getContents();
}
}
}
@ -162,3 +185,5 @@ class LibraryController extends Zend_Controller_Action