X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=tools%2Fhtdocs%2Fmkws.js;h=1292b5f675f8fac8760b9199794739ccd632a034;hb=098b75175b5a1e665a3c11f8e09b49169a8ddeb5;hp=be3c9969c36c11c43187e9eedc09a6e9e17e1279;hpb=02b2b955694909ba438dc434b568a24e0d1fbd9b;p=mkws-moved-to-github.git diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index be3c996..1292b5f 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -984,15 +984,10 @@ function team($, teamName) { $(document).ready(function() { mkws.resize_page() }); } - $('.mkwsSearchForm.mkwsTeam_' + m_teamName).each(function (i, obj) { - debug("adding search-forms for team '" + m_teamName + "'"); - var node = this; - mkws.handle_node_with_team(this, function(tname) { - debug("adding search-form '" + tname + "' for team '" + m_teamName + "'"); - $(node).submit(onFormSubmitEventHandler); - }); - }); - + var node; + node = $('.mkwsSearchForm.mkwsTeam_' + m_teamName); + if (node.length) + node.submit(onFormSubmitEventHandler); node = $('.mkwsSort.mkwsTeam_' + m_teamName); if (node.length) node.change(onSelectDdChange); @@ -1003,7 +998,7 @@ function team($, teamName) { // on first page, hide the termlist $(document).ready(function() { $(".mkwsTermlists.mkwsTeam_" + m_teamName).hide(); }); var motd = $(".mkwsMOTD.mkwsTeam_" + m_teamName); - var container = $(".mkwsMOTDContainer.mkwsTeam_" + m_teamName); + var container = $(".mkwsMOTDContainer.mkwsTeam_" + m_teamName); if (motd.length && container.length) { // Move the MOTD from the provided element down into the container motd.appendTo(container); @@ -1429,7 +1424,7 @@ function team($, teamName) { // elements that have the old magic IDs. var ids = [ "Switch", "Lang", "Search", "Pager", "Navi", "Results", "Records", "Targets", "Ranking", - "Termlists", "Stat" ]; + "Termlists", "Stat", "MOTD" ]; for (var i = 0; i < ids.length; i++) { var id = 'mkws' + ids[i]; var node = $('#' + id);