--- 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);
-<?php if ($use_protocol): ?>
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: <?php echo $protocol_level; ?>,
- cookie: _cookie
+ cookie: _cookie,
+ url: document.location.href
});
-<?php endif; ?>
IriSP.libFiles.defaultDir = "<?php echo(registry_url('libdir','js'));?>";
IriSP.widgetsDir = "<?php echo(registry_url('ldtwidgets','js'));?>";
@@ -164,10 +161,14 @@
},
<?php if ($protocol_level > 1): ?>
{
- type: "MultiSegments"
+ type: "Segments",
+ annotation_type: "chap"
+ },
+ {
+ type: "Annotation",
+ annotation_type: "chap"
},
{ type: "Tweet" },
-<?php if (!$use_protocol): ?>
{
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"
- }, */
-<?php endif; ?>
<?php endif; ?>
{ type: "Mediafragment"},
-<?php if ($use_protocol): ?>
{
type: "Trace",
tracer: _tracer,
extend: {
cookie: _cookie,
- protocol_level: _protocol_level,
url: document.location.href
},
- js_console: true
+ js_console: false
}
-<?php endif; ?>
]
};
--- 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(
- '<div class="Ldt-Polemic-TweetDiv Ldt-TraceMe" trace-info="annotation-id:{{id}}, media-id={{media_id}}, polemic={{polemic}}" polemic-color="{{color}}"'
+ '<div class="Ldt-Polemic-TweetDiv Ldt-TraceMe" trace-info="annotation-id:{{id}}, media-id:{{media_id}}, polemic:{{polemic}}, time:{{time}}" polemic-color="{{color}}"'
+ ' tweet-title="{{title}}" annotation-id="{{id}}" style="width: {{width}}px; height: {{height}}px; top: {{top}}px; left: {{left}}px; background: {{color}}"></div>',
{
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() {
--- 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 @@
+ '<div class="Ldt-Segments-Tooltip"></div>';
IriSP.Widgets.Segments.prototype.annotationTemplate =
- '<div class="Ldt-Segments-Segment Ldt-TraceMe" trace-info="segment-id:{{id}}, media-id:{{media_id}}" segment-text="{{text}}"'
+ '<div class="Ldt-Segments-Segment Ldt-TraceMe" trace-info="segment-id:{{id}}, media-id:{{media_id}}, from:{{from}}, to:{{to}}" segment-text="{{text}}"'
+ 'style="top:{{top}}px; height:{{height}}px; left:{{left}}px; width:{{width}}px; background:{{medcolor}}" data-base-color="{{color}}" data-low-color="{{lowcolor}}" data-medium-color="{{medcolor}}"></div>'
@@ -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);
--- 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],