aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/ArrayListFilter.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-06-26 12:00:15 +0500
committerAbyss777 <abyss@fox5.ru>2018-06-26 13:55:11 +0500
commit17157262fef1c046d116b2270f4e1d335fe9da1b (patch)
tree751583dde65b666e4ab249b26010b7bec6f279b6 /web/app/view/ArrayListFilter.js
parentd67213556dcc87453c0ad5cd6f9e8851c477a2f3 (diff)
downloadtrackermap-web-17157262fef1c046d116b2270f4e1d335fe9da1b.tar.gz
trackermap-web-17157262fef1c046d116b2270f4e1d335fe9da1b.tar.bz2
trackermap-web-17157262fef1c046d116b2270f4e1d335fe9da1b.zip
Implement refactored notifications
Diffstat (limited to 'web/app/view/ArrayListFilter.js')
-rw-r--r--web/app/view/ArrayListFilter.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/web/app/view/ArrayListFilter.js b/web/app/view/ArrayListFilter.js
index b6c1512f..e8d1c130 100644
--- a/web/app/view/ArrayListFilter.js
+++ b/web/app/view/ArrayListFilter.js
@@ -25,7 +25,7 @@ Ext.define('Traccar.view.ArrayListFilter', {
constructor: function (config) {
this.callParent([config]);
this.filter.setFilterFn(function (item) {
- var i, property, value;
+ var i, property, value, splits;
property = item.get(this.getProperty());
value = this.getValue();
if (Ext.isArray(property)) {
@@ -34,6 +34,13 @@ Ext.define('Traccar.view.ArrayListFilter', {
return true;
}
}
+ } else if (property.indexOf(',') !== -1) {
+ splits = property.split(/[ ,]+/).filter(Boolean);
+ for (i = 0; i < splits.length; i++) {
+ if (value.indexOf(splits[i]) !== -1) {
+ return true;
+ }
+ }
} else if (value.indexOf(property) !== -1) {
return true;
}