equal
deleted
inserted
replaced
51 var _this = this; |
51 var _this = this; |
52 |
52 |
53 var annotationMarkup = IriSP.templToHTML(IriSP.annotationWidget_template); |
53 var annotationMarkup = IriSP.templToHTML(IriSP.annotationWidget_template); |
54 this.selector.append(annotationMarkup); |
54 this.selector.append(annotationMarkup); |
55 |
55 |
56 this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked", |
56 this._Popcorn.listen("IriSP.AnnotationsWidget.show", |
57 IriSP.wrap(this, this.handleAnnotateSignal)); |
57 IriSP.wrap(this, this.show)); |
|
58 this._Popcorn.listen("IriSP.AnnotationsWidget.hide", |
|
59 IriSP.wrap(this, this.hide)); |
|
60 |
58 var legal_ids = []; |
61 var legal_ids = []; |
59 if (typeof(this._serializer.getChapitrage()) !== "undefined") |
62 if (typeof(this._serializer.getChapitrage()) !== "undefined") |
60 legal_ids.push(this._serializer.getChapitrage()); |
63 legal_ids.push(this._serializer.getChapitrage()); |
61 else |
64 else |
62 legal_ids = this._serializer.getNonTweetIds(); |
65 legal_ids = this._serializer.getNonTweetIds(); |
88 this._Popcorn = this._Popcorn.code(conf); |
91 this._Popcorn = this._Popcorn.code(conf); |
89 } |
92 } |
90 |
93 |
91 }; |
94 }; |
92 |
95 |
93 IriSP.AnnotationsWidget.prototype.handleAnnotateSignal = function() { |
96 IriSP.AnnotationsWidget.prototype.hide = function() { |
94 if (this._hidden == false) { |
97 if (this._hidden == false) { |
95 this.selector.hide(); |
98 this.selector.hide(); |
96 this._hidden = true; |
99 this._hidden = true; |
97 } else { |
100 } |
|
101 }; |
|
102 |
|
103 IriSP.AnnotationsWidget.prototype.show = function() { |
|
104 if (this._hidden == true) { |
98 this.selector.show(); |
105 this.selector.show(); |
99 this._hidden = false; |
106 this._hidden = false; |
100 } |
107 } |
101 }; |
108 }; |