diff -r 74ac0be7655c -r c20df1c080e6 src/widgets/AnnotationsList.js --- a/src/widgets/AnnotationsList.js Fri Feb 13 16:48:05 2015 +0100 +++ b/src/widgets/AnnotationsList.js Fri Feb 13 16:57:53 2015 +0100 @@ -29,6 +29,8 @@ limit_count : 20, newest_first : false, show_audio: true, + show_creator: false, + show_controls: false, polemics : [{ keyword: "++", background_color: "#c9ecc6" @@ -58,15 +60,16 @@ IriSP.Widgets.AnnotationsList.prototype.template = '
' + '{{#show_audio}}
{{/show_audio}}' + + '{{#show_controls}}
Previous | Next
{{/show_controls}}' + '' + '
'; IriSP.Widgets.AnnotationsList.prototype.annotationTemplate = - '
  • ' + '
  • ' + '
    ' + '' - + '' + + '' + '' + '
    ' + '
    {{begin}} - {{end}}
    ' @@ -187,7 +190,7 @@ _description = _annotation.description, _thumbnail = (typeof _annotation.thumbnail !== "undefined" && _annotation.thumbnail ? _annotation.thumbnail : _this.default_thumbnail); // Update : display creator - if (_annotation.creator) { + if (_annotation.creator && _this.show_creator) { _title = _annotation.creator; } if (_annotation.title) { @@ -207,16 +210,23 @@ var _data = { id : _annotation.id, media_id : _annotation.getMedia().id, + atitle: IriSP.textFieldHtml(_annotation.title), htitle : IriSP.textFieldHtml(_title), hdescription : IriSP.textFieldHtml(_description), begin : _annotation.begin.toString(), end : _annotation.end.toString(), + begin_ms : _annotation.begin.milliseconds, + end_ms : _annotation.end.milliseconds, thumbnail : _thumbnail, url : _url, tags : _annotation.getTagTexts(), specific_style : (typeof _bgcolor !== "undefined" ? "background-color: " + _bgcolor : ""), l10n: _this.l10n }; + if (_this.show_controls) { + _this.$.find(".Ldt-AnnotationsList-Control-Prev").on("click", function (e) { e.preventDefault(); _this.navigate(-1); }); + _this.$.find(".Ldt-AnnotationsList-Control-Next").on("click", function (e) { e.preventDefault(); _this.navigate(+1); }); + } if (_this.show_audio && _annotation.audio && _annotation.audio.href && _annotation.audio.href != "null") { _data.audio = true; if (!_this.jwplayers[_annotation.id]) {