@@ -283,6 +284,9 @@
+
+
+
diff --git a/application/Bootstrap.php b/application/Bootstrap.php
index 709a7ff29..c17fdc043 100644
--- a/application/Bootstrap.php
+++ b/application/Bootstrap.php
@@ -60,8 +60,8 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$view->headScript()->appendFile('/js/libs/jquery.stickyPanel.js','text/javascript');
//scripts for now playing bar
- $this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript');
- $this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript');
+ //$this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript');
+ //$this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript');
$view->headScript()->appendFile('/js/airtime/common/common.js','text/javascript');
}
diff --git a/application/controllers/LibraryController.php b/application/controllers/LibraryController.php
index 34bbb2778..281b33385 100644
--- a/application/controllers/LibraryController.php
+++ b/application/controllers/LibraryController.php
@@ -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
+
+
diff --git a/application/models/Playlist.php b/application/models/Playlist.php
index dee382093..cfac55281 100644
--- a/application/models/Playlist.php
+++ b/application/models/Playlist.php
@@ -166,13 +166,13 @@ class Playlist {
return FALSE;
$storedPlaylist = new Playlist();
- $storedPlaylist->id = $pl->getDbId();
+ $storedPlaylist->id = $id;
$storedPlaylist->name = $pl->getDbName();
$storedPlaylist->state = $pl->getDbState();
$storedPlaylist->currentlyaccessing = $pl->getDbCurrentlyaccessing();
$storedPlaylist->editedby = $pl->getDbEditedby();
$storedPlaylist->mtime = $pl->getDbMtime();
-
+
return $storedPlaylist;
}
@@ -461,7 +461,7 @@ class Playlist {
}
$metadata = $media->getMetadata();
- $length = $metadata["length"];
+ $length = $metadata["dcterms:extent"];
if (!is_null($p_clipLength)) {
$length = $p_clipLength;
@@ -777,6 +777,25 @@ class Playlist {
}
+ public function getAllPLMetaData()
+ {
+ $categories = $this->categories;
+ $row = CcPlaylistQuery::create()->findPK($this->id);
+ $md = array();
+
+ foreach($categories as $key => $val) {
+ if($val === 'length') {
+ $md[$key] = $this->getLength();
+ continue;
+ }
+
+ $method = 'get' . $val;
+ $md[$key] = $row->$method();
+ }
+
+ return $md;
+ }
+
public function getPLMetaData($category)
{
$cat = $this->categories[$category];
diff --git a/application/models/StoredFile.php b/application/models/StoredFile.php
index 2f54c0ce0..a5c730b88 100644
--- a/application/models/StoredFile.php
+++ b/application/models/StoredFile.php
@@ -492,9 +492,9 @@ class StoredFile {
$escapedValue = pg_escape_string($this->gunid);
$sql = "SELECT * FROM ".$CC_CONFIG["filesTable"]
." WHERE gunid='$escapedValue'";
- //var_dump($sql);
+
$this->md = $CC_DBC->getRow($sql);
- //var_dump($this->md);
+
if (PEAR::isError($this->md)) {
$error = $this->md;
$this->md = null;
@@ -511,10 +511,9 @@ class StoredFile {
$compatibilityData[$xmlName] = $value;
}
}
- //var_dump($compatibilityData);
- $this->md = array_merge($this->md, $compatibilityData);
- //var_dump($this->md);
- //$_SESSION["debug"] = $this->md;
+
+ //$this->md = array_merge($this->md, $compatibilityData);
+ $this->md = $compatibilityData;
}
public function setFormat($p_value)
@@ -707,7 +706,7 @@ class StoredFile {
$sql = "SELECT *"
." FROM ".$CC_CONFIG['filesTable']
." WHERE $cond";
- //echo $sql;
+
$row = $CC_DBC->getRow($sql);
if (PEAR::isError($row) || is_null($row)) {
return $row;
diff --git a/application/views/scripts/library/contents.ajax.phtml b/application/views/scripts/library/contents.ajax.phtml
deleted file mode 100644
index 080b0a341..000000000
--- a/application/views/scripts/library/contents.ajax.phtml
+++ /dev/null
@@ -1 +0,0 @@
-partialLoop('library/libraryTablePartial.phtml', $this->files) ?>
diff --git a/application/views/scripts/library/contextMenuPartial.phtml b/application/views/scripts/library/contextMenuPartial.phtml
deleted file mode 100644
index 31b484496..000000000
--- a/application/views/scripts/library/contextMenuPartial.phtml
+++ /dev/null
@@ -1 +0,0 @@
-text ?>
diff --git a/application/views/scripts/library/get-file-meta-data.ajax.phtml b/application/views/scripts/library/get-file-meta-data.ajax.phtml
new file mode 100644
index 000000000..97aeba58a
--- /dev/null
+++ b/application/views/scripts/library/get-file-meta-data.ajax.phtml
@@ -0,0 +1,47 @@
+type == "au") : ?>
+Title:md["dc:title"]);?>
+Artist:md["dc:creator"]);?>
+Album:md["dc:source"]);?>
+Track:md["ls:track_num"]);?>
+Length:md["dcterms:extent"]);?>
+Genre:md["dc:type"]);?>
+Sample Rate:md["ls:samplerate"]);?>
+Bit Rate:md["ls:bitrate"]);?>
+Channels:md["ls:channels"]);?>
+
+Year:md["ls:year"]);?>
+Label:md["dc:publisher"]);?>
+BPM:md["ls:bpm"]);?>
+Channels:md["ls:channels"]);?>
+Orchestra:md["ls:orchestra"]);?>
+Conductor:md["ls:conductor"]);?>
+Copyright:md["dc:rights"]);?>
+Catalog Number:md["ls:catalognumber"]);?>
+Isrc Number:md["ls:isrcnumber"]);?>
+
+Report Datetime:md["dcterms:temporal"]);?>
+Report Location:md["dcterms:spatial"]);?>
+Report Organization:md["dcterms:entity"]);?>
+Subject:md["dc:subject"]);?>
+Contributor:md["dc:contributor"]);?>
+
+Language:md["dc:language"]);?>
+Comments:md["dc:description"]);?>
+
+
+type == "pl") : ?>
+Name:md["dc:title"]);?>
+Creator:md["dc:creator"]);?>
+Length:md["dcterms:extent"]);?>
+Description:md["dc:description"]);?>
+Contents:
+ contents as $row) : ?>
+
+
+
+
+
+
+
+
+
diff --git a/application/views/scripts/library/quick-search.phtml b/application/views/scripts/library/quick-search.phtml
deleted file mode 100644
index d8bbabb76..000000000
--- a/application/views/scripts/library/quick-search.phtml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/public/css/styles.css b/public/css/styles.css
index 334bbdd5c..769789a02 100644
--- a/public/css/styles.css
+++ b/public/css/styles.css
@@ -702,7 +702,7 @@ dt.block-display, dd.block-display {
.floated-panel {
margin-top:0;
width:99.99%;
- z-index:9999;
+ z-index:999;
}
diff --git a/public/js/airtime/library/library.js b/public/js/airtime/library/library.js
index 6537e8a35..e1b674158 100644
--- a/public/js/airtime/library/library.js
+++ b/public/js/airtime/library/library.js
@@ -60,9 +60,47 @@ function addLibraryItemEvents() {
}
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({
+
+ content: {
+ url: '/Library/get-file-meta-data',
+ type: 'post',
+ data: ({format: "html", id : id, type: type}),
+ title: {
+ text: aData[1] + ' MetaData',
+ button: 'Close' // Show a close link in the title
+ }
+ },
+ position: {
+ corner: {
+ //target: 'leftMiddle'
+ tooltip: 'rightMiddle'
+ },
+ adjust: {
+ screen: true // Keep the tooltip on-screen at all times
+ }
+ },
+ show: {
+ when: 'click',
+ solo: true // Only show one tooltip at a time
+ },
+ hide: 'click',
+ style: {
+ border: {
+ width: 0,
+ radius: 4
+ },
+ name: 'dark', // Use the default light style
+ width: 570 // Set the tooltip width
+ }
+ });
return nRow;
}
diff --git a/public/js/airtime/schedule/schedule.js b/public/js/airtime/schedule/schedule.js
index faa9f7b29..17054f412 100644
--- a/public/js/airtime/schedule/schedule.js
+++ b/public/js/airtime/schedule/schedule.js
@@ -45,14 +45,14 @@ function setScheduleDialogEvents(dialog) {
}
});
- dialog.find(".ui-icon-close").parent().click(function(){
+ dialog.find(".ui-icon-close").click(function(){
var groupId, url;
groupId = $(this).parent().parent().attr("id").split("_").pop();
- url = '/Schedule/remove-group/format/json';
+ url = '/Schedule/remove-group';
$.post(url,
- {groupId: groupId},
+ {format: "json", groupId: groupId},
function(json){
var dialog = $("#schedule_playlist_dialog");
@@ -83,25 +83,6 @@ function dtDrawCallback() {
}
function makeScheduleDialog(dialog, json) {
-
- dialog.find("#schedule_playlist_search").keyup(function(){
- var url, string;
-
- url = "/Schedule/find-playlists/format/html";
- string = $(this).val();
-
- $.post(url, {search: string}, function(html){
-
- $("#schedule_playlist_choice")
- .empty()
- .append(html)
- .find('li')
- .draggable({
- helper: 'clone'
- });
-
- });
- });
dialog.find('#schedule_playlists').dataTable( {
"bProcessing": true,