aboutsummaryrefslogtreecommitdiff
path: root/web/app/store/PositionAttributes.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/store/PositionAttributes.js')
-rw-r--r--web/app/store/PositionAttributes.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/web/app/store/PositionAttributes.js b/web/app/store/PositionAttributes.js
index 6d6c0b7..ec1cbf8 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;
+ }
}
},