diff options
author | Abyss777 <abyss@fox5.ru> | 2017-09-14 09:38:14 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-09-14 09:38:14 +0500 |
commit | be47d612285d484e2d0a2aa43174fb8e36acd816 (patch) | |
tree | 311da517ca347969c290b06285b4451fdfc6e98b /web/app/AttributeFormatter.js | |
parent | a5d36c62facad98c409b9fcd4f8b92c3d47601ab (diff) | |
download | trackermap-web-be47d612285d484e2d0a2aa43174fb8e36acd816.tar.gz trackermap-web-be47d612285d484e2d0a2aa43174fb8e36acd816.tar.bz2 trackermap-web-be47d612285d484e2d0a2aa43174fb8e36acd816.zip |
Improve command type formatting
Diffstat (limited to 'web/app/AttributeFormatter.js')
-rw-r--r-- | web/app/AttributeFormatter.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js index 8a9e3dca..289aff91 100644 --- a/web/app/AttributeFormatter.js +++ b/web/app/AttributeFormatter.js @@ -130,6 +130,11 @@ Ext.define('Traccar.AttributeFormatter', { return null; }, + commandTypeFormatter: function (value) { + var name = Strings['command' + value.charAt(0).toUpperCase() + value.slice(1)]; + return name ? name : value; + }, + defaultFormatter: function (value) { if (typeof value === 'number') { return Number(value.toFixed(Traccar.Style.numberPrecision)); @@ -175,6 +180,8 @@ Ext.define('Traccar.AttributeFormatter', { return this.volumeFormatter; case 'driverUniqueId': return this.driverUniqueIdFormatter; + case 'commandType': + return this.commandTypeFormatter; default: return this.defaultFormatter; } |