projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a46a001
)
Add pp2filter method.
author
Mike Taylor
<mike@indexdata.com>
Wed, 23 Apr 2014 14:30:32 +0000
(15:30 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Wed, 23 Apr 2014 14:30:32 +0000
(15:30 +0100)
src/mkws-filter.js
patch
|
blob
|
history
diff --git
a/src/mkws-filter.js
b/src/mkws-filter.js
index
877e8ff
..
aa3a204
100644
(file)
--- a/
src/mkws-filter.js
+++ b/
src/mkws-filter.js
@@
-37,6
+37,26
@@
function filterSet(team) {
return false;
}
+ that.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;
+ }
+ }
+
+ return res;
+ }
+
return that;
}