aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/edit
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-12-26 09:01:04 +0500
committerAbyss777 <abyss@fox5.ru>2017-12-28 09:13:37 +0500
commit54210c6f8bcd5d2e467d63aa5ac51389c8853b5f (patch)
tree603fca42924479dd6aca922e29008d5c1c68e828 /web/app/view/edit
parent19768f9c88958207a20a81bdfe7ee630bf400973 (diff)
downloadtrackermap-web-54210c6f8bcd5d2e467d63aa5ac51389c8853b5f.tar.gz
trackermap-web-54210c6f8bcd5d2e467d63aa5ac51389c8853b5f.tar.bz2
trackermap-web-54210c6f8bcd5d2e467d63aa5ac51389c8853b5f.zip
Implement disabling devices
Diffstat (limited to 'web/app/view/edit')
-rw-r--r--web/app/view/edit/Devices.js15
-rw-r--r--web/app/view/edit/Users.js2
2 files changed, 13 insertions, 4 deletions
diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js
index 39550b6c..6e581d4f 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 status = record.get('status'), result = '';
+ 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,
diff --git a/web/app/view/edit/Users.js b/web/app/view/edit/Users.js
index fd371990..b0a67ffd 100644
--- a/web/app/view/edit/Users.js
+++ b/web/app/view/edit/Users.js
@@ -133,7 +133,7 @@ Ext.define('Traccar.view.edit.Users', {
hidden: true,
filter: 'boolean'
}, {
- text: Strings.userDisabled,
+ text: Strings.sharedDisabled,
dataIndex: 'disabled',
renderer: Traccar.AttributeFormatter.getFormatter('disabled'),
filter: 'boolean'