X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fmkws-team.js;h=7ec9c2f3b700a0fecd77ef91687953d5b1a3789d;hb=9f066ca3996aaaa84fc41d1291edd112be939df5;hp=509fc2ff63febbecfdb96014cd17ab4ab0444acd;hpb=e41cdaf18a6fa7cb61034c77902cb2b0177eb108;p=mkws-moved-to-github.git
diff --git a/src/mkws-team.js b/src/mkws-team.js
index 509fc2f..7ec9c2f 100644
--- a/src/mkws-team.js
+++ b/src/mkws-team.js
@@ -408,7 +408,7 @@ mkws.makeTeam = function($, teamName) {
}
function renderDetails(data, marker) {
- var template = loadTemplate("Record");
+ var template = loadTemplate("details");
var details = template(data);
return '
' + details + '
';
@@ -417,11 +417,20 @@ mkws.makeTeam = function($, teamName) {
that.registerTemplate = function(name, text) {
+ if(mkws._old2new.hasOwnProperty(name)) {
+ mkws.log("Warning: registerTemplate old widget name: " + name + " => " + mkws._old2new[name]);
+ name = mkws._old2new[name];
+ }
m_templateText[name] = text;
};
function loadTemplate(name, fallbackString) {
+ if(mkws._old2new.hasOwnProperty(name)) {
+ mkws.log("Warning loadTemplate: old widget name: " + name + " => " + mkws._old2new[name]);
+ name = mkws._old2new[name];
+ }
+
var template = m_template[name];
if (template === undefined && Handlebars.compile) {
var source;
@@ -429,12 +438,6 @@ mkws.makeTeam = function($, teamName) {
if (node && node.length < 1) {
node = $(".mkws-template-" + name);
}
- if (node && node.length < 1) {
- node = $(".mkws-template_" + name + " .mkws-team-" + that.name());
- }
- if (node && node.length < 1) {
- node = $(".mkws-template_" + name);
- }
if (node) source = node.html();
if (!source) source = m_templateText[name];
if (source) {