X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-team.js;h=02dc5ac8864ef2047d632a4a341bf77f3375eeb5;hb=ed4b067f8083566fa9de056fd7629278228bb2a5;hp=25a24d62ea594b38161ea65870e74159af6859bc;hpb=1c7c78281b920e8924c6ff210a01dd54ff7c534b;p=mkws-moved-to-github.git diff --git a/src/mkws-team.js b/src/mkws-team.js index 25a24d6..02dc5ac 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -386,7 +386,7 @@ function team($, teamName) { }; - function loadTemplate(name) { + function loadTemplate(name, fallbackString) { var template = m_template[name]; if (template === undefined) { @@ -400,10 +400,16 @@ function team($, teamName) { source = node.html(); } + // If the template is not defined in HTML, check the following + // in order: template registered in the team by a widget; + // fallback string provided on this invocation; global default. if (!source) { source = m_templateText[name]; } if (!source) { + source = fallbackString; + } + if (!source) { source = mkws.defaultTemplate(name); }