From: Mike Taylor Date: Tue, 15 Apr 2014 15:54:22 +0000 (+0100) Subject: Add team.widgetTypes function, returns sorted list of contained types. X-Git-Tag: 1.0.0~951 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=d4b50ec914581fac42d48fb7ac1b8e798a80f179;p=mkws-moved-to-github.git Add team.widgetTypes function, returns sorted list of contained types. --- diff --git a/src/mkws-team.js b/src/mkws-team.js index 88745b7..8872eb3 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -755,6 +755,12 @@ function team($, teamName) { } } + 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]; }