diff -r b6b48e73d440 -r eb7e39c732c6 web/res/metadataplayer/Segments.js --- a/web/res/metadataplayer/Segments.js Tue Jul 24 18:01:16 2012 +0200 +++ b/web/res/metadataplayer/Segments.js Wed Jul 25 18:03:07 2012 +0200 @@ -14,7 +14,7 @@ IriSP.Widgets.Segments.prototype.template = '
{{#segments}}' - + '
' + '{{/segments}}
' + '
' @@ -41,13 +41,14 @@ _center = _left + _width / 2, _fulltext = _annotation.title + ( _annotation.description ? ( '
' + _annotation.description ) : '' ); return { - text : _fulltext.replace(/(^.{120,140})[\s].+$/,'$1…'), + text : _fulltext.replace(/(\n|\r|\r\n)/mg,' ').replace(/(^.{120,140})[\s].+$/m,'$1…'), color : ( typeof _annotation.color !== "undefined" && _annotation.color ? _annotation.color : _this.colors[_k % _this.colors.length] ), beginseconds : _annotation.begin.getSeconds() , left : Math.floor( _left ), width : Math.floor( _width ), center : Math.floor( _center ), - id : _annotation.id + id : _annotation.id, + media_id : _annotation.getMedia().id } }) }));