X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=tools%2Fhtdocs%2Fmkws.js;h=b5dc51d1b35efc3befb7da2ea8759630f0cbb414;hb=e1910c1453642bea8ffad32e3e1a4e52f1ecf8eb;hp=624521585f39d3fa5c6adf89a5f6b53900dfaf44;hpb=60a397929857c23ce4d319825dffd2e2bd150e25;p=mkws-moved-to-github.git diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 6245215..b5dc51d 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -404,7 +404,14 @@ function _make_mkws_team($, teamName) { // wait until the DOM is ready function domReady () { - document.mkwsSearchForm.onsubmit = onFormSubmitEventHandler; + $('.mkwsSearchForm').each(function (i, obj) { + var node = this; + debug("adding class 'foo' to node " + node); + mkws.handle_node_with_team(node, function(tname) { + $(node).submit(onFormSubmitEventHandler); + }); + }); + document.mkwsSearchForm.mkwsQuery.value = ''; if (document.mkwsSelect) { if (document.mkwsSelect.mkwsSort) @@ -1302,7 +1309,7 @@ function _mkws_jquery_plugin ($) { // Find all nodes with class (NOT id) mkwsRecords, and // determine their team from the mkwsTeam_* class. So: //
- $('.mkwsResults, .mkwsRecords, .mkwsTermlists').each(function () { + $('.mkwsSearch, .mkwsResults, .mkwsRecords, .mkwsTermlists').each(function () { var node = this; mkws.handle_node_with_team(node, function(tname) { if (mkws.teams[tname]) {