From: Mike Taylor Date: Thu, 27 Feb 2014 10:53:27 +0000 (+0000) Subject: Make (vacuous) widget objects. X-Git-Tag: 1.0.0~1390^2~4 X-Git-Url: http://jsfdemo.indexdata.com/?a=commitdiff_plain;h=3465362833b175a4e4fbe6cdd4a6d63ddc031f3f;p=mkws-moved-to-github.git Make (vacuous) widget objects. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index c739684..3c273eb 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -148,6 +148,19 @@ if (mkws_config == null || typeof mkws_config != 'object') { } +// Factory function for widget objects. +function widget($, team, node) { + var that = { + team: team, + node: node + }; + + // ### More to do here, surely + + return that; +} + + // Factory function for team objects. As much as possible, this uses // only member variables (prefixed "m_") and inner functions with // private scope. Some functions are visibl as member-functions to be @@ -1411,6 +1424,8 @@ function team($, teamName) { mkws.teams[tname] = team(j, tname); debug("Made MKWS team '" + tname + "'"); } + var myTeam = mkws.teams[tname] + var myWidget = widget(j, myTeam, node) }); }); var now = $.now();