From 0195c1278f56643867bda7378d66f26f82cef43b Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 28 Apr 2014 17:47:42 +0100 Subject: [PATCH] New widgets Search and SearchForm. --- src/mkws-widgets.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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; + }); +}); + + -- 1.7.10.4