if (blanket) blanket.css('display', 'block');
if (motd) motd.css('display', 'none');
break;
- case 'none':
- alert("mkws.switchView(" + m_teamName + ", 'none') shouldn't happen");
- if (targets) targets.css('display', 'none');
- if (results) results.css('display', 'none');
- if (blanket) blanket.css('display', 'none');
- if (motd) motd.css('display', 'none');
- break;
default:
alert("Unknown view '" + view + "'");
}
};
- /*
- * All the HTML stuff to render the search forms and
- * result pages.
- */
- function mkwsHtmlAll() {
- var container = findnode(".mkwsMOTDContainer");
- if (container.length) {
- // Move the MOTD from the provided element down into the container
- findnode(".mkwsMOTD").appendTo(container);
- }
- }
-
-
- function mkwsSetLang() {
- var lang = mkws.getParameterByName("lang") || m_config.lang;
- if (!lang || !mkws.locale_lang[lang]) {
- m_config.lang = ""
- } else {
- m_config.lang = lang;
- }
-
- log("Locale language: " + (m_config.lang ? m_config.lang : "none"));
- return m_config.lang;
- }
-
-
// 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
that.addWidget = function(w) {
if (!m_widgets[w.type]) {
m_widgets[w.type] = w;
- log("Registered '" + w.type + "' widget in team '" + m_teamName + "'");
+ //log("Added '" + w.type + "' widget to team '" + m_teamName + "'");
} else if (typeof(m_widgets[w.type]) !== 'number') {
m_widgets[w.type] = 2;
- log("Registered duplicate '" + w.type + "' widget in team '" + m_teamName + "'");
+ //log("Added duplicate '" + w.type + "' widget to team '" + m_teamName + "'");
} else {
m_widgets[w.type] += 1;
- log("Registered '" + w.type + "' widget #" + m_widgets[w.type] + "' in team '" + m_teamName + "'");
+ //log("Added '" + w.type + "' widget #" + m_widgets[w.type] + "' to team '" + m_teamName + "'");
}
}
return m_widgets[type];
}
- mkwsHtmlAll()
- mkwsSetLang();
+
+ var lang = mkws.getParameterByName("lang") || m_config.lang;
+ if (!lang || !mkws.locale_lang[lang]) {
+ m_config.lang = ""
+ } else {
+ m_config.lang = lang;
+ }
+
+ log("Locale language: " + (m_config.lang ? m_config.lang : "none"));
return that;
};