X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=tools%2Fhtdocs%2Fmkws.js;h=03cd18ef6735fc889cdae2c7cec1bedd4cd1e905;hb=8455cc39538aeafe0191a15ec3b670d3fbbdd912;hp=870fdba97ab379d2861e15adbdba44edb7492723;hpb=891e2d61c78e230089dd6d3d3d8d97210141b1c0;p=mkws-moved-to-github.git diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 870fdba..03cd18e 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -141,7 +141,7 @@ if (mkws_config == null || typeof mkws_config != 'object') { // wrapper for jQuery lib -function _make_mkws_team($, teamName) { +function team($, teamName) { var that = {}; var m_teamName = teamName; var m_submitted = false; @@ -162,10 +162,11 @@ function _make_mkws_team($, teamName) { // if (console && console.log) // disabled, will fail in IE8 - // console.log("run _make_mkws_team(" + (teamName ? teamName : "") + ")"); + // console.log("run team(" + (teamName ? teamName : "") + ")"); - // Needs to be defined inside _make_mkws_team() so it can see m_debug_time + // Needs to be defined inside team() so it can see m_debug_time + // ### member access won't work: there is only one instance of this function mkws.debug_function = function (string) { if (!mkws.debug_level) return; @@ -425,7 +426,11 @@ function _make_mkws_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; } @@ -1276,7 +1281,7 @@ function _mkws_jquery_plugin ($) { }; -// wrapper to call _make_mkws_team() after page load +// wrapper to call team() after page load (function (j) { function log(s) { if (typeof console === "undefined" || typeof console.log === "undefined") { /* ARGH!!! old IE */ @@ -1315,7 +1320,7 @@ function _mkws_jquery_plugin ($) { if (mkws.teams[tname]) { log("MKWS team '" + tname + "' already exists, skipping"); } else { - mkws.teams[tname] = _make_mkws_team(j, tname); + mkws.teams[tname] = team(j, tname); log("Made MKWS team '" + tname + "'"); } });