From 58e7a7c64104914f7eab3ae74fde1a22eab79a60 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 7 Feb 2014 15:38:36 +0000 Subject: [PATCH] mkws.delimitTarget() and delimitQuery() now accept a team-name and delegate to the appropriate team's member-functions of the same name. --- tools/htdocs/mkws.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 7747094..a3e2dcf 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -568,7 +568,7 @@ function team($, teamName) { } - mkws.delimitQuery = function (field, value) + that.delimitQuery = function (field, value) { debug("delimitQuery(field=" + field + ", value=" + value + ")"); var newFilters = []; @@ -593,7 +593,7 @@ function team($, teamName) { } - mkws.delimitTarget = function (id) + that.delimitTarget = function (id) { debug("delimitTarget(id=" + id + ")"); var newFilters = []; @@ -628,11 +628,11 @@ function team($, teamName) { } var filter = m_filters[i]; if (filter.id) { - text += M('source') + ': ' + filter.name + ''; + text += M('source') + ': ' + filter.name + ''; } else { - text += M(filter.field) + ': ' + filter.value + ''; } } @@ -1393,6 +1393,13 @@ function _mkws_jquery_plugin ($) { mkws.teams[tname].limitQuery(field, value); } + mkws.delimitTarget = function (tname, id) { + mkws.teams[tname].delimitTarget(id); + } + + mkws.delimitQuery = function (tname, field, value) { + mkws.teams[tname].delimitQuery(field, value); + } function default_mkws_config() { /* default mkws config */ -- 1.7.10.4