X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=tools%2Fhtdocs%2Fmkws.js;h=ae6740b9cd1301e2b4d0532c50a59fe0fdd2990a;hb=fccd2725f64f0743c371e4eb756a5ec3b3f7a1b6;hp=41ecb4b73560d751ce2c6dd1f65d51dc4de02d3b;hpb=3bb12e5cfdace6e2322d72a5e1ac89ffd6f3cc2a;p=mkws-moved-to-github.git diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 41ecb4b..ae6740b 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -1401,6 +1401,21 @@ function _mkws_jquery_plugin ($) { $(document).ready(function() { log("on load ready"); + + // Backwards compatibility: set new magic class names on any + // elements that have the old magic IDs. + var ids = [ "Switch", "Lang", "Search", "Pager", "Navi", + "Results", "Records", "Targets", "Ranking", + "Termlists", "Stat" ]; + for (var i = 0; i < ids.length; i++) { + var id = 'mkws' + ids[i]; + var node = $('#' + id); + if (node.attr('id')) { + node.addClass(id + " mkwsTeam_AUTO"); + log("added magic classes to '" + node.attr('id') + "'"); + } + } + // Backwards compatibility: the special-case undefined team mkws.teams[''] = _make_mkws_team(j, undefined); log("Made the unnamed MKWS team");