projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ee3953c
)
Separate out callback for displaying termlists area and filling individual lists.
author
Mike Taylor
<mike@indexdata.com>
Mon, 7 Apr 2014 11:01:32 +0000
(12:01 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Mon, 7 Apr 2014 11:01:32 +0000
(12:01 +0100)
src/mkws-widget-termlists.js
patch
|
blob
|
history
diff --git
a/src/mkws-widget-termlists.js
b/src/mkws-widget-termlists.js
index
ce801ec
..
e61ea64
100644
(file)
--- a/
src/mkws-widget-termlists.js
+++ b/
src/mkws-widget-termlists.js
@@
-6,7
+6,9
@@
mkws.registerWidgetType('Termlists', function() {
this.team.queue("termlists").subscribe(function(data) {
// display if we first got results
$(that.node).show();
this.team.queue("termlists").subscribe(function(data) {
// display if we first got results
$(that.node).show();
+ });
+ this.team.queue("termlists").subscribe(function(data) {
for (var i = 0; i < facets.length; i++) {
var name = facets[i]
var ref = mkws.facetConfig[name];
for (var i = 0; i < facets.length; i++) {
var name = facets[i]
var ref = mkws.facetConfig[name];
@@
-14,8
+16,7
@@
mkws.registerWidgetType('Termlists', function() {
if (!ref) {
alert("bad facet configuration: '" + name + "'");
} else {
if (!ref) {
alert("bad facet configuration: '" + name + "'");
} else {
- var output = makeSingleFacet(ref[0], data[name], ref[1], ref[2] ? name : null);
- that.team.findnode('.mkwsFacet' + caption).html(output);
+ makeSingleFacet(ref[0], data[name], ref[1], ref[2] ? name : null);
}
}
}
}
@@
-42,7
+43,7
@@
mkws.registerWidgetType('Termlists', function() {
+ ' <span>' + data[i].freq + '</span>');
acc.push('</div>');
}
+ ' <span>' + data[i].freq + '</span>');
acc.push('</div>');
}
- return acc.join('');
+ that.team.findnode('.mkwsFacet' + caption).html(acc.join(''));
}
});
}
});