--- a/src/widgets/Tagcloud.js Fri Nov 16 17:36:56 2012 +0100
+++ b/src/widgets/Tagcloud.js Wed Nov 21 16:33:51 2012 +0100
@@ -39,9 +39,6 @@
}
IriSP.Widgets.Tagcloud.prototype.draw = function() {
- this.onMdpEvent("search", "onSearch");
- this.onMdpEvent("search.closed", "onSearch");
- this.onMdpEvent("search.cleared", "onSearch");
if (this.segment_annotation_type) {
var _this = this;
@@ -108,9 +105,10 @@
this.$.html(Mustache.to_html(this.template, {words: _words }));
this.$.find(".Ldt-Tagcloud-item").click(function() {
var _txt = IriSP.jQuery(this).attr("content");
- _this.player.trigger("search.triggeredSearch", _txt);
+ _this.source.getAnnotations().search(_txt);
});
-
+ this.source.getAnnotations().on("search", this.functionWrapper("onSearch"));
+ this.source.getAnnotations().on("search-cleared", this.functionWrapper("onSearch"));
}
IriSP.Widgets.Tagcloud.prototype.onSearch = function(searchString) {