From 86f54b5db9269d0ba010a22e281b379bdae3751f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 29 Mar 2017 20:20:21 +1300 Subject: Minor adjustment to the devices table --- web/app/view/edit/Devices.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'web/app/view') diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js index d4970eb5..9393b432 100644 --- a/web/app/view/edit/Devices.js +++ b/web/app/view/edit/Devices.js @@ -21,6 +21,7 @@ Ext.define('Traccar.view.edit.Devices', { requires: [ 'Ext.grid.filters.Filters', + 'Traccar.AttributeFormatter', 'Traccar.view.edit.DevicesController' ], @@ -128,18 +129,6 @@ Ext.define('Traccar.view.edit.Devices', { return group ? group.get('name') : value; } } - }, { - text: Strings.deviceLastUpdate, - dataIndex: 'lastUpdate', - renderer: function (value) { - if (value) { - if (Traccar.app.getPreference('twelveHourFormat', false)) { - return Ext.Date.format(value, Traccar.Style.dateTimeFormat12); - } else { - return Ext.Date.format(value, Traccar.Style.dateTimeFormat24); - } - } - } }, { text: Strings.deviceStatus, dataIndex: 'status', @@ -159,6 +148,10 @@ Ext.define('Traccar.view.edit.Devices', { } } } + }, { + text: Strings.deviceLastUpdate, + dataIndex: 'lastUpdate', + renderer: Traccar.AttributeFormatter.getFormatter('lastUpdate') }] } }); -- cgit v1.2.3