Remove another misleading comment.
[mkws-moved-to-github.git] / src / mkws-team.js
index 98d586e..61f677d 100644 (file)
@@ -153,20 +153,6 @@ function team($, teamName) {
     }
 
 
-    ////////////////////////////////////////////////////////////////////////////////
-    ////////////////////////////////////////////////////////////////////////////////
-
-
-    // when search button pressed
-    function onFormSubmitEventHandler()
-    {
-       var val = findnode('.mkwsQuery').val();
-       newSearch(val);
-       return false;
-    }
-
-
-    // limit by target functions
     that.limitTarget  = function (id, name)
     {
        log("limitTarget(id=" + id + ", name=" + name + ")");
@@ -176,7 +162,6 @@ function team($, teamName) {
     }
 
 
-    // limit the query after clicking the facet
     that.limitQuery = function (field, value)
     {
        log("limitQuery(field=" + field + ", value=" + value + ")");
@@ -444,7 +429,11 @@ function team($, teamName) {
 
        mkwsHtmlSwitch();
 
-       findnode('.mkwsSearchForm').submit(onFormSubmitEventHandler);
+       findnode('.mkwsSearchForm').submit(function() {
+           var val = findnode('.mkwsQuery').val();
+           newSearch(val);
+           return false;
+       });
 
        // on first page, hide the termlist
        $(document).ready(function() { findnode(".mkwsTermlists").hide(); });
@@ -797,7 +786,5 @@ function team($, teamName) {
        }
     })();
 
-    // Bizarrely, 'that' is just an empty hash. All its state is in
-    // the closure variables defined earlier in this function.
     return that;
 };