X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fmkws-widgets.js;h=7f218be545beb4f65c100766fd07258b00f51b74;hb=d26ab9999daa36225232281061ab1f7ef3c1d02f;hp=79e83eb39992ea305b36688e7fec70a3ae023975;hpb=d4dacd0215f4f025cd15202f0aeb3ec5ccfc35fd;p=mkws-moved-to-github.git diff --git a/src/mkws-widgets.js b/src/mkws-widgets.js index 79e83eb..7f218be 100644 --- a/src/mkws-widgets.js +++ b/src/mkws-widgets.js @@ -59,12 +59,8 @@ function widget($, team, type, node) { } -// This is a utility function that can be used by all widgets that can -// invoke an autosearch. It properly belongs to the widget superclass, -// but since there are no classes in JavaScript there's no scope for -// it to live in, hence its being put into the mkws object. - -mkws.maybeAutosearch = function(widget) { +// Utility function for use by all widgets that can invoke autosearch. +widget.maybeAutosearch = function(widget) { var query = widget.config.autosearch; if (query) { if (query.match(/^!param!/)) { @@ -310,7 +306,7 @@ mkws.registerWidgetType('Records', function() { } }); - mkws.maybeAutosearch(that); + widget.maybeAutosearch(that); });