diff -r f67047a16084 -r fba23fde14ba client/js/ldtjson-bin.js --- a/client/js/ldtjson-bin.js Fri May 16 12:37:51 2014 +0200 +++ b/client/js/ldtjson-bin.js Fri May 16 14:09:57 2014 +0200 @@ -7,9 +7,9 @@ var Bin = Ldt.Bin = function(_renkan, _opts) { if (_opts.ldt_type) { - var resclass = Ldt[_opts.ldt_type+"Bin"]; - if (resclass) { - return new resclass(_renkan, _opts); + var Resclass = Ldt[_opts.ldt_type+"Bin"]; + if (Resclass) { + return new Resclass(_renkan, _opts); } } console.error("No such LDT Bin Type"); @@ -18,13 +18,13 @@ var ProjectBin = Ldt.ProjectBin = Rkns.Utils.inherit(Rkns._BaseBin); ProjectBin.prototype.tagTemplate = _.template( - '
  • ' - + '

    <%=htitle%>

  • ' + '
  • ' + + '

    <%=htitle%>

  • ' ); ProjectBin.prototype.annotationTemplate = _.template( - '
  • ' - + '

    <%=htitle%>

    <%=hdescription%>

    Start: <%=start%>, End: <%=end%>, Duration: <%=duration%>

  • ' + '
  • ' + + '

    <%=htitle%>

    <%=hdescription%>

    Start: <%=start%>, End: <%=end%>, Duration: <%=duration%>

  • ' ); ProjectBin.prototype._init = function(_renkan, _opts) { @@ -61,7 +61,7 @@ _res += pad(_minutes) + ':' + pad(_seconds); return _res; } - + var _html = '
  • Tags

  • ', _projtitle = this.data.meta["dc:title"], _this = this, @@ -91,9 +91,9 @@ count++; var _duration = _annotation.end - _annotation.begin, _img = ( - (_annotation.content && _annotation.content.img && _annotation.content.img.src) - ? _annotation.content.img.src - : ( _duration ? _this.renkan.options.static_url+"img/ldt-segment.png" : _this.renkan.options.static_url+"img/ldt-point.png" ) + (_annotation.content && _annotation.content.img && _annotation.content.img.src) ? + _annotation.content.img.src : + ( _duration ? _this.renkan.options.static_url+"img/ldt-segment.png" : _this.renkan.options.static_url+"img/ldt-point.png" ) ); _html += _this.annotationTemplate({ ldt_platform: _this.ldt_platform, @@ -110,7 +110,7 @@ static_url: _this.renkan.options.static_url }); }); - + this.main_$.html(_html); if (!search.isempty && count) { this.count_$.text(count).show(); @@ -161,8 +161,8 @@ var ResultsBin = Ldt.ResultsBin = Rkns.Utils.inherit(Rkns._BaseBin); ResultsBin.prototype.segmentTemplate = _.template( - '
  • ' - + '

    <%=htitle%>

    <%=hdescription%>

    Start: <%=start%>, End: <%=end%>, Duration: <%=duration%>

  • ' + '
  • ' + + '

    <%=htitle%>

    <%=hdescription%>

    Start: <%=start%>, End: <%=end%>, Duration: <%=duration%>

  • ' ); ResultsBin.prototype._init = function(_renkan, _opts) { @@ -203,12 +203,12 @@ _res += pad(_minutes) + ':' + pad(_seconds); return _res; } - + var _html = '', _this = this, count = 0; _(this.data.objects).each(function(_segment) { - var _description = _segment['abstract'], + var _description = _segment.abstract, _title = _segment.title; if (!search.isempty && !search.test(_title) && !search.test(_description)) { return; @@ -218,9 +218,9 @@ _begin = _segment.start_ts, _end = + _segment.duration + _begin, _img = ( - _duration - ? _this.renkan.options.static_url + "img/ldt-segment.png" - : _this.renkan.options.static_url + "img/ldt-point.png" + _duration ? + _this.renkan.options.static_url + "img/ldt-segment.png" : + _this.renkan.options.static_url + "img/ldt-point.png" ); _html += _this.segmentTemplate({ ldt_platform: _this.ldt_platform, @@ -238,7 +238,7 @@ image: _img }); }); - + this.main_$.html(_html); if (!search.isempty && count) { this.count_$.text(count).show();