From 19d51272931f92c5c8a139e8aa8f9aa0314f6c61 Mon Sep 17 00:00:00 2001 From: ninioe Date: Wed, 20 Jul 2016 08:23:40 +0300 Subject: jshint & jscs cleanup --- web/app/controller/Root.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'web/app/controller') 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); } -- cgit v1.2.3