X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-widget-main.js;h=92716027b0639467e1209637f95bb1b3504e3fd4;hb=1db9063acc50726bd54f3530084b31c44a8402f0;hp=161f61fe7355fbed9dc16c4691b413d8881a42c7;hpb=16708a6aebe10acd3b72bcb20b03c54d1195a1b9;p=mkws-moved-to-github.git diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index 161f61f..9271602 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -405,6 +405,21 @@ mkws.registerWidgetType('MOTD', function() { }); +// This widget has no functionality of its own, but its configuration +// is copied up into its team, allowing it to affect other widgets in +// the team. +// +mkws.registerWidgetType('Config', function() { + var c = this.config; + for (var name in c) { + if (c.hasOwnProperty(name)) { + this.team.config()[name] = c[name]; + this.log(this + " copied property " + name + "='" + c[name] + "' up to team"); + } + } +}); + + // Some elements have mkws* classes that makes them appear as widgets // -- for example, because we want to style them using CSS -- but have // no actual functionality. We register these to prevent ignorable