# HG changeset patch # User hamidouk # Date 1328285111 -3600 # Node ID 96e89720ff1824bd2b6d88ba2a8443654dc9d91a # Parent f3c758ef99525a19a347fe7d9ac58fa933a7c8c5 added show/hide message. Removed reaction to annotateClick signal diff -r f3c758ef9952 -r 96e89720ff18 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; }