# HG changeset patch # User Raphael Velt # Date 1359394086 -3600 # Node ID e13084ff318b580a0823d26b1c807951fec878a9 # Parent 525f00c2d6acb06e9ac35ef6d7595b97f15bd45d Traces are back diff -r 525f00c2d6ac -r e13084ff318b web/polemicaltimeline.php --- a/web/polemicaltimeline.php Fri Jan 25 18:49:33 2013 +0100 +++ b/web/polemicaltimeline.php Mon Jan 28 18:28:06 2013 +0100 @@ -108,19 +108,16 @@ _cookiematches = document.cookie.match(/PHPSESSID=([A-Za-z0-9]+)/), _cookie = (_cookiematches && _cookiematches.length > 1 ? _cookiematches[1] : undefined); - var _tracer = tracemanager.init_trace("test", { - url: "http://traces.advene.org:5000/", + url: "http://trail.dev.fabelier.org/", requestmode: "GET", syncmode: "sync", default_subject: "PolemicTweet" }); _tracer.trace("Pt_LoadPage", { - url: document.location.href, - protocol_level: , - cookie: _cookie + cookie: _cookie, + url: document.location.href }); - IriSP.libFiles.defaultDir = ""; IriSP.widgetsDir = ""; @@ -164,10 +161,14 @@ }, 1): ?> { - type: "MultiSegments" + type: "Segments", + annotation_type: "chap" + }, + { + type: "Annotation", + annotation_type: "chap" }, { type: "Tweet" }, - { type: "Tagcloud", container: "TagcloudContainer", @@ -180,25 +181,17 @@ //foreign_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}", container: "AnnotationsListContainer" }, -/* { - type: "Slideshare", - container: "Slideshare" - }, */ - { type: "Mediafragment"}, - { type: "Trace", tracer: _tracer, extend: { cookie: _cookie, - protocol_level: _protocol_level, url: document.location.href }, - js_console: true + js_console: false } - ] }; diff -r 525f00c2d6ac -r e13084ff318b web/res/metadataplayer/Polemic.js --- a/web/res/metadataplayer/Polemic.js Fri Jan 25 18:49:33 2013 +0100 +++ b/web/res/metadataplayer/Polemic.js Mon Jan 28 18:28:06 2013 +0100 @@ -113,7 +113,7 @@ function displayAnnotation(_elx, _ely, _pol, _col, _annotation) { var _html = Mustache.to_html( - '
', { id: _annotation.id, @@ -124,7 +124,8 @@ color: _col, width: (_this.element_width-1), height: _this.element_height, - title: _annotation.title + title: _annotation.title, + time: _annotation.begin.toString() }); var _el = IriSP.jQuery(_html); _el.mouseover(function() { diff -r 525f00c2d6ac -r e13084ff318b web/res/metadataplayer/Segments.js --- a/web/res/metadataplayer/Segments.js Fri Jan 25 18:49:33 2013 +0100 +++ b/web/res/metadataplayer/Segments.js Mon Jan 28 18:28:06 2013 +0100 @@ -22,7 +22,7 @@ + '
'; IriSP.Widgets.Segments.prototype.annotationTemplate = - '
' @@ -83,7 +83,9 @@ top: _top, height: _this.line_height - 1, id : _annotation.id, - media_id : _annotation.getMedia().id + media_id : _annotation.getMedia().id, + from: _annotation.begin.toString(), + to: _annotation.end.toString() }; var _html = Mustache.to_html(_this.annotationTemplate, _data), _el = IriSP.jQuery(_html); diff -r 525f00c2d6ac -r e13084ff318b web/res/metadataplayer/Trace.js --- a/web/res/metadataplayer/Trace.js Fri Jan 25 18:49:33 2013 +0100 +++ b/web/res/metadataplayer/Trace.js Mon Jan 28 18:28:06 2013 +0100 @@ -29,6 +29,10 @@ "play" : 0, "pause" : 0, "timeupdate" : 10000 + }, + _annlisteners = { + search: 0, + "search-cleared": 0 }; IriSP._(_medialisteners).each(function(_ms, _listener) { var _f = function(_arg) { @@ -39,6 +43,16 @@ } _this.media.on(_listener, _f); }); + var _annotations = this.source.getAnnotations(); + IriSP._(_annlisteners).each(function(_ms, _listener) { + var _f = function(_arg) { + _this.eventHandler(_listener, _arg); + } + if (_ms) { + _f = IriSP._.throttle(_f, _ms); + } + _annotations.on(_listener, _f); + }); if (!this.tracer) { @@ -51,6 +65,8 @@ } + + this.tracer.trace("TraceWidgetInit", {}); this.mouseLocation = ''; @@ -60,8 +76,6 @@ var _widget = _target.attr("widget-type") || _target.parents(".Ldt-Widget").attr("widget-type"), _data = { "type": _e.type, - "x": _e.clientX, - "y": _e.clientY, "widget": _widget }, _targetEl = _target[0],