From 4109447d0adc778b246543b77672c280d58da8bf Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Sat, 18 Jun 2016 07:59:43 +0500 Subject: - Update Geofences API and Manager a bit - Show geofence name in event toasts - Link/Unlink geofences to users, devices and groups --- web/app/view/GroupsController.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'web/app/view/GroupsController.js') diff --git a/web/app/view/GroupsController.js b/web/app/view/GroupsController.js index 6cc568ea2..396a28e7e 100644 --- a/web/app/view/GroupsController.js +++ b/web/app/view/GroupsController.js @@ -18,6 +18,10 @@ Ext.define('Traccar.view.GroupsController', { extend: 'Ext.app.ViewController', alias: 'controller.groups', + requires: [ + 'Traccar.view.GroupGeofences' + ], + onAddClick: function () { var group, dialog; group = Ext.create('Traccar.model.Group'); @@ -55,9 +59,21 @@ Ext.define('Traccar.view.GroupsController', { }); }, + onGeofencesClick: function () { + group = this.getView().getSelectionModel().getSelection()[0]; + Ext.create('Traccar.view.BaseWindow', { + title: Strings.settingsGeofences, + items: { + xtype: 'groupGeofencesView', + group: group + } + }).show(); + }, + onSelectionChange: function (selected) { var disabled = selected.length > 0; this.lookupReference('toolbarEditButton').setDisabled(disabled); this.lookupReference('toolbarRemoveButton').setDisabled(disabled); + this.lookupReference('toolbarGeofencesButton').setDisabled(disabled); } }); -- cgit v1.2.3