aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorninioe <ninioe@gmail.com>2016-07-19 15:12:38 +0300
committerninioe <ninioe@gmail.com>2016-07-19 15:12:38 +0300
commite954e95547d05a34bbd36e3aa5003f4ddaf2ccd0 (patch)
treecbe6fda50d095cfc8d8c267a82feaa8812643fba /web
parentbfa3fa62305858166d8acdcf6da4a6d33249877d (diff)
downloadtrackermap-server-e954e95547d05a34bbd36e3aa5003f4ddaf2ccd0.tar.gz
trackermap-server-e954e95547d05a34bbd36e3aa5003f4ddaf2ccd0.tar.bz2
trackermap-server-e954e95547d05a34bbd36e3aa5003f4ddaf2ccd0.zip
changes Anton asked me
Diffstat (limited to 'web')
-rw-r--r--web/app/controller/Root.js13
-rw-r--r--web/beep.wavbin0 -> 3047 bytes
-rw-r--r--web/l10n/en.json17
3 files changed, 17 insertions, 13 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js
index b508cc5ef..3a7f24bca 100644
--- a/web/app/controller/Root.js
+++ b/web/app/controller/Root.js
@@ -91,7 +91,7 @@ Ext.define('Traccar.controller.Root', {
beep: function() {
if(this.snd == null){
- this.snd = new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVd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Ikk7Vd+sxEhBQMRU8j/12UIRhzSaUdQ+rQU5kGeFxm+hb1oh6pWWmv3uvmReDl0UnvtapVaIzo1jZbf/pD6ElLqSX+rUmOQNpJFa/r+sa4e/pBlAABoAAAAA3CUgShLdGIxsY7AUABPRrgCABdDuQ5GC7DqPQCgbbJUAoRSUj+NIEig0YfyWUho1VBBBA//uQZB4ABZx5zfMakeAAAAmwAAAAF5F3P0w9GtAAACfAAAAAwLhMDmAYWMgVEG1U0FIGCBgXBXAtfMH10000EEEEEECUBYln03TTTdNBDZopopYvrTTdNa325mImNg3TTPV9q3pmY0xoO6bv3r00y+IDGid/9aaaZTGMuj9mpu9Mpio1dXrr5HERTZSmqU36A3CumzN/9Robv/Xx4v9ijkSRSNLQhAWumap82WRSBUqXStV/YcS+XVLnSS+WLDroqArFkMEsAS+eWmrUzrO0oEmE40RlMZ5+ODIkAyKAGUwZ3mVKmcamcJnMW26MRPgUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU=");
+ this.snd = new Audio("beep.wav");
}
this.snd.play();
},
@@ -110,7 +110,7 @@ Ext.define('Traccar.controller.Root', {
};
socket.onmessage = function (event) {
- var i, j, store, data, array, entity, device, typeKey, text, geofence;
+ var i, j, store, data, array, entity, device, typeKey, alarmKey, text, geofence;
data = Ext.decode(event.data);
@@ -157,16 +157,19 @@ Ext.define('Traccar.controller.Root', {
}
text = Strings.eventCommandResult + ': ' + text;
} else if (array[i].type === 'alarm' && data.positions) {
- text = 'Alarm';
+ alarmKey = 'alarm';
+ text = Strings[alarmKey];
+ if (typeof text === 'undefined') {
+ 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){
- var alarmKey = 'alarm' + data.positions[j].attributes.alarm.charAt(0).toUpperCase() + data.positions[j].attributes.alarm.slice(1);
+ alarmKey = 'alarm' + data.positions[j].attributes.alarm.charAt(0).toUpperCase() + data.positions[j].attributes.alarm.slice(1);
text = Strings[alarmKey];
if (typeof text === 'undefined') {
text = alarmKey;
}
- text = 'Alarm: ' + text;
}
break;
}
diff --git a/web/beep.wav b/web/beep.wav
new file mode 100644
index 000000000..c2364f114
--- /dev/null
+++ b/web/beep.wav
Binary files differ
diff --git a/web/l10n/en.json b/web/l10n/en.json
index ff432d444..c5d67e8c1 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -119,14 +119,15 @@
"eventGeofenceEnter": "Device has entered geofence",
"eventGeofenceExit": "Device has exited geofence",
"eventAlarm": "Alarms",
- "alarmSos": "sos",
- "alarmVibration": "vibration",
- "alarmMovement": "movement",
- "alarmOverspeed": "overspeed",
- "alarmFallDown": "fallDown",
- "alarmLowBattery": "lowBattery",
- "alarmMotion": "motion",
- "alarmFault": "fault",
+ "alarm": "Alarm",
+ "alarmSos": "SOS Alarm",
+ "alarmVibration": "Vibration Alarm",
+ "alarmMovement": "Movement Alarm",
+ "alarmOverspeed": "Overspeed Alarm",
+ "alarmFallDown": "FallDown Alarm",
+ "alarmLowBattery": "LowBattery Alarm",
+ "alarmMotion": "Motion Alarm",
+ "alarmFault": "Fault Alarm",
"notificationType": "Type of Notification",
"notificationWeb": "Send via Web",
"notificationMail": "Send via Mail"