client/js/ldtjson-bin.js
changeset 422 6447f10b7d2c
parent 293 fba23fde14ba
child 433 e457ec945e50
equal deleted inserted replaced
421:6cf2ef158f9b 422:6447f10b7d2c
    15     console.error("No such LDT Bin Type");
    15     console.error("No such LDT Bin Type");
    16 };
    16 };
    17 
    17 
    18 var ProjectBin = Ldt.ProjectBin = Rkns.Utils.inherit(Rkns._BaseBin);
    18 var ProjectBin = Ldt.ProjectBin = Rkns.Utils.inherit(Rkns._BaseBin);
    19 
    19 
    20 ProjectBin.prototype.tagTemplate = _.template(
    20 ProjectBin.prototype.tagTemplate = renkanJST['templates/ldtjson-bin/tagtemplate.html'];
    21     '<li class="Rk-Bin-Item" draggable="true" data-image="<%- Rkns.Utils.getFullURL(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%>\'">' +
    21 
    22     '<img class="Rk-Ldt-Tag-Icon" src="<%-static_url%>img/ldt-tag.png" /><h4><%=htitle%></h4><div class="Rk-Clear"></div></li>'
    22 ProjectBin.prototype.annotationTemplate = renkanJST['templates/ldtjson-bin/annotationtemplate.html'];
    23 );
       
    24 
       
    25 ProjectBin.prototype.annotationTemplate = _.template(
       
    26     '<li class="Rk-Bin-Item" draggable="true" data-image="<%- Rkns.Utils.getFullURL(image) %>" data-uri="<%=ldt_platform%>ldtplatform/ldt/front/player/<%=mediaid%>/#id=<%=annotationid%>" data-title="<%-title%>" data-description="<%-description%>">' +
       
    27     '<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>'
       
    28 );
       
    29 
    23 
    30 ProjectBin.prototype._init = function(_renkan, _opts) {
    24 ProjectBin.prototype._init = function(_renkan, _opts) {
    31     this.renkan = _renkan;
    25     this.renkan = _renkan;
    32     this.proj_id = _opts.project_id;
    26     this.proj_id = _opts.project_id;
    33     this.ldt_platform = _opts.ldt_platform || "http://ldt.iri.centrepompidou.fr/";
    27     this.ldt_platform = _opts.ldt_platform || "http://ldt.iri.centrepompidou.fr/";
   158     );
   152     );
   159 };
   153 };
   160 
   154 
   161 var ResultsBin = Ldt.ResultsBin = Rkns.Utils.inherit(Rkns._BaseBin);
   155 var ResultsBin = Ldt.ResultsBin = Rkns.Utils.inherit(Rkns._BaseBin);
   162 
   156 
   163 ResultsBin.prototype.segmentTemplate = _.template(
   157 ResultsBin.prototype.segmentTemplate = renkanJST['templates/ldtjson-bin/segmenttemplate.html'];
   164     '<li class="Rk-Bin-Item" draggable="true" data-image="<%- Rkns.Utils.getFullURL(image) %>" data-uri="<%=ldt_platform%>ldtplatform/ldt/front/player/<%=mediaid%>/#id=<%=annotationid%>" data-title="<%-title%>" data-description="<%-description%>">' +
       
   165     '<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>'
       
   166 );
       
   167 
   158 
   168 ResultsBin.prototype._init = function(_renkan, _opts) {
   159 ResultsBin.prototype._init = function(_renkan, _opts) {
   169     this.renkan = _renkan;
   160     this.renkan = _renkan;
   170     this.ldt_platform = _opts.ldt_platform || "http://ldt.iri.centrepompidou.fr/";
   161     this.ldt_platform = _opts.ldt_platform || "http://ldt.iri.centrepompidou.fr/";
   171     this.max_results = _opts.max_results || 50;
   162     this.max_results = _opts.max_results || 50;