X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=blobdiff_plain;f=src%2Fmkws-widget-facets.js;h=d7c7ffa384f73cdc9d53651956f842decb0958c3;hp=ce47068c6984487a5e0af2876e57f932f40c92d8;hb=cb3027a4ef6f6cc32acd558f1a2585d14e223775;hpb=ae7db42ded9eab523dc9524d8d6b42013b9e7347 diff --git a/src/mkws-widget-facets.js b/src/mkws-widget-facets.js index ce47068..d7c7ffa 100644 --- a/src/mkws-widget-facets.js +++ b/src/mkws-widget-facets.js @@ -1,8 +1,15 @@ -mkws.registerWidgetType('termlists', function() { +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.css('opacity', 1); that.node.addClass("active"); }); @@ -64,16 +71,15 @@ mkws.registerWidgetType('facet', function() { } else { template = team.loadTemplate("facet-" + name); if (template) { - that.log("Using facet-" + name + " template.") + that.info("Using facet-" + name + " template.") } else { - that.log("No " + name + " specific template, using default.") + that.info("No " + name + " specific template, using default.") template = team.loadTemplate("facet"); } } that.node.html(template({ name: name, caption: caption, - query: that.config.query, terms: terms })); });