X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=tools%2Fhtdocs%2Fmkws.js;h=b735cf6609951b6d58f3953cab3e57176bd6553d;hb=396ebc9a4ddc7299c2357d875c7f2648716d4500;hp=c6e5797a38e57019ae1a9fdda1e568fb752e11e5;hpb=fea54f54a7494531aee9a824e1848c0c22b26a7f;p=mkws-moved-to-github.git diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index c6e5797..b735cf6 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -271,7 +271,8 @@ function team($, teamName) { renderSummary(hit), ''); if (hit.recid == m_curDetRecId) { - html.push(renderDetails(m_curDetRecData)); + if (m_curDetRecData) + html.push(renderDetails(m_curDetRecData)); } } results.html(html.join('')); @@ -405,10 +406,11 @@ function team($, teamName) { // wait until the DOM is ready function domReady () { - $('.mkwsSearchForm').each(function (i, obj) { + $('.mkwsSearchForm.mkwsTeam_' + m_teamName).each(function (i, obj) { + debug("adding search-forms for team '" + m_teamName + "'"); var node = this; - debug("adding class 'foo' to node " + node); mkws.handle_node_with_team(node, function(tname) { + debug("adding search-form '" + tname + "' for team '" + m_teamName + "'"); $(node).submit(onFormSubmitEventHandler); }); }); @@ -426,7 +428,11 @@ function team($, teamName) { // when search button pressed function onFormSubmitEventHandler() { - that.newSearch(document.mkwsSearchForm.mkwsQuery.value); + mkws.handle_node_with_team(this, function (tname) { + var val = $('.mkwsQuery.mkwsTeam_' + tname).val(); + mkws.teams[tname].newSearch(val); + }); + return false; }