(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.)
$(that.node).html("Search complete: found " + n + " records");
});
});
+
+
+mkws.registerWidgetType('Switch', function() {
+ var tname = this.team.name();
+ $(this.node).html('\
+<a href="#" onclick="mkws.switchView(\'' + tname + '\', \'records\')">Records</a><span> \
+| \
+</span><a href="#" onclick="mkws.switchView(\'' + tname + '\', \'targets\')">Targets</a> \
+<div class="mkwsUpperCase">foo</div>\
+');
+});
+
+
+mkws.registerWidgetType('UpperCase', function() {
+ var text = $(this.node).html();
+ $(this.node).html(text.toUpperCase());
+});
+
+