aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/Devices.js
diff options
context:
space:
mode:
authorHans van den Elsen <hans.elsen@esds.nl>2016-03-14 20:49:04 +0100
committerHans van den Elsen <hans.elsen@esds.nl>2016-03-14 20:49:04 +0100
commit7fd1c08dd2f789ddd37ff075a6ebda1645947616 (patch)
tree75b715e6dd70f6be3357e1710c4db6f1f6a1e29e /web/app/view/Devices.js
parent4606737cc07b736f9c8f98ae680b928c94c082c8 (diff)
parent0a1019b59481b6bf8ee8989feb23cef084b6caf5 (diff)
downloadtrackermap-server-7fd1c08dd2f789ddd37ff075a6ebda1645947616.tar.gz
trackermap-server-7fd1c08dd2f789ddd37ff075a6ebda1645947616.tar.bz2
trackermap-server-7fd1c08dd2f789ddd37ff075a6ebda1645947616.zip
Merge remote-tracking branch 'refs/remotes/tananaev/master'
Diffstat (limited to 'web/app/view/Devices.js')
-rw-r--r--web/app/view/Devices.js31
1 files changed, 30 insertions, 1 deletions
diff --git a/web/app/view/Devices.js b/web/app/view/Devices.js
index ebe3ca195..b464ed561 100644
--- a/web/app/view/Devices.js
+++ b/web/app/view/Devices.js
@@ -62,6 +62,31 @@ Ext.define('Traccar.view.Devices', {
}]
},
+ bbar: [{
+ xtype: 'tbtext',
+ html: Strings.sharedSearch
+ }, {
+ xtype: 'textfield',
+ listeners: {
+ change: function () {
+ var tree, expr;
+ tree = this.up('treepanel');
+ expr = new RegExp(this.getValue(), 'i');
+ tree.store.filter({
+ id: 'nameFilter',
+ filterFn: function (node) {
+ var children, len, visible, i;
+ children = node.childNodes;
+ len = children && children.length;
+ visible = node.isLeaf() ? expr.test(node.get('name')) : false;
+ for (i = 0; i < len && !(visible = children[i].get('visible')); i++);
+ return visible;
+ }
+ });
+ }
+ }
+ }],
+
listeners: {
selectionchange: 'onSelectionChange',
beforeselect: 'onBeforeSelect'
@@ -89,7 +114,11 @@ Ext.define('Traccar.view.Devices', {
metaData.tdCls = 'status-color-unknown';
break;
}
- return Ext.Date.format(value, Traccar.Style.dateTimeFormat);
+ if (Traccar.app.getPreference('twelveHourFormat', false)) {
+ return Ext.Date.format(value, Traccar.Style.dateTimeFormat12);
+ } else {
+ return Ext.Date.format(value, Traccar.Style.dateTimeFormat24);
+ }
}
}
}]