CC-1259 meta-data tool-tips added for scratchpad.
This commit is contained in:
parent
20eacb439c
commit
f432d587a6
File diff suppressed because one or more lines are too long
|
@ -1012,18 +1012,18 @@ table.masterpalette td{
|
|||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#plupload_error table {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#plupload_error table tr {
|
||||
|
||||
}
|
||||
|
||||
#plupload_error table td {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#plupload_error table td:first-child {
|
||||
border-right: 1px solid #000000;
|
||||
}
|
||||
|
||||
.sp_tool_tip table {
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.sp_tool_tip table td {
|
||||
border: 0;
|
||||
}
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
<script type="text/javascript" src="assets/plupload/plupload.full.min.js"></script>
|
||||
<script type="text/javascript" src="assets/plupload/jquery.plupload.queue.min.js"></script>
|
||||
<script type="text/javascript" src="assets/qtip/jquery.qtip.min.js"></script>
|
||||
|
||||
{include file="script/basics.js.tpl"}
|
||||
{include file="script/contextmenu.js.tpl"}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
{if count($SCRATCHPAD) >= 1}
|
||||
{foreach from=$SCRATCHPAD item=i}
|
||||
<!-- start item -->
|
||||
<tr class="{cycle values='blue1, blue2'}">
|
||||
<tr class="{cycle values='blue1, blue2'}" id="scratchpad_item_{$i.id}">
|
||||
<td><input type="checkbox" class="checkbox" name="{$i.id}"/></td>
|
||||
<td {include file="scratchpad/actionhandler.tpl"} style="cursor: pointer">
|
||||
{if $i.type|lower == "playlist"}
|
||||
|
@ -48,6 +48,61 @@
|
|||
</td>
|
||||
</tr>
|
||||
<!-- end item -->
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var tool_tip = $("<div class='sp_tool_tip'/>"),
|
||||
tool_tip_content = $("<table/>"),
|
||||
playlist_content = $("<table/>"),
|
||||
title = "{$i.title}",
|
||||
id = "{$i.id}",
|
||||
type = "{$i.type}",
|
||||
creator = "{$i.creator}",
|
||||
duration = "{$i.duration}",
|
||||
source = "{$i.source}",
|
||||
bitRate = "{$i.bitRate}",
|
||||
sampleRate = "{$i.sampleRate}",
|
||||
content = "{$i.content}";
|
||||
|
||||
{literal}
|
||||
|
||||
tool_tip_content.append("<tr><td>Title: </td><td>"+title+"</td></tr>");
|
||||
tool_tip_content.append("<tr><td>Creator: </td><td>"+creator+"</td></tr>");
|
||||
|
||||
if(type === "audioclip") {
|
||||
tool_tip_content.append("<tr><td>Album: </td><td>"+source+"</td></tr>");
|
||||
tool_tip_content.append("<tr><td>Bit Rate: </td><td>"+bitRate+"</td></tr>");
|
||||
tool_tip_content.append("<tr><td>Sample Rate: </td><td>"+sampleRate+"</td></tr>");
|
||||
}
|
||||
|
||||
tool_tip_content.append("<tr><td>Duration: </td><td>"+duration+"</td></tr>");
|
||||
|
||||
if(type === "playlist") {
|
||||
content = content.split("/");
|
||||
for(var i=0; i< content.length; i++){
|
||||
playlist_content.append("<tr><td>" +content[i]+ "</td></tr>");
|
||||
}
|
||||
}
|
||||
|
||||
tool_tip.append(tool_tip_content);
|
||||
tool_tip.append(playlist_content);
|
||||
|
||||
$("#scratchpad_item_"+id).qtip({
|
||||
content: tool_tip,
|
||||
style: {name: 'cream'},
|
||||
position: {
|
||||
corner: {
|
||||
target: "rightMiddle",
|
||||
tooltip: "leftMiddle"
|
||||
}
|
||||
},
|
||||
show: 'mouseover',
|
||||
hide: 'mouseout'
|
||||
})
|
||||
</script>
|
||||
|
||||
{/literal}
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr class="blue1">
|
||||
|
|
|
@ -529,13 +529,35 @@ class uiBase
|
|||
public function getMetaInfo($id)
|
||||
{
|
||||
$type = strtolower(GreenBox::getFileType($id));
|
||||
|
||||
if($type == 'playlist') {
|
||||
require_once("../../../storageServer/var/Playlist.php");
|
||||
|
||||
$playList = new Playlist(GreenBox::GunidFromId($id));
|
||||
$playListData = $playList->export();
|
||||
|
||||
for ($i = 1; $i < count($playListData); $i++) {
|
||||
|
||||
$entry = StoredFile::RecallByGunid($playListData["".$i]["gunid"]);
|
||||
$playListEntries[] = $entry->getName();
|
||||
|
||||
}
|
||||
|
||||
$_SESSION['mdata'] = $playListEntries;
|
||||
|
||||
}
|
||||
|
||||
$data = array('id' => $id,
|
||||
'gunid' => BasicStor::GunidFromId($id),
|
||||
'title' => $this->getMetadataValue($id, UI_MDATA_KEY_TITLE),
|
||||
'creator' => $this->getMetadataValue($id, UI_MDATA_KEY_CREATOR),
|
||||
'duration' => $this->getMetadataValue($id, UI_MDATA_KEY_DURATION),
|
||||
'type' => $type,
|
||||
#'isAvailable' => $type == 'playlist' ? $this->gb->playlistIsAvailable($id, $this->sessid) : NULL,
|
||||
'source' => $type == 'audioclip' ? $this->getMetadataValue($id, UI_MDATA_KEY_SOURCE) : NULL,
|
||||
'bitRate' => $type == 'audioclip' ? $this->getMetadataValue($id, UI_MDATA_KEY_BITRATE) : NULL,
|
||||
'sampleRate' => $type == 'audioclip' ? $this->getMetadataValue($id, UI_MDATA_KEY_SAMPLERATE) : NULL,
|
||||
//'isAvailable' => $type == 'playlist' ? $this->gb->playlistIsAvailable($id, $this->sessid) : NULL,
|
||||
'content' => $type == 'playlist' ? join("/", $playListEntries) : NULL,
|
||||
);
|
||||
return ($data);
|
||||
} // fn getMetaInfo
|
||||
|
|
Loading…
Reference in New Issue