# HG changeset patch # User hamidouk # Date 1325174696 -3600 # Node ID 5b58a108086a1a2a19b55f94cc14ef97a792d971 # Parent be6b15bd7234787d7eed814b4dc1874f48b6cccb adding support for keywords. diff -r be6b15bd7234 -r 5b58a108086a src/js/site.js.templ --- a/src/js/site.js.templ Thu Dec 29 16:46:10 2011 +0100 +++ b/src/js/site.js.templ Thu Dec 29 17:04:56 2011 +0100 @@ -37,6 +37,9 @@ "SliderWidget" : { minimize_period: 850 // how long does the slider stays maximized after the user leaves the zone ? }, + "createAnnotationWidget" : { + keywords: ["#faux-raccord", "#mot-clef"] + }, "Main" : { autoplay: true } diff -r be6b15bd7234 -r 5b58a108086a src/js/widgets/createAnnotationWidget.js --- a/src/js/widgets/createAnnotationWidget.js Thu Dec 29 16:46:10 2011 +0100 +++ b/src/js/widgets/createAnnotationWidget.js Thu Dec 29 17:04:56 2011 +0100 @@ -1,6 +1,7 @@ IriSP.createAnnotationWidget = function(Popcorn, config, Serializer) { IriSP.Widget.call(this, Popcorn, config, Serializer); this._hidden = true; + this.keywords = IriSP.widgetsDefaults["createAnnotationWidget"].keywords; }; @@ -29,12 +30,13 @@ IriSP.createAnnotationWidget.prototype.draw = function() { var _this = this; - var annotationMarkup = IriSP.templToHTML(IriSP.createAnnotationWidget_template); + var annotationMarkup = IriSP.templToHTML(IriSP.createAnnotationWidget_template, + {keywords: this.keywords}); this.selector.append(annotationMarkup); this.selector.hide(); this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked", - IriSP.wrap(this, this.handleAnnotateSignal)); + IriSP.wrap(this, this.handleAnnotateSignal)); }; IriSP.createAnnotationWidget.prototype.handleAnnotateSignal = function() { diff -r be6b15bd7234 -r 5b58a108086a src/templates/createAnnotationWidget.html --- a/src/templates/createAnnotationWidget.html Thu Dec 29 16:46:10 2011 +0100 +++ b/src/templates/createAnnotationWidget.html Thu Dec 29 17:04:56 2011 +0100 @@ -18,8 +18,8 @@