From 5b6dfafa13033d2fa76f3a08cd55498701fc0a83 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 7 Apr 2014 11:52:50 +0100 Subject: [PATCH] Scaffolding for facets is put in place before widgets are created. --- src/mkws-team.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/mkws-team.js b/src/mkws-team.js index e1e985b..8258bd1 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -427,6 +427,27 @@ function team($, teamName) { \ '); + mkws.facetConfig = { + xtargets: [ "Sources", 16, false ], + subject: [ "Subjects", 10, true ], + author: [ "Authors", 10, true ] + } + + var acc = []; + var facets = m_config.facets; + acc.push('
' + M('Termlists') + '
'); + for (var i = 0; i < facets.length; i++) { + var name = facets[i] + var ref = mkws.facetConfig[name]; + if (!ref) { + alert("bad facet configuration: '" + name + "'"); + } else { + acc.push('
'); + acc.push('
'); + } + } + findnode(".mkwsTermlists").html(acc.join('')); + var ranking_data = '
'; if (m_config.show_sort) { ranking_data += M('Sort by') + ' ' + mkwsHtmlSort() + ' '; -- 1.7.10.4