From: Mike Taylor Date: Mon, 28 Apr 2014 16:26:22 +0000 (+0100) Subject: Switch widget now generates it own HTML. X-Git-Tag: 1.0.0~824 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=6fd74c5d282616c0eadefa56f6ebde0731086c0c;hp=8810aad21ee1db44c7f078cb26e278bce2f9488a;p=mkws-moved-to-github.git 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.) --- 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()); +}); + +