From 329d15ab4df8a20033013c056b03a845c54f1ec0 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 1 Jul 2013 17:06:33 +0100 Subject: [PATCH] Report error is unknown facet is configured. --- experiments/spclient/mkws.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index 7ab43c9..105c702 100644 --- a/experiments/spclient/mkws.js +++ b/experiments/spclient/mkws.js @@ -172,12 +172,15 @@ function my_onterm(data) { var facets = mkws_config.facets; for(var i = 0; i < facets.length; i++) { - if (facets[i] == "sources") + if (facets[i] == "sources") { add_single_facet(termlists, "Sources", data.xtargets, SourceMax, null); - if (facets[i] == "subjects") + } else if (facets[i] == "subjects") { add_single_facet(termlists, "Subjects", data.subject, SubjectMax, "su"); - if (facets[i] == "authors") + } else if (facets[i] == "authors") { add_single_facet(termlists, "Authors", data.author, AuthorMax, "au"); + } else { + alert("bad facet configuration: '" + facets[i] + "'"); + } } var termlist = document.getElementById("termlist"); -- 1.7.10.4