X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-team.js;h=0ddc962337aa069d3aa534d5cc69b19e7a1acf5e;hb=9fa64f9996f951cf9c573ab19c21ffc72bc55a88;hp=1ea6a6378552eef6687ec1055ae4d54209105ccd;hpb=b2d534358939d5b942863a9d5b4840221b6ad75d;p=mkws-moved-to-github.git diff --git a/src/mkws-team.js b/src/mkws-team.js index 1ea6a63..0ddc962 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -744,7 +744,7 @@ function team($, teamName) { that.addWidget = function(w) { if (!m_widgets[w.type]) { - m_widgets[w.type] = widget; + m_widgets[w.type] = w; log("Registered '" + w.type + "' widget in team '" + m_teamName + "'"); } else if (typeof(m_widgets[w.type]) !== 'number') { m_widgets[w.type] = 2; @@ -755,7 +755,13 @@ function team($, teamName) { } } - that.widget =function(type) { + that.widgetTypes = function() { + var keys = []; + for (var k in m_widgets) keys.push(k); + return keys.sort(); + } + + that.widget = function(type) { return m_widgets[type]; }