diff options
Diffstat (limited to 'web/app/store/PositionAttributes.js')
-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; + } } }, |