From f4bf8105ad6419943487d26f92e7224318fe23db Mon Sep 17 00:00:00 2001 From: naomiaro Date: Fri, 10 Sep 2010 10:39:34 -0400 Subject: [PATCH] CC-1667 Did some more formatting for tool-tips. --- .../htmlUI/var/templates/scratchpad/main.tpl | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/modules/htmlUI/var/templates/scratchpad/main.tpl b/src/modules/htmlUI/var/templates/scratchpad/main.tpl index 465fde661..164e38f85 100644 --- a/src/modules/htmlUI/var/templates/scratchpad/main.tpl +++ b/src/modules/htmlUI/var/templates/scratchpad/main.tpl @@ -68,14 +68,32 @@ {literal} tool_tip_content.append("Title: "+title+""); - tool_tip_content.append("Creator: "+creator+""); - + + if(type === "audioclip") + tool_tip_content.append("Artist: "+creator+""); + + if(type === "playlist") + tool_tip_content.append("Creator: "+creator+""); + if(type === "audioclip") { + bitRate = bitRate.substr(0, 3); + tool_tip_content.append("Album: "+source+""); - tool_tip_content.append("Bit Rate: "+bitRate+""); - tool_tip_content.append("Sample Rate: "+sampleRate+""); + tool_tip_content.append("Bit Rate: "+bitRate+" kbps"); + tool_tip_content.append("Sample Rate: "+sampleRate+" Hz"); } + duration = duration.split("."); + duration = duration[0].split(":"); + + if(parseInt(duration[0] !== 0)) { + duration = duration[0] +":"+duration[1]+":"+duration[2]; + } + else{ + duration = duration[1]+":"+duration[2]; + } + + tool_tip_content.append("Duration: "+duration+""); if(type === "playlist") {