Whitespace.
[mkws-moved-to-github.git] / src / mkws-team.js
index 1ea6a63..0ddc962 100644 (file)
@@ -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];
     }