From 6aff4689bf259a9c8f903f9bcf4ac7a178b167c1 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 26 Mar 2014 17:07:01 +0000 Subject: [PATCH] Register widget-types only once, at the end. --- src/mkws-widgets.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/mkws-widgets.js b/src/mkws-widgets.js index 9ba58bb..5f25cd6 100644 --- a/src/mkws-widgets.js +++ b/src/mkws-widgets.js @@ -15,15 +15,6 @@ function widget($, team, type, node) { return '[Widget ' + team.name() + ':' + type + ']'; } - mkws.registerWidgetType('Targets', promoteTargets); - mkws.registerWidgetType('Stat', promoteStat); - mkws.registerWidgetType('Termlists', promoteTermlists); - mkws.registerWidgetType('Pager', promotePager); - mkws.registerWidgetType('Records', promoteRecords); - mkws.registerWidgetType('Navi', promoteNavi); - mkws.registerWidgetType('Sort', promoteSort); - mkws.registerWidgetType('Perpage', promotePerpage); - var promote = mkws.promotionFunction(type); if (promote) { promote.call(that); @@ -298,3 +289,13 @@ function widget($, team, type, node) { return false; }); } + + mkws.registerWidgetType('Targets', promoteTargets); + mkws.registerWidgetType('Stat', promoteStat); + mkws.registerWidgetType('Termlists', promoteTermlists); + mkws.registerWidgetType('Pager', promotePager); + mkws.registerWidgetType('Records', promoteRecords); + mkws.registerWidgetType('Navi', promoteNavi); + mkws.registerWidgetType('Sort', promoteSort); + mkws.registerWidgetType('Perpage', promotePerpage); + -- 1.7.10.4