From 4be1607f06e5fb24c0d7fc9ea5b7274f6df87b39 Mon Sep 17 00:00:00 2001 From: Sanj Date: Sat, 12 Mar 2011 17:02:24 +0530 Subject: [PATCH] fixed annot height --- padmaTexts/static/css/text.css | 11 +++++++---- padmaTexts/static/js/views/sidebar.js | 8 ++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/padmaTexts/static/css/text.css b/padmaTexts/static/css/text.css index 907cdae..ec130a6 100644 --- a/padmaTexts/static/css/text.css +++ b/padmaTexts/static/css/text.css @@ -127,14 +127,13 @@ p { margin-top: 8px; margin-bottom: 8px; font-size: 13px; - height: 250px; + height: 300px; overflow-y: auto; width: 90%; margin-left: auto; margin-right: auto; /* padding: 8px; margin-right: 2px; */ - overflow-y: auto; } .padmaContributor { @@ -182,10 +181,14 @@ p { cursor: pointer; } +.padmaTrack { + color: #fff; + font-style: italic; +} + .padmaButtons { width: 216px; - margin-left: auto; - margin-right: auto; + margin-left: 4px; } .padmaButtons a { diff --git a/padmaTexts/static/js/views/sidebar.js b/padmaTexts/static/js/views/sidebar.js index 325eb63..1cbb37d 100644 --- a/padmaTexts/static/js/views/sidebar.js +++ b/padmaTexts/static/js/views/sidebar.js @@ -95,14 +95,18 @@ function setupPadmaLink(videoObj, data) { //FIXME: should be a better way to deal with displaying default layer. var currentLayers = videoObj.getLayersAtTimecode(npt2ms(linkData.tcIn)); - +// var annotHtml = getLayersHtml(npt2ms(linkData.tcIn), ['transcript']); var transcripts = filterLayersByTracks(currentLayers, ['transcript']); + if (transcripts.length > 0) { var annotHtml = transcripts[0].value_html; } else { var annotHtml = ''; } + $('.annotationText').html(annotHtml); + var annotHeight = $(window).height() - 320; + $('.annotationText').css({'height': annotHeight + "px"}); var videoElem = $('video'); videoElem.bind("play", function() { var that = this @@ -173,7 +177,7 @@ function setupPadmaLink(videoObj, data) { annotHtml += thisTrack + "s
"; } for (var i=0; i < thisTrackLayers.length; i++) { - var thisTrack = thisTrackLayers[i]; + var thisTrack = '' + thisTrackLayers[i] + ':'; var thisHtml = ''; thisHtml += " " + thisTrack.value_html + ""; thisHtml += "
";