--- a/client/js/ldtjson-bin.js Wed Sep 05 14:49:33 2012 +0200
+++ b/client/js/ldtjson-bin.js Thu Sep 06 17:21:11 2012 +0200
@@ -3,13 +3,13 @@
Rkns.Ldt.ProjectBin = Rkns.Utils.inherit(Rkns._BaseBin);
Rkns.Ldt.ProjectBin.prototype.tagTemplate = Rkns._.template(
- '<li class="Rk-Bin-Item" data-uri="<%=ldt_platform%>ldtplatform/ldt/front/search/?search=<%=encodedtitle%>&field=all" data-title="<%-title%>" data-description="Tag \'<%-title%>\'">'
- + '<div class="Rk-Ldt-Icon Rk-Ldt-TagIcon"></div><h4><%-title%></h4></li>'
+ '<li class="Rk-Bin-Item" data-image="img/ldt-tag.png" data-uri="<%=ldt_platform%>ldtplatform/ldt/front/search/?search=<%=encodedtitle%>&field=all" data-title="<%-title%>" data-description="Tag \'<%-title%>\'">'
+ + '<img class="Rk-Ldt-Tag-Icon" src="img/ldt-tag.png" /><h4><%-title%></h4><div class="Rk-Clear"></div></li>'
);
Rkns.Ldt.ProjectBin.prototype.annotationTemplate = Rkns._.template(
- '<li class="Rk-Bin-Item" data-uri="<%=ldt_platform%>ldtplatform/ldt/front/player/<%=mediaid%>/#id=<%=annotationid%>" data-title="<%-title%>" data-description="<%-description%>">'
- + '<div class="Rk-Ldt-Icon Rk-Ldt-<%=type%>Icon"></div><h4><%-title%></h4><p><%-description%></p><p>Start: <%=start%>, End: <%=end%>, Duration: <%=duration%></p></li>'
+ '<li class="Rk-Bin-Item" data-image="<%=image%>" data-uri="<%=ldt_platform%>ldtplatform/ldt/front/player/<%=mediaid%>/#id=<%=annotationid%>" data-title="<%-title%>" data-description="<%-description%>">'
+ + '<img class="Rk-Ldt-Annotation-Icon" src="<%=image%>"/><h4><%-title%></h4><p><%-description%></p><p>Start: <%=start%>, End: <%=end%>, Duration: <%=duration%></p><div class="Rk-Clear"></div></li>'
);
Rkns.Ldt.ProjectBin.prototype._init = function(_renkan, _opts) {
@@ -54,7 +54,12 @@
_html += Rkns._(_data.annotations).map(function(_annotation) {
var _description = _annotation.content.description,
_title = _annotation.content.title.replace(_description,""),
- _duration = _annotation.end - _annotation.begin;
+ _duration = _annotation.end - _annotation.begin,
+ _img = (
+ (_annotation.content && _annotation.content.img && _annotation.content.img.src)
+ ? _annotation.content.img.src
+ : ( _duration ? "img/ldt-segment.png" : "img/ldt-point.png" )
+ );
return _this.annotationTemplate({
ldt_platform: _this.ldt_platform,
title: _title,
@@ -64,7 +69,7 @@
duration: convertTC(_duration),
mediaid: _annotation.media,
annotationid: _annotation.id,
- type: _duration ? "Segment" : "Point"
+ image: _img
});
}).join("");