// display if we first got results
$(that.node).show();
+
var acc = [];
acc.push('<div class="title">' + M('Termlists') + '</div>');
for (var i = 0; i < facets.length; i++) {
$(that.node).html(acc.join(''));
- var output = {};
for (var i = 0; i < facets.length; i++) {
var name = facets[i]
var ref = facetConfig[name];
+ var caption = ref[0];
if (!ref) {
alert("bad facet configuration: '" + name + "'");
} else {
- output[name] = makeSingleFacet(ref[0], data[name], ref[1], ref[2] ? name : null);
+ var output = makeSingleFacet(ref[0], data[name], ref[1], ref[2] ? name : null);
+ that.log("setting HTML for facet '" + name + "'");
+ that.team.findnode('.mkwsFacet' + caption).html(output);
}
}
- for (var i = 0; i < facets.length; i++) {
- var name = facets[i]
- var ref = facetConfig[name];
- var caption = ref[0];
-
- that.log("setting HTML for facet '" + name + "'");
- that.team.findnode('.mkwsFacet' + caption).html(output[name]);
- }
-
function makeSingleFacet(caption, data, max, pzIndex) {
var teamName = that.team.name();