Add new ConsoleBuilder widget that logs the widget to the console.
mkws.registerWidgetType('Builder', function() {
+ var that = this;
var team = this.team;
this.button = $('<button/>', {
'autosearch="' + query + '" ' +
'sort="' + sort + '" ' +
'perpage="' + perpage + '"></div>');
- alert(html);
+ var fn = that.callback || alert;
+ fn(html);
});
});
+
+mkws.registerWidgetType('ConsoleBuilder', function() {
+ mkws.promotionFunction('Builder').call(this);
+ this.callback = function(s) {
+ console.log("Generated widget: " + s);
+ }
+});