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/store | |
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/store')
-rw-r--r-- | web/app/store/PositionAttributes.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/web/app/store/PositionAttributes.js b/web/app/store/PositionAttributes.js index 6d6c0b71..ec1cbf84 100644 --- a/web/app/store/PositionAttributes.js +++ b/web/app/store/PositionAttributes.js @@ -236,14 +236,18 @@ Ext.define('Traccar.store.PositionAttributes', { valueType: 'string' }], - getAttributeName: function (key) { + getAttributeName: function (key, capitalize) { var model = this.getById(key); if (model) { return model.get('name'); } else { - return key.replace(/^./, function (match) { - return match.toUpperCase(); - }); + if (capitalize) { + return key.replace(/^./, function (match) { + return match.toUpperCase(); + }); + } else { + return key; + } } }, |