Completely remove the mkwsHtmlSwitch() function, since all it did was
authorMike Taylor <mike@indexdata.com>
Mon, 28 Apr 2014 16:29:45 +0000 (17:29 +0100)
committerMike Taylor <mike@indexdata.com>
Mon, 28 Apr 2014 16:29:45 +0000 (17:29 +0100)
generate the mkwsTargets inner HTML, which the widget now does for
itself.

src/mkws-team.js

index d52cc00..d0ebcc5 100644 (file)
@@ -412,8 +412,6 @@ function team($, teamName) {
         ranking_data += '</form>';
        findnode(".mkwsRanking").html(ranking_data);
 
-       mkwsHtmlSwitch();
-
        findnode('.mkwsSearchForm').submit(function() {
            var val = widgetNode('Query').val();
            newSearch(val);
@@ -549,17 +547,6 @@ function team($, teamName) {
     }
 
 
-    function mkwsHtmlSwitch() {
-       log("HTML targets");
-       var node = findnode(".mkwsTargets");
-       node.html('\
-<div class="mkwsBytarget mkwsTeam_' + m_teamName + '">\
-  No information available yet.\
-</div>');
-       node.css("display", "none");
-    }
-
-
     // Translation function. At present, this is properly a
     // global-level function (hence the assignment to mkws.M) but we
     // want to make it per-team so different teams can operate in