X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-widget-facets.js;h=04f6dc6a20c783bd24f1ae35b2675f36b8d92f33;hb=6bdc28a3072c622e756f0377f375ae64c5492ff8;hp=d2063f8d8aee454533255de3b20139d40305fa14;hpb=91c69ed1ddbc7668c7cc7c6ab31411050af6b5b4;p=mkws-moved-to-github.git diff --git a/src/mkws-widget-facets.js b/src/mkws-widget-facets.js index d2063f8..04f6dc6 100644 --- a/src/mkws-widget-facets.js +++ b/src/mkws-widget-facets.js @@ -2,7 +2,15 @@ mkws.registerWidgetType('facets', function() { // Initially hide the facets; display when we get results var that = this; var team = this.team; + + this.team.queue("searchtriggered").subscribe(function() { + var op = that.config.newsearch_opacity; + if (op !== undefined) { that.node.fadeTo(500, op); } + }); + team.queue("facets").subscribe(function(data) { + that.node.stop(); + that.node.css('opacity', 1); that.node.addClass("active"); }); @@ -56,10 +64,6 @@ mkws.registerWidgetType('facet', function() { count: data[i].freq, linkdata: linkdata }); - - if (!pzIndex) { - team.mapTarget(data[i].id, data[i].name); - } } // configured template > facet specific template > default facet template var template; @@ -77,7 +81,6 @@ mkws.registerWidgetType('facet', function() { that.node.html(template({ name: name, caption: caption, - query: that.config.query, terms: terms })); });