From: Mike Taylor Date: Mon, 1 Jul 2013 16:06:33 +0000 (+0100) Subject: Report error is unknown facet is configured. X-Git-Tag: 0.9.1~393 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=329d15ab4df8a20033013c056b03a845c54f1ec0;p=mkws-moved-to-github.git Report error is unknown facet is configured. --- 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");