aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/GroupsController.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-06-20 11:05:15 +0500
committerAbyss777 <abyss@fox5.ru>2016-06-20 11:05:15 +0500
commitf82970ac21ec2f050a09493fa7bc46c7178b57c3 (patch)
tree91153bf6a9daacb97f6cd18912361543db000fc0 /web/app/view/GroupsController.js
parent66a21745d90fe1068f3415e705dff3736c19eaaa (diff)
downloadtraccar-server-f82970ac21ec2f050a09493fa7bc46c7178b57c3.tar.gz
traccar-server-f82970ac21ec2f050a09493fa7bc46c7178b57c3.tar.bz2
traccar-server-f82970ac21ec2f050a09493fa7bc46c7178b57c3.zip
- Merged 5 Link/Unlink controllers to one
- Other style fixes
Diffstat (limited to 'web/app/view/GroupsController.js')
-rw-r--r--web/app/view/GroupsController.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/web/app/view/GroupsController.js b/web/app/view/GroupsController.js
index 396a28e7e..bc713bb6d 100644
--- a/web/app/view/GroupsController.js
+++ b/web/app/view/GroupsController.js
@@ -60,12 +60,17 @@ Ext.define('Traccar.view.GroupsController', {
},
onGeofencesClick: function () {
- group = this.getView().getSelectionModel().getSelection()[0];
+ var admin = Traccar.app.getUser().get('admin');
+ var group = this.getView().getSelectionModel().getSelection()[0];
Ext.create('Traccar.view.BaseWindow', {
- title: Strings.settingsGeofences,
+ title: Strings.sharedGeofences,
items: {
xtype: 'groupGeofencesView',
- group: group
+ baseObjectName: 'groupId',
+ linkObjectName: 'geofenceId',
+ storeName: (admin) ? 'AllGeofences' : 'Geofences',
+ urlApi: '/api/groups/geofences',
+ baseObject: group.getData().id
}
}).show();
},