X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-filter.js;h=4943ca15d5aad1a402e7db09f147a7be10ca4413;hb=c6b0e0a333fcf696f90333f28fbebcd3c228dea3;hp=353fce57494854a2e1ae86650f1995661a645cd0;hpb=1fa8c5e2e7cf9ed6aff2ace6fe36e6ea2334917a;p=mkws-moved-to-github.git diff --git a/src/mkws-filter.js b/src/mkws-filter.js index 353fce5..4943ca1 100644 --- a/src/mkws-filter.js +++ b/src/mkws-filter.js @@ -56,37 +56,21 @@ function filterSet(team) { }; that.pp2filter = function() { - var OLD = that.OLD_pp2filter(); - var NEW = that.NEW_pp2filter(); - if (OLD !== NEW) { - alert("pp2filter(): OLD[" + OLD + "] !== NEW[" + NEW + "]"); - } - return OLD; - }; - - that.OLD_pp2filter = function() { var res = ""; - for (var i in m_list) { - var filter = m_list[i]; - if (filter.id) { - if (res) res += ","; - if (filter.id.match(/^[a-z:]+[=~]/)) { - m_team.log("filter '" + filter.id + "' already begins with SETTING OP"); - } else { - filter.id = 'pz:id=' + filter.id; - } - res += filter.id; + that.visitTargets(function(id, name) { + if (res) res += ","; + if (id.match(/^[a-z:]+[=~]/)) { + m_team.log("filter '" + id + "' already begins with SETTING OP"); + } else { + id = 'pz:id=' + id; } - } + res += id; + }); return res; }; - that.NEW_pp2filter = function() { - return that.OLD_pp2filter(); - }; - that.pp2limit = function(initial) { var res = initial || "";