From 463c548c865ed1c565718c680acba8cc74067ca4 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Mon, 5 Feb 2018 11:15:31 +0500 Subject: Format image and audio attributes as link --- web/app/view/State.js | 10 ++++++++++ web/l10n/en.json | 2 ++ 2 files changed, 12 insertions(+) (limited to 'web') diff --git a/web/app/view/State.js b/web/app/view/State.js index 95529a48..ed9951b5 100644 --- a/web/app/view/State.js +++ b/web/app/view/State.js @@ -61,11 +61,21 @@ Ext.define('Traccar.view.State', { dataIndex: 'value', cellWrap: true, renderer: function (value, metaData, record) { + var position, device; if (record.get('attribute') === 'alarm') { metaData.tdCls = 'view-color-red'; } else if (record.get('name') === Strings.positionAddress && !value) { return '' + Strings.sharedShowAddress + ''; + } else if (record.get('name') === Strings.positionImage || record.get('name') === Strings.positionAudio) { + position = this.getController().position; + if (position) { + device = Ext.getStore('Devices').getById(position.get('deviceId')); + if (device) { + return '' + + value + ''; + } + } } return value; } diff --git a/web/l10n/en.json b/web/l10n/en.json index e23d5a61..1ebccbd3 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -219,6 +219,8 @@ "positionObdSpeed": "OBD Speed", "positionObdOdometer": "OBD Odometer", "positionDriverUniqueId": "Driver Unique Id", + "positionImage": "Image", + "positionAudio": "Audio", "serverTitle": "Server Settings", "serverZoom": "Zoom", "serverRegistration": "Registration", -- cgit v1.2.3