1 // Factory function for sets of filters.
6 that.list = function() {
10 that.add = function(filter) {
14 that.removeMatching = function(matchFn) {
16 for (var i in m_list) {
17 var filter = m_list[i];
18 if (matchFn(filter)) {
19 log("removeMatching() removing filter " + $.toJSON(filter));
21 log("removeMatching() keeping filter " + $.toJSON(filter));
28 that.targetFiltered = function(id) {
29 for (var i = 0; i < m_list.length; i++) {
30 if (m_list[i].id === id ||
31 m_list[i].id === 'pz:id=' + id) {
42 // Factory function for filters. These can be of several types.
43 function filter(id, name, field, value) {
47 res = { id: id, name: name };
49 res = { field: field, value: value };