diff options
author | Abyss777 <abyss@fox5.ru> | 2017-05-19 09:25:53 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-05-19 09:25:53 +0500 |
commit | 3cd2d2e792d558886e404913780116d99a443d74 (patch) | |
tree | 9aec911b9af73dfdcd2db6e8514887a34aaa5eec /web/app/view/permissions | |
parent | 788a499b346724d753798597fb18f8aef17e1588 (diff) | |
download | trackermap-web-3cd2d2e792d558886e404913780116d99a443d74.tar.gz trackermap-web-3cd2d2e792d558886e404913780116d99a443d74.tar.bz2 trackermap-web-3cd2d2e792d558886e404913780116d99a443d74.zip |
Position attribute name rendering optimization
Diffstat (limited to 'web/app/view/permissions')
-rw-r--r-- | web/app/view/permissions/DeviceAttributes.js | 7 | ||||
-rw-r--r-- | web/app/view/permissions/GroupAttributes.js | 7 | ||||
-rw-r--r-- | web/app/view/permissions/UserAttributes.js | 7 |
3 files changed, 3 insertions, 18 deletions
diff --git a/web/app/view/permissions/DeviceAttributes.js b/web/app/view/permissions/DeviceAttributes.js index baca9d3e..2ce07633 100644 --- a/web/app/view/permissions/DeviceAttributes.js +++ b/web/app/view/permissions/DeviceAttributes.js @@ -32,12 +32,7 @@ Ext.define('Traccar.view.permissions.DeviceAttributes', { flex: 1, minWidth: Traccar.Style.columnWidthNormal, renderer: function (value) { - var attribute = Ext.getStore('PositionAttributes').getById(value); - if (attribute) { - return attribute.get('name'); - } else { - return value; - } + return Ext.getStore('PositionAttributes').getAttributeName(value); } }] } diff --git a/web/app/view/permissions/GroupAttributes.js b/web/app/view/permissions/GroupAttributes.js index 3972dbec..44089daf 100644 --- a/web/app/view/permissions/GroupAttributes.js +++ b/web/app/view/permissions/GroupAttributes.js @@ -32,12 +32,7 @@ Ext.define('Traccar.view.permissions.GroupAttributes', { flex: 1, minWidth: Traccar.Style.columnWidthNormal, renderer: function (value) { - var attribute = Ext.getStore('PositionAttributes').getById(value); - if (attribute) { - return attribute.get('name'); - } else { - return value; - } + return Ext.getStore('PositionAttributes').getAttributeName(value); } }] } diff --git a/web/app/view/permissions/UserAttributes.js b/web/app/view/permissions/UserAttributes.js index 8a8a4543..7bca6223 100644 --- a/web/app/view/permissions/UserAttributes.js +++ b/web/app/view/permissions/UserAttributes.js @@ -32,12 +32,7 @@ Ext.define('Traccar.view.permissions.UserAttributes', { flex: 1, minWidth: Traccar.Style.columnWidthNormal, renderer: function (value) { - var attribute = Ext.getStore('PositionAttributes').getById(value); - if (attribute) { - return attribute.get('name'); - } else { - return value; - } + return Ext.getStore('PositionAttributes').getAttributeName(value); } }] } |