src/js/widgets/createAnnotationWidget.js
branchpopcorn-port
changeset 721 0c53eba54b11
parent 719 f2aa75a4d848
child 722 ed12570ebd64
equal deleted inserted replaced
720:08b8b3ce30e4 721:0c53eba54b11
   150     }
   150     }
   151   }
   151   }
   152   
   152   
   153   this.selector.find(".Ldt-createAnnotation-submitButton").click(IriSP.wrap(this, this.handleButtonClick));
   153   this.selector.find(".Ldt-createAnnotation-submitButton").click(IriSP.wrap(this, this.handleButtonClick));
   154   
   154   
   155   if (!this.cinecast_version)
   155   if (!this.cinecast_version) {
   156     this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked", 
   156     this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked", 
   157                           IriSP.wrap(this, this.handleAnnotateSignal));  
   157                           IriSP.wrap(this, this.handleAnnotateSignal));
       
   158     
       
   159     // handle clicks on the cancel button too.
       
   160     this.selector.find(".Ldt-createAnnotation-Minimize").click(IriSP.wrap(this, 
       
   161       function() {
       
   162         // we've got to simulate the pressing of the button because there's no
       
   163         // other way to minimize the widget and show the widgets that were hidden
       
   164         // same time
       
   165         this._Popcorn.trigger("IriSP.PlayerWidget.AnnotateButton.clicked");
       
   166       }
       
   167     ));
       
   168   }
   158 };
   169 };
   159 
   170 
   160 /** handles clicks on the annotate button. Works only for the non-cinecast version */
   171 /** handles clicks on the annotate button. Works only for the non-cinecast version */
   161 IriSP.createAnnotationWidget.prototype.handleAnnotateSignal = function() {
   172 IriSP.createAnnotationWidget.prototype.handleAnnotateSignal = function() {
   162   
   173