From 6fd74c5d282616c0eadefa56f6ebde0731086c0c Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 28 Apr 2014 17:26:22 +0100 Subject: [PATCH] Switch widget now generates it own HTML. (For now it also generates a sub-widget, and we define that widget type -- UpperCase -- too. That's just as a proof of concept. I'll delete it in the next delta, but I want it in the VC history.) --- src/mkws-widgets.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/mkws-widgets.js b/src/mkws-widgets.js index c677853..d360730 100644 --- a/src/mkws-widgets.js +++ b/src/mkws-widgets.js @@ -332,3 +332,22 @@ mkws.registerWidgetType('Done', function() { $(that.node).html("Search complete: found " + n + " records"); }); }); + + +mkws.registerWidgetType('Switch', function() { + var tname = this.team.name(); + $(this.node).html('\ +Records \ +| \ +Targets \ +
foo
\ +'); +}); + + +mkws.registerWidgetType('UpperCase', function() { + var text = $(this.node).html(); + $(this.node).html(text.toUpperCase()); +}); + + -- 1.7.10.4