From: Mike Taylor Date: Fri, 28 Feb 2014 12:32:33 +0000 (+0000) Subject: FINALLY simplify the unnecessary iteration over all one of the search X-Git-Tag: 1.0.0~1384^2~4 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=84b0d3d7033d2110e78797548f9c5c765c45ea09;p=mkws-moved-to-github.git FINALLY simplify the unnecessary iteration over all one of the search forms of a given team. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 75a88c7..5b9ef21 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -917,16 +917,13 @@ function team($, teamName) { mkws_html_lang(); debug("HTML search form"); - // ### There is only one match here by design: fix not to bother looping - $('.mkwsSearch.mkwsTeam_' + m_teamName).each(function (i, obj) { - var node = this; - mkws.handle_node_with_team(this, function(tname) { - $(node).html('\ + var node = $('.mkwsSearch.mkwsTeam_' + m_teamName); + mkws.handle_node_with_team(node, function(tname) { + node.html('\
\ \ \
'); - }); }); debug("HTML records");