# HG changeset patch # User hamidouk # Date 1324055783 -3600 # Node ID c1998d5d552ec958e2d1d2e9755903c9720b4601 # Parent 1a09ab7e7163839741cc3a120a9c2b3a65e948b4 fixed a couple show-stoppers. diff -r 1a09ab7e7163 -r c1998d5d552e src/js/widgets/segmentsWidget.js --- a/src/js/widgets/segmentsWidget.js Fri Dec 16 16:23:59 2011 +0100 +++ b/src/js/widgets/segmentsWidget.js Fri Dec 16 18:16:23 2011 +0100 @@ -63,7 +63,7 @@ /* some sort of collapsing occurs, so we only have to substract one pixel to each box instead of two */ - var endPourcent = IriSP.timeToPourcent(end, duration) - startPourcent - onePxPercent * 1; + var endPourcent = IriSP.timeToPourcent(end, duration) - startPourcent - onePxPercent * 1.5; /* on the other hand, we have to substract one pixel from the first box because it's the only one to have to effective 1px margins */ @@ -72,7 +72,7 @@ endPourcent -= onePxPercent; } - var divTitle = annotation.content.title.substr(0,55); + var divTitle = (annotation.content.title + " - " + annotation.content.description).substr(0,55); if (typeof(annotation.content.color) !== "undefined") var color = annotation.content.color; @@ -80,7 +80,7 @@ var color = annotation.color; var hexa_color = IriSP.DEC_HEXA_COLOR(color); - console.log(hexa_color); + if (hexa_color === "FFCC00") hexa_color = "333"; @@ -111,7 +111,7 @@ var offset_x = offset.left + correction - 106; if (offset_x < 0) offset_x = 0; - + self.TooltipWidget.show(divTitle, color, offset_x, event.pageY - 160); } })(divTitle)).mouseout(function(){ IriSP.jQuery(this).animate({opacity: 0.3}, 5); diff -r 1a09ab7e7163 -r c1998d5d552e src/js/widgets/tooltipWidget.js --- a/src/js/widgets/tooltipWidget.js Fri Dec 16 16:23:59 2011 +0100 +++ b/src/js/widgets/tooltipWidget.js Fri Dec 16 18:16:23 2011 +0100 @@ -1,6 +1,7 @@ /* this widget displays a small tooltip */ IriSP.TooltipWidget = function(Popcorn, config, Serializer) { IriSP.Widget.call(this, Popcorn, config, Serializer); + this._shown = false; }; @@ -19,15 +20,19 @@ }; IriSP.TooltipWidget.prototype.show = function(text, color, x, y) { - if (this.selector.find(".tiptext").text() == text) + if (this._shown === true || this.selector.find(".tiptext").text() == text) return; this.selector.find(".tipcolor").css("background-color", color); this.selector.find(".tiptext").text(text); this.selector.find(".tip").css("left", x).css("top", y); + + this._shown = true; }; IriSP.TooltipWidget.prototype.hide = function() { this.clear(); this.selector.find(".tip").css("left", -10000).css("top", -100000); + + this._shown = false; }; diff -r 1a09ab7e7163 -r c1998d5d552e src/templates/overlay_marker.html --- a/src/templates/overlay_marker.html Fri Dec 16 16:23:59 2011 +0100 +++ b/src/templates/overlay_marker.html Fri Dec 16 18:16:23 2011 +0100 @@ -1,3 +1,3 @@ {{! the template for the small white bars which is z-indexed over our segment widget }} -