that.limitTarget = function(id, name) {
log("limitTarget(id=" + id + ", name=" + name + ")");
- m_filters.push({ id: id, name: name });
+ m_filters.push(filter(id, name));
triggerSearch();
return false;
};
that.limitQuery = function(field, value) {
log("limitQuery(field=" + field + ", value=" + value + ")");
- m_filters.push({ field: field, value: value });
+ m_filters.push(filter(null, null, field, value));
triggerSearch();
return false;
};
that.limitCategory = function(id) {
log("limitCategory(id=" + id + ")");
- m_filters.push({ category: id });
- //triggerSearch();
+ // ### Add a filter
+ // ### triggerSearch() if there's a query
return false;
};
m_perpage = perpage;
}
if (targets) {
- m_filters.push({ id: targets, name: targets });
+ m_filters.push(filter(id, id));
}
for (var i in m_filters) {