documentation seems weird, trying to get content to be rerquested for playlist contents.

This commit is contained in:
naomiaro 2011-02-04 01:28:55 -05:00
parent c496546ec0
commit d60e3e5476
2 changed files with 16 additions and 15 deletions

View File

@ -149,19 +149,17 @@ class LibraryController extends Zend_Controller_Action
public function getFileMetaDataAction() public function getFileMetaDataAction()
{ {
//id = type_id $id = $this->_getParam('id');
$id = $this->_getParam('file'); $type = $this->_getParam('type');
$info = explode("_", $id); if($type == "au") {
$file = StoredFile::Recall($id);
if($info[0] == "au") { $this->view->type = $type;
$file = StoredFile::Recall($info[1]);
$this->view->type = $info[0];
$this->view->md = $file->md; $this->view->md = $file->md;
} }
else if($info[0] == "pl") { else if($type == "pl") {
$file = Playlist::Recall($info[1]); $file = Playlist::Recall($id);
$this->view->type = $info[0]; $this->view->type = $type;
$this->view->md = $file->getAllPLMetaData(); $this->view->md = $file->getAllPLMetaData();
$this->view->contents = $file->getContents(); $this->view->contents = $file->getContents();
} }

View File

@ -60,16 +60,19 @@ function addLibraryItemEvents() {
} }
function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
var id = aData[6].substring(0,2) + "_" + aData[0]; var id, type, once;
$(nRow).attr("id", id); type = aData[6].substring(0,2);
id = aData[0];
$(nRow).attr("id", type+'_'+id);
$(nRow).qtip({ $(nRow).qtip({
content: { content: {
// Set the text to an image HTML string with the correct src URL to the loading image you want to use url: '/Library/get-file-meta-data',
//text: '<img class="throbber" src="/projects/qtip/images/throbber.gif" alt="Loading..." />', type: 'post',
url: '/Library/get-file-meta-data/format/html/file/'+id, // Use the rel attribute of each element for the url to load data: ({format: "html", id : id, type: type}),
title: { title: {
text: aData[1] + ' MetaData', text: aData[1] + ' MetaData',
button: 'Close' // Show a close link in the title button: 'Close' // Show a close link in the title