X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=tools%2Fhtdocs%2Fmkws.js;h=e721d8cbbf21be15090af873ee67990684417983;hb=206ce7b2d1040c538f8f87470f4407ff45d63c4d;hp=1bcebdadec0fc38c753cd518739ec7e87d931a8f;hpb=0b7ef1d44312a6f086f50c7a2d0b5a74546f02f5;p=mkws-moved-to-github.git diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 1bcebda..e721d8c 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -1409,7 +1409,7 @@ function _mkws_jquery_plugin ($) { //
// ### Down the line we will also want teams that have facet // divs but no results. But not today. - $('.mkwsRecords').each(function () { + $('.mkwsResults, .mkwsRecords, .mkwsTermlists').each(function () { var node = this; var classes = this.className; var list = classes.split(/\s+/) @@ -1420,11 +1420,13 @@ function _mkws_jquery_plugin ($) { tname = cname.replace(/^mkwsTeam_/, ''); } } - if (tname) { + if (!tname) { + alert("No MKWS team specified for mkwsRecords element with classes '" + classes + "'"); + } else if (mkws.teams[tname]) { + log("MKWS team '" + tname + "' already exists, skipping"); + } else { mkws.teams[tname] = _make_mkws_team(j, tname); log("Made MKWS team '" + tname + "'"); - } else { - alert("No MKWS team specified for mkwsRecords element with classes '" + classes + "'"); } });