New file, mkws-widget-log.js
authorMike Taylor <mike@indexdata.com>
Mon, 31 Mar 2014 16:19:46 +0000 (17:19 +0100)
committerMike Taylor <mike@indexdata.com>
Mon, 31 Mar 2014 16:19:46 +0000 (17:19 +0100)
src/mkws-widget-log.js [new file with mode: 0644]

diff --git a/src/mkws-widget-log.js b/src/mkws-widget-log.js
new file mode 100644 (file)
index 0000000..05af4fa
--- /dev/null
@@ -0,0 +1,7 @@
+mkws.registerWidgetType('Log', function() {
+    var that = this;
+
+    this.team.queue("log").subscribe(function(teamName, timestamp, message) {
+       $(that.node).append(teamName + ": " + timestamp + message + "<br/>");
+    });
+});