From: Mike Taylor Date: Wed, 26 Mar 2014 17:07:01 +0000 (+0000) Subject: Register widget-types only once, at the end. X-Git-Tag: 1.0.0~1183 X-Git-Url: http://jsfdemo.indexdata.com/?a=commitdiff_plain;h=6aff4689bf259a9c8f903f9bcf4ac7a178b167c1;p=mkws-moved-to-github.git Register widget-types only once, at the end. --- 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); +