src/js/widgets/createAnnotationWidget.js
branchpopcorn-port
changeset 547 5b58a108086a
parent 543 5856fab9596c
child 548 96a188138c20
equal deleted inserted replaced
546:be6b15bd7234 547:5b58a108086a
     1 IriSP.createAnnotationWidget = function(Popcorn, config, Serializer) {
     1 IriSP.createAnnotationWidget = function(Popcorn, config, Serializer) {
     2   IriSP.Widget.call(this, Popcorn, config, Serializer);
     2   IriSP.Widget.call(this, Popcorn, config, Serializer);
     3   this._hidden = true;
     3   this._hidden = true;
       
     4   this.keywords = IriSP.widgetsDefaults["createAnnotationWidget"].keywords;
     4 };
     5 };
     5 
     6 
     6 
     7 
     7 IriSP.createAnnotationWidget.prototype = new IriSP.Widget();
     8 IriSP.createAnnotationWidget.prototype = new IriSP.Widget();
     8 
     9 
    27 };
    28 };
    28 
    29 
    29 IriSP.createAnnotationWidget.prototype.draw = function() {
    30 IriSP.createAnnotationWidget.prototype.draw = function() {
    30   var _this = this;
    31   var _this = this;
    31 
    32 
    32   var annotationMarkup = IriSP.templToHTML(IriSP.createAnnotationWidget_template);
    33   var annotationMarkup = IriSP.templToHTML(IriSP.createAnnotationWidget_template,
       
    34                                            {keywords: this.keywords});
    33 	this.selector.append(annotationMarkup);
    35 	this.selector.append(annotationMarkup);
    34   this.selector.hide();
    36   this.selector.hide();
    35   
    37   
    36   this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked", 
    38   this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked", 
    37                         IriSP.wrap(this, this.handleAnnotateSignal));
    39                         IriSP.wrap(this, this.handleAnnotateSignal));  
    38 };
    40 };
    39 
    41 
    40 IriSP.createAnnotationWidget.prototype.handleAnnotateSignal = function() {
    42 IriSP.createAnnotationWidget.prototype.handleAnnotateSignal = function() {
    41   if (this._hidden == false) {
    43   if (this._hidden == false) {
    42     this.selector.hide();
    44     this.selector.hide();