diff -r 3b88465041d6 -r 5c0416e8bba1 src/widgets/AnnotationsList.js --- a/src/widgets/AnnotationsList.js Fri Jul 03 16:54:26 2015 +0200 +++ b/src/widgets/AnnotationsList.js Fri Jul 03 16:57:10 2015 +0200 @@ -12,25 +12,47 @@ IriSP.Widgets.AnnotationsList.prototype = new IriSP.Widgets.Widget(); IriSP.Widgets.AnnotationsList.prototype.defaults = { - /* URL when the annotations are to be reloaded from an LDT-like segment API - * e.g. http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=? + /* + * URL when the annotations are to be reloaded from an LDT-like segment API + * e.g. + * http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=? */ ajax_url : false, - /* number of milliseconds before/after the current timecode when calling the segment API + /* + * number of milliseconds before/after the current timecode when calling the + * segment API */ ajax_granularity : 600000, default_thumbnail : "", - /* URL when the annotation is not in the current project, - * e.g. http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}} + /* + * URL when the annotation is not in the current project, e.g. + * http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}} */ foreign_url : "", annotation_type : false, refresh_interval : 0, limit_count : 20, newest_first : false, - show_audio: true, - show_creator: false, - show_controls: false, + always_visible : false, + start_visible: true, + show_audio : true, + show_filters : false, + show_creation_date : false, + show_timecode : true, + /* + * Only annotation in the current segment will be displayed. Designed to work with the Segments Widget. + */ + filter_by_segments: false, + segments_annotation_type: "chap", + /* + * Set to a username if you only want to display annotations from a given user + */ + show_only_annotation_from_user: false, + /* + * Show a text field that filter annotations by username + */ + filter_by_user: false, + tags : true, polemics : [{ keyword: "++", background_color: "#c9ecc6" @@ -59,24 +81,33 @@ IriSP.Widgets.AnnotationsList.prototype.template = '
' + + '{{#show_filters}}' + + '
' + + '' + + '' + + '' + + '
' + + '{{/show_filters}}' + '{{#show_audio}}
{{/show_audio}}' - + '{{#show_controls}}
Previous | Next
{{/show_controls}}' + '' + '
'; IriSP.Widgets.AnnotationsList.prototype.annotationTemplate = - '
  • ' + '
  • ' + '
    ' + '' - + '' + + '' + '' + '
    ' - + '
    {{begin}} - {{end}}
    ' + + '{{#show_timecode}}
    {{begin}} - {{end}}
    {{/show_timecode}}' + '

    ' + '{{{htitle}}}' + '

    ' + '

    {{{hdescription}}}

    ' + + '{{#created}}' + + '
    {{{created}}}
    ' + + '{{/created}}' + '{{#tags.length}}' + '