Look for templates by class instead of as widgets
authorJason Skomorowski <jason@indexdata.com>
Mon, 19 May 2014 23:00:54 +0000 (19:00 -0400)
committerJason Skomorowski <jason@indexdata.com>
Mon, 19 May 2014 23:00:54 +0000 (19:00 -0400)
src/mkws-team.js

index 71c063c..519fd7e 100644 (file)
@@ -383,9 +383,9 @@ function team($, teamName) {
     if (template === undefined) {
       // Fall back to generic template if there is no team-specific one
       var source;
-      var node = widgetNode("Template_" + name);
-      if (!node) {
-        node = widgetNode("Template_" + name, "ALL");
+      var node = $(".mkwsTemplate_" + name + " .mkwsTeam_" + that.name());
+      if (node && node.length < 1) {
+        node = $(".mkwsTemplate_" + name);
       }
       if (node) {
         source = node.html();