# HG changeset patch # User hamidouk # Date 1327586256 -3600 # Node ID 0c53eba54b11baee899de4f56d6a5c7b30bac663 # Parent 08b8b3ce30e47a0d47b993d240937cd5cdbec8ad added a "minimize" button. diff -r 08b8b3ce30e4 -r 0c53eba54b11 src/css/LdtPlayer.css --- a/src/css/LdtPlayer.css Thu Jan 26 13:01:57 2012 +0100 +++ b/src/css/LdtPlayer.css Thu Jan 26 14:57:36 2012 +0100 @@ -689,6 +689,15 @@ color: #D93C71; } +.Ldt-createAnnotation-Minimize { + position: relative; + float: right; + height: 17px; + width: 17px; + right: 0px; + top: -5px; +} + /* AnnotationsListWidget */ .Ldt-AnnotationsListWidget { diff -r 08b8b3ce30e4 -r 0c53eba54b11 src/js/widgets/createAnnotationWidget.js --- a/src/js/widgets/createAnnotationWidget.js Thu Jan 26 13:01:57 2012 +0100 +++ b/src/js/widgets/createAnnotationWidget.js Thu Jan 26 14:57:36 2012 +0100 @@ -152,9 +152,20 @@ this.selector.find(".Ldt-createAnnotation-submitButton").click(IriSP.wrap(this, this.handleButtonClick)); - if (!this.cinecast_version) + if (!this.cinecast_version) { this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked", - IriSP.wrap(this, this.handleAnnotateSignal)); + IriSP.wrap(this, this.handleAnnotateSignal)); + + // handle clicks on the cancel button too. + this.selector.find(".Ldt-createAnnotation-Minimize").click(IriSP.wrap(this, + function() { + // we've got to simulate the pressing of the button because there's no + // other way to minimize the widget and show the widgets that were hidden + // same time + this._Popcorn.trigger("IriSP.PlayerWidget.AnnotateButton.clicked"); + } + )); + } }; /** handles clicks on the annotate button. Works only for the non-cinecast version */ diff -r 08b8b3ce30e4 -r 0c53eba54b11 src/templates/createAnnotationWidget.html --- a/src/templates/createAnnotationWidget.html Thu Jan 26 13:01:57 2012 +0100 +++ b/src/templates/createAnnotationWidget.html Thu Jan 26 14:57:36 2012 +0100 @@ -7,7 +7,9 @@
- + {{^cinecast_version}} +
+ {{/cinecast_version}}