added show/hide message. Removed reaction to annotateClick signal popcorn-port
authorhamidouk
Fri, 03 Feb 2012 17:05:11 +0100
branchpopcorn-port
changeset 777 96e89720ff18
parent 776 f3c758ef9952
child 778 8329f476d852
added show/hide message. Removed reaction to annotateClick signal
src/js/widgets/annotationsWidget.js
--- a/src/js/widgets/annotationsWidget.js	Fri Feb 03 16:42:07 2012 +0100
+++ b/src/js/widgets/annotationsWidget.js	Fri Feb 03 17:05:11 2012 +0100
@@ -53,8 +53,11 @@
   var annotationMarkup = IriSP.templToHTML(IriSP.annotationWidget_template);
 	this.selector.append(annotationMarkup);
 
-  this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked", 
-                        IriSP.wrap(this, this.handleAnnotateSignal));  
+  this._Popcorn.listen("IriSP.AnnotationsWidget.show", 
+                        IriSP.wrap(this, this.show));
+  this._Popcorn.listen("IriSP.AnnotationsWidget.hide", 
+                        IriSP.wrap(this, this.hide));
+ 
   var legal_ids = [];
   if (typeof(this._serializer.getChapitrage()) !== "undefined")
     legal_ids.push(this._serializer.getChapitrage());
@@ -90,11 +93,15 @@
 
 };
 
-IriSP.AnnotationsWidget.prototype.handleAnnotateSignal = function() {
+IriSP.AnnotationsWidget.prototype.hide = function() {
   if (this._hidden == false) {
     this.selector.hide();
     this._hidden = true;
-  } else {
+  }
+};
+
+IriSP.AnnotationsWidget.prototype.show = function() {
+  if (this._hidden == true) {
     this.selector.show();
     this._hidden = false;
   }