diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-07-29 14:06:40 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-07-29 14:06:40 +1200 |
commit | cd0c04a03b359dfc5b1ea3f61b93aaae8f6fec3e (patch) | |
tree | 8cd9c56d723b723cc3dae97234d9a1830adcf2d5 /web/app/AttributeFormatter.js | |
parent | 88c95715221d78d834aef23a20be437eceee8006 (diff) | |
download | traccar-server-cd0c04a03b359dfc5b1ea3f61b93aaae8f6fec3e.tar.gz traccar-server-cd0c04a03b359dfc5b1ea3f61b93aaae8f6fec3e.tar.bz2 traccar-server-cd0c04a03b359dfc5b1ea3f61b93aaae8f6fec3e.zip |
Change alarm highlight logic
Diffstat (limited to 'web/app/AttributeFormatter.js')
-rw-r--r-- | web/app/AttributeFormatter.js | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js index c32849101..3432ca1e0 100644 --- a/web/app/AttributeFormatter.js +++ b/web/app/AttributeFormatter.js @@ -34,24 +34,6 @@ Ext.define('Traccar.AttributeFormatter', { return Ext.getStore('DistanceUnits').formatValue(value, Traccar.app.getPreference('distanceUnit')); }, - alarmFormatter: function (attributes) { - var value = ''; - if (attributes instanceof Object) {//for Traccar.view.Attributes - if (attributes.hasOwnProperty('alarm')) { - value = attributes.alarm; - if (typeof value === 'boolean') { - value = (value ? Ext.Msg.buttonText.yes : Ext.Msg.buttonText.no); - } - } - } else {//for Traccar.view.Report - value = attributes; - if (typeof value === 'boolean') { - value = (value ? Ext.Msg.buttonText.yes : Ext.Msg.buttonText.no); - } - } - return '<span style="color:red;">' + value + '</span>'; - }, - defaultFormatter: function (value) { if (typeof value === 'number') { return Number(value.toFixed(Traccar.Style.numberPrecision)); @@ -76,8 +58,6 @@ Ext.define('Traccar.AttributeFormatter', { return this.courseFormatter; } else if (key === 'distance' || key === 'odometer') { return this.distanceFormatter; - } else if (key === 'alarm') { - return this.alarmFormatter; } else { return this.defaultFormatter; } |