From 4dcc97ce9c268cc0c9e08f4719a7031cb6c31410 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 24 Jan 2014 12:32:28 +0000 Subject: [PATCH] mkws.run_auto_searches() moved out of team object. --- tools/htdocs/mkws.js | 54 +++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 1a0782d..b332500 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -1001,33 +1001,6 @@ function _make_mkws_team($, teamName) { } - mkws.run_auto_searches = function() { - debug("running auto searches"); - - $('[id^="mkwsRecords"]').each(function () { - var node = $(this); - var query = node.attr('autosearch'); - - if (query) { - var windowid = undefined; - var id = node.attr('id'); - if (id.match(/^mkwsRecords_/, '')) { - windowid = id.replace(/^mkwsRecords_/, ''); - } - - var sort = node.attr('sort'); - var targets = node.attr('targets'); - var s = "running auto search: '" + query + "'"; - if (windowid) s += " [windowid '" + windowid + "']"; - if (sort) s += " sorted by '" + sort + "'"; - if (targets) s += " in targets '" + targets + "'"; - debug(s); - newSearch(query, sort, targets, windowid); - } - }); - } - - // implement $.parseQuerystring() for parsing URL parameters function parseQuerystring() { var nvpair = {}; @@ -1456,4 +1429,31 @@ function _mkws_jquery_plugin ($) { mkws.run_auto_searches(); }); } + + + mkws.run_auto_searches = function() { + debug("running auto searches"); + + $('[id^="mkwsRecords"]').each(function () { + var node = $(this); + var query = node.attr('autosearch'); + + if (query) { + var windowid = undefined; + var id = node.attr('id'); + if (id.match(/^mkwsRecords_/, '')) { + windowid = id.replace(/^mkwsRecords_/, ''); + } + + var sort = node.attr('sort'); + var targets = node.attr('targets'); + var s = "running auto search: '" + query + "'"; + if (windowid) s += " [windowid '" + windowid + "']"; + if (sort) s += " sorted by '" + sort + "'"; + if (targets) s += " in targets '" + targets + "'"; + debug(s); + newSearch(query, sort, targets, windowid); + } + }); + } })(jQuery); -- 1.7.10.4