From 548622e76659b11cdaba69a5b8dd3b4b0c0842ac Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Sun, 30 Jun 2013 09:14:54 +0100 Subject: [PATCH] Replace target-facet generation with another add_single_facet() invocation. --- experiments/spclient/mkws.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index 3bf3069..97138ce 100644 --- a/experiments/spclient/mkws.js +++ b/experiments/spclient/mkws.js @@ -164,17 +164,7 @@ function my_onterm(data) { var termlists = []; termlists.push('
' + M('Termlists') + '
'); - termlists.push('
'); - termlists.push('
' + M('Sources') + '
'); - for (var i = 0; i < data.xtargets.length && i < SourceMax; i++ ) { - termlists.push('' - + data.xtargets[i].name - + ' (' - + data.xtargets[i].freq - + ')
'); - } - termlists.push('
'); - + add_single_facet(termlists, "Sources", data.xtargets, SourceMax, null); add_single_facet(termlists, "Subjects", data.subject, SubjectMax, "su"); add_single_facet(termlists, "Authors", data.author, AuthorMax, "au"); @@ -186,7 +176,16 @@ function add_single_facet(termlists, caption, data, max, cclIndex) { termlists.push('
'); termlists.push('
' + M(caption) + '
'); for (var i = 0; i < data.length && i < max; i++ ) { - termlists.push('' + termlists.push('' + data[i].name + ' (' + data[i].freq -- 1.7.10.4