From: Mike Taylor Date: Mon, 28 Apr 2014 16:47:42 +0000 (+0100) Subject: New widgets Search and SearchForm. X-Git-Tag: 1.0.0~820 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=0195c1278f56643867bda7378d66f26f82cef43b;p=mkws-moved-to-github.git New widgets Search and SearchForm. --- diff --git a/src/mkws-widgets.js b/src/mkws-widgets.js index 570d3dd..90f1794 100644 --- a/src/mkws-widgets.js +++ b/src/mkws-widgets.js @@ -347,3 +347,27 @@ mkws.registerWidgetType('Switch', function() { | \ Targets'); }); + + +mkws.registerWidgetType('Search', function() { + var tname = this.team.name(); + var M = mkws.M; + + $(this.node).html('\ +
\ + \ + \ +
'); +}); + + +mkws.registerWidgetType('SearchForm', function() { + var team = this.team; + $(this.node).submit(function() { + var val = team.widget('Query').value(); + team.newSearch(val); + return false; + }); +}); + +