From: Mike Taylor Date: Fri, 2 May 2014 16:02:51 +0000 (+0100) Subject: Reorder functions. X-Git-Tag: 1.0.0~741 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=ca8a466132753c8239f41680cb21edee8c7f4262;p=mkws-moved-to-github.git Reorder functions. --- diff --git a/src/mkws-team.js b/src/mkws-team.js index a853de1..4e91fce 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -418,6 +418,17 @@ function team($, teamName) { } } + that.widget = function(type) { + var list = m_widgets[type]; + + if (!list) + return undefined; + if (list.length > 1) { + alert("widget('" + type + "') finds " + list.length + " widgets: using first"); + } + return list[0]; + } + that.visitWidgets = function(callback) { for (var type in m_widgets) { var list = m_widgets[type]; @@ -431,17 +442,6 @@ function team($, teamName) { return undefined; } - that.widget = function(type) { - var list = m_widgets[type]; - - if (!list) - return undefined; - if (list.length > 1) { - alert("widget('" + type + "') finds " + list.length + " widgets: using first"); - } - return list[0]; - } - var lang = mkws.getParameterByName("lang") || mkws.config.lang; if (!lang || !mkws.locale_lang[lang]) {