Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Daniel 2012-03-12 11:33:28 -04:00
commit c0b0e8079b
4 changed files with 22 additions and 98 deletions

View file

@ -13,7 +13,7 @@ class LibraryController extends Zend_Controller_Action
public function init()
{
$ajaxContext = $this->_helper->getHelper('AjaxContext');
$ajaxContext->addActionContext('contents', 'json')
$ajaxContext->addActionContext('contents-feed', 'json')
->addActionContext('delete', 'json')
->addActionContext('delete-group', 'json')
->addActionContext('context-menu', 'json')
@ -197,13 +197,13 @@ class LibraryController extends Zend_Controller_Action
}
}
public function contentsAction()
public function contentsFeedAction()
{
$params = $this->getRequest()->getParams();
$datatables = Application_Model_StoredFile::searchFilesForPlaylistBuilder($params);
$r = Application_Model_StoredFile::searchLibraryFiles($params);
//TODO move this to the datatables row callback.
foreach ($datatables["aaData"] as &$data) {
foreach ($r["aaData"] as &$data) {
if ($data['ftype'] == 'audioclip'){
$file = Application_Model_StoredFile::Recall($data['id']);
@ -220,8 +220,11 @@ class LibraryController extends Zend_Controller_Action
}
}
}
die(json_encode($datatables));
$this->view->sEcho = $r["sEcho"];
$this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"];
$this->view->iTotalRecords = $r["iTotalRecords"];
$this->view->files = $r["aaData"];
}
public function editFileMdAction()