var that = this;
// Initially hide the termlists; display when we get results
- $(document).ready(function() {
- $(that.node).hide();
+ mkws.$(document).ready(function() {
+ that.node.hide();
});
this.team.queue("termlists").subscribe(function(data) {
- $(that.node).show();
+ that.node.show();
});
var acc = [];
for (var i = 0; i < facets.length; i++) {
acc.push('<div class="mkwsFacet mkwsTeam_', this.team.name(), '" data-mkws-facet="', facets[i], '">', '</div>');
}
- $(this.node).html(acc.join(''));
+ this.node.html(acc.join(''));
- widget.autosearch(this);
+ this.autosearch();
});
var that = this;
var name = that.config.facet;
- var ref = facetConfig[name] || alert("no facet definition for '" + name + "'");
- var caption = ref[0];
- var max = ref[1];
+ var ref = facetConfig[name] || [ "Unknown", 10, true ];
+ var caption = this.config['facet_caption_' + name] || ref[0];
+ var max = parseInt(this.config['facet_max_' + name] || ref[1]);
var pzIndex = ref[2] ? name : null;
that.toString = function() {
acc.push('</div>');
}
- $(that.node).html(acc.join(''));
+ that.node.html(acc.join(''));
});
});