equal
deleted
inserted
replaced
1 Rkns.Ldt = {} |
1 Rkns.Ldt = {} |
2 |
2 |
3 Rkns.Ldt.ProjectBin = Rkns.Utils.inherit(Rkns._BaseBin); |
3 Rkns.Ldt.ProjectBin = Rkns.Utils.inherit(Rkns._BaseBin); |
4 |
4 |
5 Rkns.Ldt.ProjectBin.prototype.tagTemplate = Rkns._.template( |
5 Rkns.Ldt.ProjectBin.prototype.tagTemplate = Rkns._.template( |
6 '<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%>\'">' |
6 '<li class="Rk-Bin-Item" data-image="<%-static_url%>img/ldt-tag.png" data-uri="<%=ldt_platform%>ldtplatform/ldt/front/search/?search=<%=encodedtitle%>&field=all" data-title="<%-title%>" data-description="Tag \'<%-title%>\'">' |
7 + '<img class="Rk-Ldt-Tag-Icon" src="img/ldt-tag.png" /><h4><%=htitle%></h4><div class="Rk-Clear"></div></li>' |
7 + '<img class="Rk-Ldt-Tag-Icon" src="<%-static_url%>img/ldt-tag.png" /><h4><%=htitle%></h4><div class="Rk-Clear"></div></li>' |
8 ); |
8 ); |
9 |
9 |
10 Rkns.Ldt.ProjectBin.prototype.annotationTemplate = Rkns._.template( |
10 Rkns.Ldt.ProjectBin.prototype.annotationTemplate = Rkns._.template( |
11 '<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%>">' |
11 '<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%>">' |
12 + '<img class="Rk-Ldt-Annotation-Icon" src="<%=image%>"/><h4><%=htitle%></h4><p><%=hdescription%></p><p>Start: <%=start%>, End: <%=end%>, Duration: <%=duration%></p><div class="Rk-Clear"></div></li>' |
12 + '<img class="Rk-Ldt-Annotation-Icon" src="<%=image%>"/><h4><%=htitle%></h4><p><%=hdescription%></p><p>Start: <%=start%>, End: <%=end%>, Duration: <%=duration%></p><div class="Rk-Clear"></div></li>' |
61 count++; |
61 count++; |
62 _html += _this.tagTemplate({ |
62 _html += _this.tagTemplate({ |
63 ldt_platform: _this.ldt_platform, |
63 ldt_platform: _this.ldt_platform, |
64 title: _title, |
64 title: _title, |
65 htitle: highlight(_title), |
65 htitle: highlight(_title), |
66 encodedtitle : encodeURIComponent(_title) |
66 encodedtitle : encodeURIComponent(_title), |
|
67 static_url: _this.renkan.static_url |
67 }) |
68 }) |
68 }); |
69 }); |
69 _html += '<li><h3>Annotations</h3></li>'; |
70 _html += '<li><h3>Annotations</h3></li>'; |
70 Rkns._(_this.data.annotations).map(function(_annotation) { |
71 Rkns._(_this.data.annotations).map(function(_annotation) { |
71 var _description = _annotation.content.description, |
72 var _description = _annotation.content.description, |
76 count++; |
77 count++; |
77 var _duration = _annotation.end - _annotation.begin, |
78 var _duration = _annotation.end - _annotation.begin, |
78 _img = ( |
79 _img = ( |
79 (_annotation.content && _annotation.content.img && _annotation.content.img.src) |
80 (_annotation.content && _annotation.content.img && _annotation.content.img.src) |
80 ? _annotation.content.img.src |
81 ? _annotation.content.img.src |
81 : ( _duration ? "img/ldt-segment.png" : "img/ldt-point.png" ) |
82 : ( _duration ? _this.renkan.static_url+"img/ldt-segment.png" : _this.renkan.static_url+"img/ldt-point.png" ) |
82 ); |
83 ); |
83 _html += _this.annotationTemplate({ |
84 _html += _this.annotationTemplate({ |
84 ldt_platform: _this.ldt_platform, |
85 ldt_platform: _this.ldt_platform, |
85 title: _title, |
86 title: _title, |
86 htitle: highlight(_title), |
87 htitle: highlight(_title), |
89 start: convertTC(_annotation.begin), |
90 start: convertTC(_annotation.begin), |
90 end: convertTC(_annotation.end), |
91 end: convertTC(_annotation.end), |
91 duration: convertTC(_duration), |
92 duration: convertTC(_duration), |
92 mediaid: _annotation.media, |
93 mediaid: _annotation.media, |
93 annotationid: _annotation.id, |
94 annotationid: _annotation.id, |
94 image: _img |
95 image: _img, |
|
96 static_url: _this.renkan.static_url |
95 }); |
97 }); |
96 }); |
98 }); |
97 |
99 |
98 this.main_$.html(_html); |
100 this.main_$.html(_html); |
99 if (searchstr && count) { |
101 if (searchstr && count) { |