X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-team.js;h=2bac42e7db5b35fafc42d61b4ddb7a51c2ce0a52;hb=df80064d8405815290f51c1f49a014273bb8e1c6;hp=759a1a785b5b6c15b85824cc4dbaa4b0377a4f60;hpb=15c9f739698073ae375a4dc8822fa5b366351a33;p=mkws-moved-to-github.git diff --git a/src/mkws-team.js b/src/mkws-team.js index 759a1a7..2bac42e 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -314,13 +314,6 @@ function team($, teamName) { 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 + "'"); } @@ -348,32 +341,6 @@ function team($, teamName) { }; - /* - * 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 @@ -483,8 +450,15 @@ function team($, 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; };