Simplify creation of search-form by eliminating unnecessary
authorMike Taylor <mike@indexdata.com>
Wed, 26 Mar 2014 11:18:01 +0000 (11:18 +0000)
committerMike Taylor <mike@indexdata.com>
Wed, 26 Mar 2014 11:18:01 +0000 (11:18 +0000)
mkws.handleNodeWithTeam invocation.

src/mkws-team.js

index 41c3c44..f2db2de 100644 (file)
@@ -393,13 +393,11 @@ function team($, teamName) {
            mkwsHtmlLang();
 
        log("HTML search form");
-       mkws.handleNodeWithTeam(findnode('.mkwsSearch'), function(tname) {
-           this.html('\
-<form name="mkwsSearchForm" class="mkwsSearchForm mkwsTeam_' + tname + '" action="" >\
-  <input class="mkwsQuery mkwsTeam_' + tname + '" type="text" size="' + mkws_config.query_width + '" />\
-  <input class="mkwsButton mkwsTeam_' + tname + '" type="submit" value="' + M('Search') + '" />\
+       findnode('.mkwsSearch').html('\
+<form name="mkwsSearchForm" class="mkwsSearchForm mkwsTeam_' + m_teamName + '" action="" >\
+  <input class="mkwsQuery mkwsTeam_' + m_teamName + '" type="text" size="' + mkws_config.query_width + '" />\
+  <input class="mkwsButton mkwsTeam_' + m_teamName + '" type="submit" value="' + M('Search') + '" />\
 </form>');
-       });
 
        log("HTML records");
        // If the team has a .mkwsResults, populate it in the usual