From b0aa9bab78f0357d90040cbfbc1f25d4bdcddeb1 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 28 Mar 2014 17:01:54 +0000 Subject: [PATCH] Each widget now has its own config object, inheriting from the team confirm, which inherits from the MKWS config, which inherits from the default config. W00t! --- src/mkws-widgets.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mkws-widgets.js b/src/mkws-widgets.js index 2366614..2056c48 100644 --- a/src/mkws-widgets.js +++ b/src/mkws-widgets.js @@ -3,7 +3,8 @@ function widget($, team, type, node) { var that = { team: team, type: type, - node: node + node: node, + config: Object.create(team.config()) }; function log(s) { @@ -87,7 +88,7 @@ mkws.registerWidgetType('Termlists', function() { } // no facets: this should never happen - var facets = mkws.config.facets; + var facets = that.config.facets; if (!facets || facets.length == 0) { alert("onTerm called even though we have no facets: " + $.toJSON(data)); $(that.node).hide(); -- 1.7.10.4