Remove two special-case clauses that cancelled out.
[mkws-moved-to-github.git] / tools / htdocs / mkws.js
index 0a62b9b..70ff3c3 100644 (file)
@@ -1294,11 +1294,6 @@ function _mkws_jquery_plugin ($) {
            }
        }
 
-       // Backwards compatibility: the special-case undefined team
-       // ### Will not be necessary when non-default teams are working
-       mkws.teams['AUTO'] = _make_mkws_team(j, "AUTO");
-       log("Made the unnamed MKWS team");
-
        // Find all nodes with class (NOT id) mkwsRecords, and
        // determine their team from the mkwsTeam_* class. So:
        //      <div class="mkwsRecords mkwsTeam_foo"/>
@@ -1313,13 +1308,11 @@ function _mkws_jquery_plugin ($) {
                    tname = cname.replace(/^mkwsTeam_/, '');
                }
            }
-           if (!tname) {
-               alert("No MKWS team specified for mkwsRecords element with classes '" + classes + "'");
-           } else if (mkws.teams[tname]) {
+           if (!tname)
+               tname = "AUTO";
+
+           if (mkws.teams[tname]) {
                log("MKWS team '" + tname + "' already exists, skipping");
-           } else if (tname === "AUTO") {
-               // ### For now: later, this will be how the backwards-compatibility is done
-               log("Skipping MKWS team '" + tname + "'");
            } else {
                mkws.teams[tname] = _make_mkws_team(j, tname);
                log("Made MKWS team '" + tname + "'");