diff options
Diffstat (limited to 'web/app/controller')
-rw-r--r-- | web/app/controller/Root.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index 3a7f24bca..90923fe53 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -89,9 +89,9 @@ Ext.define('Traccar.controller.Root', { } }, - beep: function() { - if(this.snd == null){ - this.snd = new Audio("beep.wav"); + beep: function () { + if (this.snd === null) { + this.snd = new Audio('beep.wav'); } this.snd.play(); }, @@ -163,8 +163,8 @@ Ext.define('Traccar.controller.Root', { text = alarmKey; } for (j = 0; j < data.positions.length; j++) { - if (data.positions[j].id === array[i].positionId && data.positions[j].attributes.alarm != null) { - if (typeof data.positions[j].attributes.alarm === 'string' && data.positions[j].attributes.alarm.length >= 2){ + if (data.positions[j].id === array[i].positionId && data.positions[j].attributes.alarm !== null) { + if (typeof data.positions[j].attributes.alarm === 'string' && data.positions[j].attributes.alarm.length >= 2) { alarmKey = 'alarm' + data.positions[j].attributes.alarm.charAt(0).toUpperCase() + data.positions[j].attributes.alarm.slice(1); text = Strings[alarmKey]; if (typeof text === 'undefined') { @@ -189,7 +189,7 @@ Ext.define('Traccar.controller.Root', { } device = Ext.getStore('Devices').getById(array[i].deviceId); if (typeof device !== 'undefined') { - if(self.showAlarmSelected()){ + if (self.showAlarmSelected()) { self.beep(); Ext.toast(text, device.getData().name); } |