# HG changeset patch # User veltr # Date 1338543296 -7200 # Node ID 4928ecd06b44e7a950c3f34c8df639c6f58b459e # Parent b9cf9835b5b9750ed87efeedf9546ee3ffa125bd Added speech balloon to annotations diff -r b9cf9835b5b9 -r 4928ecd06b44 crea/integration/img/phylactere.png Binary file crea/integration/img/phylactere.png has changed diff -r b9cf9835b5b9 -r 4928ecd06b44 crea/integration/metadataplayer/MusitagAnnotations.css --- a/crea/integration/metadataplayer/MusitagAnnotations.css Thu May 31 18:10:27 2012 +0200 +++ b/crea/integration/metadataplayer/MusitagAnnotations.css Fri Jun 01 11:34:56 2012 +0200 @@ -4,46 +4,56 @@ } .Musitag-Annotations-tag { - margin: 8px 0 0; + margin: 8px 0 0; position: relative; } -.Musitag-Annotations-tag:first-child { +.Musitag-Annotations-Balloon { + position: absolute; background: url(../img/phylactere.png); + width: 66px; height: 45px; top: 8px; left: 30px; + z-index: 25; display: none; cursor: pointer; +} + +.Musitag-Annotations-Balloon:hover { + background-position: 0 -45px; +} + +.Musitag-Annotations-tag:first-child .Musitag-container-50 { z-index: 20; } -.Musitag-Annotations-tag:nth-child(2) { +.Musitag-Annotations-tag:nth-child(2) .Musitag-container-50 { z-index: 19; } -.Musitag-Annotations-tag:nth-child(3) { +.Musitag-Annotations-tag:nth-child(3) .Musitag-container-50 { z-index: 18; } -.Musitag-Annotations-tag:nth-child(4) { +.Musitag-Annotations-tag:nth-child(4) .Musitag-container-50 { z-index: 17; } -.Musitag-Annotations-tag:nth-child(5) { +.Musitag-Annotations-tag:nth-child(5) .Musitag-container-50 { z-index: 16; } -.Musitag-Annotations-tag:nth-child(6) { +.Musitag-Annotations-tag:nth-child(6) .Musitag-container-50 { z-index: 15; } -.Musitag-Annotations-tag:nth-child(7) { +.Musitag-Annotations-tag:nth-child(7) .Musitag-container-50 { z-index: 14; } -.Musitag-Annotations-tag:nth-child(8) { +.Musitag-Annotations-tag:nth-child(8) .Musitag-container-50 { z-index: 13; } -.Musitag-Annotations-tag:nth-child(9) { +.Musitag-Annotations-tag:nth-child(9) .Musitag-container-50 { z-index: 12; } -.Musitag-Annotations-tag:nth-child(10) { +.Musitag-Annotations-tag:nth-child(10) .Musitag-container-50 { z-index: 11; } diff -r b9cf9835b5b9 -r 4928ecd06b44 crea/integration/metadataplayer/MusitagAnnotations.js --- a/crea/integration/metadataplayer/MusitagAnnotations.js Thu May 31 18:10:27 2012 +0200 +++ b/crea/integration/metadataplayer/MusitagAnnotations.js Fri Jun 01 11:34:56 2012 +0200 @@ -47,17 +47,23 @@ } _html += '
'; _html += _column.map(function(_annotation) { - return '
' - + '
' - + '
' - + '
' - + '
'; + return '
' + + '
' + + '
' + + '
' + + '
' + + '
'; }).join(''); _html += '
'; } this.$.html(_html); - this.$.find('.Musitag-Annotations-tag').click(function() { - var _el = IriSP.jQuery(this); + this.$.find('.Musitag-Annotations-tag .Musitag-container-50').click(function() { + var _el = IriSP.jQuery(this).parent(); _this.player.popcorn.currentTime(_el.attr("begin-time") / 1000); }); + this.$.find('.Musitag-Annotations-tag').mouseover(function() { + var _el = IriSP.jQuery(this); + _this.$.find('.Musitag-Annotations-Balloon').hide(); + _el.find('.Musitag-Annotations-Balloon').show(); + }); } \ No newline at end of file