From: Mike Taylor Date: Wed, 23 Apr 2014 14:24:29 +0000 (+0100) Subject: filterSet factory accepts a team argument and stashes it for logging. X-Git-Tag: 1.0.0~885 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=b74bf4630c84387159714178e3544171907480af;p=mkws-moved-to-github.git filterSet factory accepts a team argument and stashes it for logging. --- diff --git a/src/mkws-filter.js b/src/mkws-filter.js index 290b0d0..877e8ff 100644 --- a/src/mkws-filter.js +++ b/src/mkws-filter.js @@ -1,8 +1,10 @@ // Factory function for sets of filters. -function filterSet() { - var that = {}; +function filterSet(team) { + var m_team = team; var m_list = []; + var that = {}; + that.list = function() { return m_list; }; @@ -16,9 +18,9 @@ function filterSet() { for (var i in m_list) { var filter = m_list[i]; if (matchFn(filter)) { - log("removeMatching() removing filter " + $.toJSON(filter)); + m_team.log("removeMatching() removing filter " + $.toJSON(filter)); } else { - log("removeMatching() keeping filter " + $.toJSON(filter)); + m_team.log("removeMatching() keeping filter " + $.toJSON(filter)); newList.push(filter); } }