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 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'web/app/view/State.js') diff --git a/web/app/view/State.js b/web/app/view/State.js index 95529a4..ed9951b 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; } -- cgit v1.2.3