diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-12-28 21:52:37 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-28 21:52:37 +1300 |
commit | 1a3ac155bb9185f0d97ca81e5fbb3c9c3b2a55a8 (patch) | |
tree | 3403fc98502d7a1778d0290b3a903aad6eab2dde /web/app/view/edit/Devices.js | |
parent | 19768f9c88958207a20a81bdfe7ee630bf400973 (diff) | |
parent | 77a645466f0e3fae1c0125e8baadd5dea29d1935 (diff) | |
download | trackermap-web-1a3ac155bb9185f0d97ca81e5fbb3c9c3b2a55a8.tar.gz trackermap-web-1a3ac155bb9185f0d97ca81e5fbb3c9c3b2a55a8.tar.bz2 trackermap-web-1a3ac155bb9185f0d97ca81e5fbb3c9c3b2a55a8.zip |
Merge pull request #634 from Abyss777/disable_device
Implement disabling devices
Diffstat (limited to 'web/app/view/edit/Devices.js')
-rw-r--r-- | web/app/view/edit/Devices.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js index 39550b6c..2f7f80ee 100644 --- a/web/app/view/edit/Devices.js +++ b/web/app/view/edit/Devices.js @@ -81,11 +81,14 @@ Ext.define('Traccar.view.edit.Devices', { viewConfig: { enableTextSelection: true, getRowClass: function (record) { - var status = record.get('status'); + var result = '', status = record.get('status'); + if (record.get('disabled')) { + result = 'view-item-disabled '; + } if (status) { - return Ext.getStore('DeviceStatuses').getById(status).get('color'); + result += Ext.getStore('DeviceStatuses').getById(status).get('color'); } - return null; + return result; } }, @@ -125,6 +128,12 @@ Ext.define('Traccar.view.edit.Devices', { }, renderer: Traccar.AttributeFormatter.getFormatter('groupId') }, { + text: Strings.sharedDisabled, + dataIndex: 'disabled', + renderer: Traccar.AttributeFormatter.getFormatter('disabled'), + hidden: true, + filter: 'boolean' + }, { text: Strings.sharedGeofences, dataIndex: 'geofenceIds', hidden: true, |