From 124db61fda1ab205e86ae95ffb2f3c28918901cb Mon Sep 17 00:00:00 2001 From: sanj Date: Sat, 6 Nov 2010 06:06:13 +0530 Subject: [PATCH] lots of css --- jquery.tooltip.css | 18 ++++++++ padma.links.js | 1 + taha.html | 5 +- test.html | 111 +++++++-------------------------------------- test.js | 16 ++++++- 5 files changed, 55 insertions(+), 96 deletions(-) create mode 100644 jquery.tooltip.css diff --git a/jquery.tooltip.css b/jquery.tooltip.css new file mode 100644 index 0000000..c177da0 --- /dev/null +++ b/jquery.tooltip.css @@ -0,0 +1,18 @@ +#tooltip { + position: absolute; + z-index: 3000; + border: 1px solid #111; + background-color: rgb(187,187,87); + background-color: rgba(187,187,87,0.7); + padding: 5px; + opacity: 1; + border-radius: 10px; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + text-align: center; + -moz-box-shadow: 0px 0px 1em; + -webkit-box-shadow: 0px 0px 1em; + box-shadow: 0px 0px 1em; +} + +#tooltip h4, #tooltip div { margin: 0; } diff --git a/padma.links.js b/padma.links.js index e548c3d..918f9a1 100644 --- a/padma.links.js +++ b/padma.links.js @@ -8,6 +8,7 @@ $(this).attr("target", "_blank"); var link = $(this).attr("href"); if (link.indexOf(PADMA_URL) != -1) { + $(that).addClass('padmaLink'); var linkData = parsePadmaUrl(link, PADMA_URL); if (linkData) { // console.log(linkData); diff --git a/taha.html b/taha.html index 14d643e..5d83867 100644 --- a/taha.html +++ b/taha.html @@ -66,7 +66,7 @@ @@ -97,7 +15,7 @@
- +

+ Lorem Ipsum +

@@ -278,6 +200,7 @@

An event can appear as a link between what was and what will be. Certain events may have occurred by our perceived sense of past but they all have a potential to signify our future. A big event could have a big impact on our collective future. The bomb blast which ripped off the city centre on 15/06 at Manchester in England was a big event. A new city centre with comprehensive CCTV observation system might be imagined as a significant result of that event. Similarly, a terrorist attack on Bombay on 26/11 in India was a big event. The scheme for a roll out of, till then bureaucratically and politically stalled, National Identity Card program in India was a consequence of that event. Specific reasons might have triggered these events yet responses to these events are designed to cover every body on a generalized spatial and social scale. The grammar of policy responses to these big events are often punctuated with a language of risk.

+

11. diff --git a/test.js b/test.js index b75c865..da36f84 100644 --- a/test.js +++ b/test.js @@ -15,7 +15,8 @@ function setupPadmaLink(video, data) { video.currentLayers = []; switch (linkData.type) { case "tcRange": - var mid_frame_npt = ms2npt((npt2ms(linkData.tcIn) + npt2ms(linkData.tcOut)) / 2); + var mid_frame_npt = ms2npt(parseInt((npt2ms(linkData.tcIn) + npt2ms(linkData.tcOut)) / 2)); + console.log(mid_frame_npt); var thumbUrl = video.getFrame(mid_frame_npt); default: var frame_npt = ms2npt(video.video.poster_frame); @@ -75,6 +76,19 @@ function setupPadmaLink(video, data) { } var html = tmpl("tmpl_sidebar", {'video': video, 'linkData': linkData}); $('#padmaSidebarWrapper').html(html); + + //FIXME: should be a better way to deal with displaying default layer. + var currentLayers = video.getLayersAtTimecode(npt2ms(linkData.tcIn)); + + var transcripts = filterLayersByTracks(currentLayers, ['transcript']); +// console.log(transcripts); + if (transcripts.length > 0) { + var annotHtml = transcripts[0].value_html; + } else { + var annotHtml = ''; + } + $('.annotationText').html(annotHtml); + var closeBtn = $('
') .addClass("close") .click(function() {