From f82970ac21ec2f050a09493fa7bc46c7178b57c3 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Mon, 20 Jun 2016 11:05:15 +0500 Subject: - Merged 5 Link/Unlink controllers to one - Other style fixes --- web/app/view/DevicesController.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'web/app/view/DevicesController.js') diff --git a/web/app/view/DevicesController.js b/web/app/view/DevicesController.js index d33368181..cf31dd7bb 100644 --- a/web/app/view/DevicesController.js +++ b/web/app/view/DevicesController.js @@ -86,13 +86,17 @@ Ext.define('Traccar.view.DevicesController', { }, onGeofencesClick: function () { - device = this.getView().getSelectionModel().getSelection()[0]; var admin = Traccar.app.getUser().get('admin'); + var device = this.getView().getSelectionModel().getSelection()[0]; Ext.create('Traccar.view.BaseWindow', { - title: Strings.settingsGeofences, + title: Strings.sharedGeofences, items: { xtype: 'deviceGeofencesView', - device: device + baseObjectName: 'deviceId', + linkObjectName: 'geofenceId', + storeName: (admin) ? 'AllGeofences' : 'Geofences', + urlApi: '/api/devices/geofences', + baseObject: device.getData().id } }).show(); }, -- cgit v1.2.3