diff -r 74ac0be7655c -r c20df1c080e6 src/widgets/Segments.js --- a/src/widgets/Segments.js Fri Feb 13 16:48:05 2015 +0100 +++ b/src/widgets/Segments.js Fri Feb 13 16:57:53 2015 +0100 @@ -13,7 +13,9 @@ background: "#e0e0e0", overlap: .25, found_color: "#FF00FC", - faded_found_color: "#ff80fc" + faded_found_color: "#ff80fc", + // Display creator info in segment tooltip + show_creator: true }; IriSP.Widgets.Segments.prototype.template = @@ -77,7 +79,7 @@ color : color, medcolor: medcolor, lowcolor: lowcolor, - text: (_annotation.creator ? (_annotation.creator + " : ") : "" ) + _fulltext.replace(/(\n|\r|\r\n)/mg,' ').replace(/(^.{120,140})[\s].+$/m,'$1…'), + text: ((_this.show_creator && _annotation.creator) ? (_annotation.creator + " : ") : "" ) + _fulltext.replace(/(\n|\r|\r\n)/mg,' ').replace(/(^.{120,140})[\s].+$/m,'$1…'), left : _left, width : _width, top: _top, @@ -89,14 +91,17 @@ }; var _html = Mustache.to_html(_this.annotationTemplate, _data), _el = IriSP.jQuery(_html); - _el.mouseover(function() { + _el.mouseover(function() { _annotation.trigger("select"); + _this.player.trigger('annotation-select', _annotation); }) .mouseout(function() { _annotation.trigger("unselect"); + _this.player.trigger('annotation-unselect', _annotation); }) .click(function() { _annotation.trigger("click"); + _this.player.trigger('annotation-click', _annotation); }) .appendTo(list_$); IriSP.attachDndData(_el, { @@ -172,4 +177,4 @@ this.$.find('.Ldt-Segments-Position').css({ left: _x + "px" }); -}; \ No newline at end of file +};