aboutsummaryrefslogtreecommitdiff
path: root/web/app/controller/Root.js
diff options
context:
space:
mode:
authorninioe <ninioe@gmail.com>2016-07-20 08:23:40 +0300
committerninioe <ninioe@gmail.com>2016-07-20 08:23:40 +0300
commit19d51272931f92c5c8a139e8aa8f9aa0314f6c61 (patch)
tree7330320e4221f52c7ebf5ee93d94160ba198e829 /web/app/controller/Root.js
parent6d1e5f977b211128757aac4dd2da316211cc6fa5 (diff)
downloadtrackermap-server-19d51272931f92c5c8a139e8aa8f9aa0314f6c61.tar.gz
trackermap-server-19d51272931f92c5c8a139e8aa8f9aa0314f6c61.tar.bz2
trackermap-server-19d51272931f92c5c8a139e8aa8f9aa0314f6c61.zip
jshint & jscs cleanup
Diffstat (limited to 'web/app/controller/Root.js')
-rw-r--r--web/app/controller/Root.js12
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);
}